azure.mgmt.storage.v2019_04_01.operations module¶
-
class
azure.mgmt.storage.v2019_04_01.operations.
Operations
(client, config, serializer, deserializer)[source]¶ Bases:
object
Operations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: api_version – The API version to use for this operation. Constant value: “2019-04-01”.
-
list
(custom_headers=None, raw=False, **operation_config)[source]¶ Lists all of the available Storage Rest API operations.
Parameters: Returns: An iterator like instance of Operation
Return type: Raises: CloudError
-
models
= <module 'azure.mgmt.storage.v2019_04_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/storage/v2019_04_01/models/__init__.py'>¶
-
class
azure.mgmt.storage.v2019_04_01.operations.
SkusOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
SkusOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: api_version – The API version to use for this operation. Constant value: “2019-04-01”.
-
list
(custom_headers=None, raw=False, **operation_config)[source]¶ Lists the available SKUs supported by Microsoft.Storage for given subscription.
Parameters: Returns: An iterator like instance of Sku
Return type: Raises: CloudError
-
models
= <module 'azure.mgmt.storage.v2019_04_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/storage/v2019_04_01/models/__init__.py'>¶
-
class
azure.mgmt.storage.v2019_04_01.operations.
StorageAccountsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
StorageAccountsOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: api_version – The API version to use for this operation. Constant value: “2019-04-01”.
-
check_name_availability
(name, custom_headers=None, raw=False, **operation_config)[source]¶ Checks that the storage account name is valid and is not already in use.
Parameters: Returns: CheckNameAvailabilityResult or ClientRawResponse if raw=true
Return type: CheckNameAvailabilityResult or ClientRawResponse
Raises: CloudError
-
create
(resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config)[source]¶ Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- parameters (StorageAccountCreateParameters) – The parameters to provide for the created account.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
- polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
Returns: An instance of LROPoller that returns StorageAccount or ClientRawResponse<StorageAccount> if raw==True
Return type: AzureOperationPoller[StorageAccount] or AzureOperationPoller[ClientRawResponse[StorageAccount]]
Raises: CloudError
-
delete
(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]¶ Deletes a storage account in Microsoft Azure.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises: CloudError
-
failover
(resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config)[source]¶ Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account’s primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response
- polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy
Returns: An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True
Return type: AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]
Raises: CloudError
-
get_properties
(resource_group_name, account_name, expand=None, custom_headers=None, raw=False, **operation_config)[source]¶ Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- expand (str or StorageAccountExpand) – May be used to expand the properties within account’s properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats. Possible values include: ‘geoReplicationStats’
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: StorageAccount or ClientRawResponse if raw=true
Return type: StorageAccount or ClientRawResponse
Raises: CloudError
-
list
(custom_headers=None, raw=False, **operation_config)[source]¶ Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
Parameters: Returns: An iterator like instance of StorageAccount
Return type: Raises: CloudError
-
list_account_sas
(resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ List SAS credentials of a storage account.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- parameters (AccountSasParameters) – The parameters to provide to list SAS credentials for the storage account.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ListAccountSasResponse or ClientRawResponse if raw=true
Return type: ListAccountSasResponse or ClientRawResponse
Raises: CloudError
-
list_by_resource_group
(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]¶ Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of StorageAccount
Return type: Raises: CloudError
-
list_keys
(resource_group_name, account_name, expand=None, custom_headers=None, raw=False, **operation_config)[source]¶ Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- expand (str or ListKeyExpand) – Specifies type of the key to be listed. Possible value is kerb. Possible values include: ‘kerb’
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: StorageAccountListKeysResult or ClientRawResponse if raw=true
Return type: StorageAccountListKeysResult or ClientRawResponse
Raises: CloudError
-
list_service_sas
(resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ List service SAS credentials of a specific resource.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- parameters (ServiceSasParameters) – The parameters to provide to list service SAS credentials.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ListServiceSasResponse or ClientRawResponse if raw=true
Return type: ListServiceSasResponse or ClientRawResponse
Raises: CloudError
-
regenerate_key
(resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config)[source]¶ Regenerates one of the access keys or Kerberos keys for the specified storage account.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- key_name (str) – The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: StorageAccountListKeysResult or ClientRawResponse if raw=true
Return type: StorageAccountListKeysResult or ClientRawResponse
Raises: CloudError
-
revoke_user_delegation_keys
(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]¶ Revoke user delegation keys.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises: CloudError
-
update
(resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- parameters (StorageAccountUpdateParameters) – The parameters to provide for the updated account.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: StorageAccount or ClientRawResponse if raw=true
Return type: StorageAccount or ClientRawResponse
Raises: CloudError
-
models
= <module 'azure.mgmt.storage.v2019_04_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/storage/v2019_04_01/models/__init__.py'>¶
-
class
azure.mgmt.storage.v2019_04_01.operations.
UsagesOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
UsagesOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: api_version – The API version to use for this operation. Constant value: “2019-04-01”.
-
list_by_location
(location, custom_headers=None, raw=False, **operation_config)[source]¶ Gets the current usage count and the limit for the resources of the location under the subscription.
Parameters: Returns: An iterator like instance of Usage
Return type: Raises: CloudError
-
models
= <module 'azure.mgmt.storage.v2019_04_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/storage/v2019_04_01/models/__init__.py'>¶
-
class
azure.mgmt.storage.v2019_04_01.operations.
ManagementPoliciesOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
ManagementPoliciesOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: - api_version – The API version to use for this operation. Constant value: “2019-04-01”.
- management_policy_name – The name of the Storage Account Management Policy. It should always be ‘default’. Constant value: “default”.
-
create_or_update
(resource_group_name, account_name, policy, custom_headers=None, raw=False, **operation_config)[source]¶ Sets the managementpolicy to the specified storage account.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- policy (ManagementPolicySchema) – The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementPolicy or ClientRawResponse if raw=true
Return type: ManagementPolicy or ClientRawResponse
Raises: CloudError
-
delete
(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]¶ Deletes the managementpolicy associated with the specified storage account.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises: CloudError
-
get
(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets the managementpolicy associated with the specified storage account.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ManagementPolicy or ClientRawResponse if raw=true
Return type: ManagementPolicy or ClientRawResponse
Raises: CloudError
-
models
= <module 'azure.mgmt.storage.v2019_04_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/storage/v2019_04_01/models/__init__.py'>¶
-
class
azure.mgmt.storage.v2019_04_01.operations.
BlobServicesOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
BlobServicesOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: - api_version – The API version to use for this operation. Constant value: “2019-04-01”.
- blob_services_name – The name of the blob Service within the specified storage account. Blob Service Name must be ‘default’. Constant value: “default”.
-
get_service_properties
(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: BlobServiceProperties or ClientRawResponse if raw=true
Return type: BlobServiceProperties or ClientRawResponse
Raises: CloudError
-
list
(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]¶ List blob services of storage account. It returns a collection of one object named default.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of BlobServiceProperties
Return type: Raises: CloudError
-
set_service_properties
(resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config)[source]¶ Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. .
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- parameters (BlobServiceProperties) – The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: BlobServiceProperties or ClientRawResponse if raw=true
Return type: BlobServiceProperties or ClientRawResponse
Raises: CloudError
-
models
= <module 'azure.mgmt.storage.v2019_04_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/storage/v2019_04_01/models/__init__.py'>¶
-
class
azure.mgmt.storage.v2019_04_01.operations.
BlobContainersOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
BlobContainersOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: - api_version – The API version to use for this operation. Constant value: “2019-04-01”.
- immutability_policy_name – The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be ‘default’. Constant value: “default”.
-
clear_legal_hold
(resource_group_name, account_name, container_name, tags, custom_headers=None, raw=False, **operation_config)[source]¶ Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- tags (list[str]) – Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: LegalHold or ClientRawResponse if raw=true
Return type: LegalHold or ClientRawResponse
Raises: CloudError
-
create
(resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config)[source]¶ Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. .
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- public_access (str or PublicAccess) – Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: ‘Container’, ‘Blob’, ‘None’
- metadata (dict[str, str]) – A name-value pair to associate with the container as metadata.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: BlobContainer or ClientRawResponse if raw=true
Return type: BlobContainer or ClientRawResponse
Raises: CloudError
-
create_or_update_immutability_policy
(resource_group_name, account_name, container_name, immutability_period_since_creation_in_days, if_match=None, custom_headers=None, raw=False, **operation_config)[source]¶ Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- immutability_period_since_creation_in_days (int) – The immutability period for the blobs in the container since the policy creation, in days.
- if_match (str) – The entity state (ETag) version of the immutability policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ImmutabilityPolicy or ClientRawResponse if raw=true
Return type: ImmutabilityPolicy or ClientRawResponse
Raises: CloudError
-
delete
(resource_group_name, account_name, container_name, custom_headers=None, raw=False, **operation_config)[source]¶ Deletes specified container under its account.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises: CloudError
-
delete_immutability_policy
(resource_group_name, account_name, container_name, if_match, custom_headers=None, raw=False, **operation_config)[source]¶ Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- if_match (str) – The entity state (ETag) version of the immutability policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ImmutabilityPolicy or ClientRawResponse if raw=true
Return type: ImmutabilityPolicy or ClientRawResponse
Raises: CloudError
-
extend_immutability_policy
(resource_group_name, account_name, container_name, if_match, immutability_period_since_creation_in_days, custom_headers=None, raw=False, **operation_config)[source]¶ Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- if_match (str) – The entity state (ETag) version of the immutability policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- immutability_period_since_creation_in_days (int) – The immutability period for the blobs in the container since the policy creation, in days.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ImmutabilityPolicy or ClientRawResponse if raw=true
Return type: ImmutabilityPolicy or ClientRawResponse
Raises: CloudError
-
get
(resource_group_name, account_name, container_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets properties of a specified container. .
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: BlobContainer or ClientRawResponse if raw=true
Return type: BlobContainer or ClientRawResponse
Raises: CloudError
-
get_immutability_policy
(resource_group_name, account_name, container_name, if_match=None, custom_headers=None, raw=False, **operation_config)[source]¶ Gets the existing immutability policy along with the corresponding ETag in response headers and body.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- if_match (str) – The entity state (ETag) version of the immutability policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ImmutabilityPolicy or ClientRawResponse if raw=true
Return type: ImmutabilityPolicy or ClientRawResponse
Raises: CloudError
-
lease
(resource_group_name, account_name, container_name, parameters=None, custom_headers=None, raw=False, **operation_config)[source]¶ The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- parameters (LeaseContainerRequest) – Lease Container request body.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: LeaseContainerResponse or ClientRawResponse if raw=true
Return type: LeaseContainerResponse or ClientRawResponse
Raises: CloudError
-
list
(resource_group_name, account_name, skip_token=None, maxpagesize=None, filter=None, custom_headers=None, raw=False, **operation_config)[source]¶ Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- skip_token (str) – Optional. Continuation token for the list operation.
- maxpagesize (str) – Optional. Specified maximum number of containers that can be included in the list.
- filter (str) – Optional. When specified, only container names starting with the filter will be listed.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of ListContainerItem
Return type: Raises: CloudError
-
lock_immutability_policy
(resource_group_name, account_name, container_name, if_match, custom_headers=None, raw=False, **operation_config)[source]¶ Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- if_match (str) – The entity state (ETag) version of the immutability policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: ImmutabilityPolicy or ClientRawResponse if raw=true
Return type: ImmutabilityPolicy or ClientRawResponse
Raises: CloudError
-
set_legal_hold
(resource_group_name, account_name, container_name, tags, custom_headers=None, raw=False, **operation_config)[source]¶ Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- tags (list[str]) – Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: LegalHold or ClientRawResponse if raw=true
Return type: LegalHold or ClientRawResponse
Raises: CloudError
-
update
(resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config)[source]¶ Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn’t already exist. .
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- container_name (str) – The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- public_access (str or PublicAccess) – Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: ‘Container’, ‘Blob’, ‘None’
- metadata (dict[str, str]) – A name-value pair to associate with the container as metadata.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: BlobContainer or ClientRawResponse if raw=true
Return type: BlobContainer or ClientRawResponse
Raises: CloudError
-
models
= <module 'azure.mgmt.storage.v2019_04_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/storage/v2019_04_01/models/__init__.py'>¶
-
class
azure.mgmt.storage.v2019_04_01.operations.
FileServicesOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
FileServicesOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: - api_version – The API version to use for this operation. Constant value: “2019-04-01”.
- file_services_name – The name of the file Service within the specified storage account. File Service Name must be “default”. Constant value: “default”.
-
get_service_properties
(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]¶ Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: FileServiceProperties or ClientRawResponse if raw=true
Return type: FileServiceProperties or ClientRawResponse
Raises: CloudError
-
list
(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]¶ List all file services in storage accounts.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: FileServiceItems or ClientRawResponse if raw=true
Return type: FileServiceItems or ClientRawResponse
Raises: CloudError
-
set_service_properties
(resource_group_name, account_name, cors=None, custom_headers=None, raw=False, **operation_config)[source]¶ Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. .
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- cors (CorsRules) – Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: FileServiceProperties or ClientRawResponse if raw=true
Return type: FileServiceProperties or ClientRawResponse
Raises: CloudError
-
models
= <module 'azure.mgmt.storage.v2019_04_01.models' from '/usr/lib/python3/dist-packages/azure/mgmt/storage/v2019_04_01/models/__init__.py'>¶
Bases:
object
FileSharesOperations operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
Parameters: - client – Client for service requests.
- config – Configuration of service client.
- serializer – An object model serializer.
- deserializer – An object model deserializer.
Variables: api_version – The API version to use for this operation. Constant value: “2019-04-01”.
Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. .
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- share_name (str) – The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- metadata (dict[str, str]) – A name-value pair to associate with the share as metadata.
- share_quota (int) – The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120).
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: FileShare or ClientRawResponse if raw=true
Return type: FileShare or ClientRawResponse
Raises: CloudError
Deletes specified share under its account.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- share_name (str) – The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: None or ClientRawResponse if raw=true
Return type: None or ClientRawResponse
Raises: CloudError
Gets properties of a specified share.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- share_name (str) – The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: FileShare or ClientRawResponse if raw=true
Return type: FileShare or ClientRawResponse
Raises: CloudError
Lists all shares.
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- skip_token (str) – Optional. Continuation token for the list operation.
- maxpagesize (str) – Optional. Specified maximum number of shares that can be included in the list.
- filter (str) – Optional. When specified, only share names starting with the filter will be listed.
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: An iterator like instance of FileShareItem
Return type: Raises: CloudError
Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. .
Parameters: - resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.
- account_name (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.
- share_name (str) – The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- metadata (dict[str, str]) – A name-value pair to associate with the share as metadata.
- share_quota (int) – The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120).
- custom_headers (dict) – headers that will be added to the request
- raw (bool) – returns the direct response alongside the deserialized response
- operation_config – Operation configuration overrides.
Returns: FileShare or ClientRawResponse if raw=true
Return type: FileShare or ClientRawResponse
Raises: CloudError