ManagementPoliciesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

StorageManagementClient's

<xref:management_policies> attribute.

Inheritance
builtins.object
ManagementPoliciesOperations

Constructor

ManagementPoliciesOperations(*args, **kwargs)

Methods

create_or_update

Sets the data policy rules associated with the specified storage account.

delete

Deletes the data policy rules associated with the specified storage account.

get

Gets the data policy rules associated with the specified storage account.

create_or_update

Sets the data policy rules associated with the specified storage account.

create_or_update(resource_group_name: str, account_name: str, management_policy_name: str | _models.ManagementPolicyName, properties: _models.ManagementPoliciesRulesSetParameter, *, content_type: str = 'application/json', **kwargs: Any) -> _models.StorageAccountManagementPolicies

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. The name is case insensitive. Required.

account_name
Required
str

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. Required.

management_policy_name
Required

The name of the Storage Account Management Policy. It should always be 'default'. "default" Required.

properties
Required

The data policy rules to set to a storage account. Is either a ManagementPoliciesRulesSetParameter type or a IO[bytes] type. Required.

Returns

Type Description

StorageAccountManagementPolicies or the result of cls(response)

Exceptions

Type Description

delete

Deletes the data policy rules associated with the specified storage account.

delete(resource_group_name: str, account_name: str, management_policy_name: str | ManagementPolicyName, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. The name is case insensitive. Required.

account_name
Required
str

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. Required.

management_policy_name
Required

The name of the Storage Account Management Policy. It should always be 'default'. "default" Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets the data policy rules associated with the specified storage account.

get(resource_group_name: str, account_name: str, management_policy_name: str | ManagementPolicyName, **kwargs: Any) -> StorageAccountManagementPolicies

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the user's subscription. The name is case insensitive. Required.

account_name
Required
str

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. Required.

management_policy_name
Required

The name of the Storage Account Management Policy. It should always be 'default'. "default" Required.

Returns

Type Description

StorageAccountManagementPolicies or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.storage.v2018_03_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\storage\\v2018_03_01_preview\\models\\__init__.py'>