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 managementpolicy to the specified storage account.

delete

Deletes the managementpolicy associated with the specified storage account.

get

Gets the managementpolicy associated with the specified storage account.

create_or_update

Sets the managementpolicy to the specified storage account.

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

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 ManagementPolicy set to a storage account. Is either a ManagementPolicy type or a IO[bytes] type. Required.

Returns

Type Description

ManagementPolicy or the result of cls(response)

Exceptions

Type Description

delete

Deletes the managementpolicy associated with the specified storage account.

async 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 managementpolicy associated with the specified storage account.

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

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

ManagementPolicy or the result of cls(response)

Exceptions

Type Description

Attributes

models

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