diff --git a/azure-mgmt-storage/HISTORY.rst b/azure-mgmt-storage/HISTORY.rst index f43e66c213d1..8da09f156843 100644 --- a/azure-mgmt-storage/HISTORY.rst +++ b/azure-mgmt-storage/HISTORY.rst @@ -3,6 +3,22 @@ Release History =============== +3.3.0 (2019-04-22) +++++++++++++++++++ + +**Features** + +- Model BlobServiceProperties has a new parameter automatic_snapshot_policy_enabled +- Added operation StorageAccountsOperations.revoke_user_delegation_keys +- Added operation BlobContainerOperations.lease + +3.2.0 (2019-04-10) +++++++++++++++++++ + +**Features** + +- Added operation BlobContainersOperations.lease for API versions 2018_02_01 and later + 3.1.1 (2019-01-02) ++++++++++++++++++ diff --git a/azure-mgmt-storage/MANIFEST.in b/azure-mgmt-storage/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/azure-mgmt-storage/MANIFEST.in +++ b/azure-mgmt-storage/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/azure-mgmt-storage/README.rst b/azure-mgmt-storage/README.rst index b05c249aab9c..e8a573239aa7 100644 --- a/azure-mgmt-storage/README.rst +++ b/azure-mgmt-storage/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/azure-mgmt-storage/azure/mgmt/storage/models.py b/azure-mgmt-storage/azure/mgmt/storage/models.py index e262ee6ffb20..96c1d5c91c89 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/models.py +++ b/azure-mgmt-storage/azure/mgmt/storage/models.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from .v2018_02_01.models import * \ No newline at end of file +from .v2019_04_01.models import * \ No newline at end of file diff --git a/azure-mgmt-storage/azure/mgmt/storage/storage_management_client.py b/azure-mgmt-storage/azure/mgmt/storage/storage_management_client.py index b20a506485c7..5e78bbb5ad4a 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/storage_management_client.py +++ b/azure-mgmt-storage/azure/mgmt/storage/storage_management_client.py @@ -80,7 +80,7 @@ class StorageManagementClient(MultiApiClientMixin, SDKClient): :type profile: azure.profiles.KnownProfiles """ - DEFAULT_API_VERSION='2018-07-01' + DEFAULT_API_VERSION='2019-04-01' _PROFILE_TAG = "azure.mgmt.storage.StorageManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -116,6 +116,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2018-02-01: :mod:`v2018_02_01.models` * 2018-03-01-preview: :mod:`v2018_03_01_preview.models` * 2018-07-01: :mod:`v2018_07_01.models` + * 2018-11-01: :mod:`v2018_11_01.models` + * 2019-04-01: :mod:`v2019_04_01.models` """ if api_version == '2015-06-15': from .v2015_06_15 import models @@ -141,6 +143,12 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2018-07-01': from .v2018_07_01 import models return models + elif api_version == '2018-11-01': + from .v2018_11_01 import models + return models + elif api_version == '2019-04-01': + from .v2019_04_01 import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -150,6 +158,8 @@ def blob_containers(self): * 2018-02-01: :class:`BlobContainersOperations` * 2018-03-01-preview: :class:`BlobContainersOperations` * 2018-07-01: :class:`BlobContainersOperations` + * 2018-11-01: :class:`BlobContainersOperations` + * 2019-04-01: :class:`BlobContainersOperations` """ api_version = self._get_api_version('blob_containers') if api_version == '2018-02-01': @@ -158,6 +168,10 @@ def blob_containers(self): from .v2018_03_01_preview.operations import BlobContainersOperations as OperationClass elif api_version == '2018-07-01': from .v2018_07_01.operations import BlobContainersOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import BlobContainersOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import BlobContainersOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -167,10 +181,16 @@ def blob_services(self): """Instance depends on the API version: * 2018-07-01: :class:`BlobServicesOperations` + * 2018-11-01: :class:`BlobServicesOperations` + * 2019-04-01: :class:`BlobServicesOperations` """ api_version = self._get_api_version('blob_services') if api_version == '2018-07-01': from .v2018_07_01.operations import BlobServicesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import BlobServicesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import BlobServicesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -180,10 +200,16 @@ def management_policies(self): """Instance depends on the API version: * 2018-07-01: :class:`ManagementPoliciesOperations` + * 2018-11-01: :class:`ManagementPoliciesOperations` + * 2019-04-01: :class:`ManagementPoliciesOperations` """ api_version = self._get_api_version('management_policies') if api_version == '2018-07-01': from .v2018_07_01.operations import ManagementPoliciesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import ManagementPoliciesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ManagementPoliciesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -197,6 +223,8 @@ def operations(self): * 2018-02-01: :class:`Operations` * 2018-03-01-preview: :class:`Operations` * 2018-07-01: :class:`Operations` + * 2018-11-01: :class:`Operations` + * 2019-04-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2017-06-01': @@ -209,6 +237,10 @@ def operations(self): from .v2018_03_01_preview.operations import Operations as OperationClass elif api_version == '2018-07-01': from .v2018_07_01.operations import Operations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import Operations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import Operations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -222,6 +254,8 @@ def skus(self): * 2018-02-01: :class:`SkusOperations` * 2018-03-01-preview: :class:`SkusOperations` * 2018-07-01: :class:`SkusOperations` + * 2018-11-01: :class:`SkusOperations` + * 2019-04-01: :class:`SkusOperations` """ api_version = self._get_api_version('skus') if api_version == '2017-06-01': @@ -234,6 +268,10 @@ def skus(self): from .v2018_03_01_preview.operations import SkusOperations as OperationClass elif api_version == '2018-07-01': from .v2018_07_01.operations import SkusOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import SkusOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import SkusOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -250,6 +288,8 @@ def storage_accounts(self): * 2018-02-01: :class:`StorageAccountsOperations` * 2018-03-01-preview: :class:`StorageAccountsOperations` * 2018-07-01: :class:`StorageAccountsOperations` + * 2018-11-01: :class:`StorageAccountsOperations` + * 2019-04-01: :class:`StorageAccountsOperations` """ api_version = self._get_api_version('storage_accounts') if api_version == '2015-06-15': @@ -268,6 +308,10 @@ def storage_accounts(self): from .v2018_03_01_preview.operations import StorageAccountsOperations as OperationClass elif api_version == '2018-07-01': from .v2018_07_01.operations import StorageAccountsOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import StorageAccountsOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import StorageAccountsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -306,12 +350,18 @@ def usages(self): * 2018-03-01-preview: :class:`UsagesOperations` * 2018-07-01: :class:`UsagesOperations` + * 2018-11-01: :class:`UsagesOperations` + * 2019-04-01: :class:`UsagesOperations` """ api_version = self._get_api_version('usages') if api_version == '2018-03-01-preview': from .v2018_03_01_preview.operations import UsagesOperations as OperationClass elif api_version == '2018-07-01': from .v2018_07_01.operations import UsagesOperations as OperationClass + elif api_version == '2018-11-01': + from .v2018_11_01.operations import UsagesOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import UsagesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/__init__.py index 010d2c212913..310130e5455a 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/__init__.py +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/__init__.py @@ -55,6 +55,8 @@ from .legal_hold_py3 import LegalHold from .list_container_item_py3 import ListContainerItem from .list_container_items_py3 import ListContainerItems + from .lease_container_request_py3 import LeaseContainerRequest + from .lease_container_response_py3 import LeaseContainerResponse except (SyntaxError, ImportError): from .operation_display import OperationDisplay from .dimension import Dimension @@ -101,6 +103,8 @@ from .legal_hold import LegalHold from .list_container_item import ListContainerItem from .list_container_items import ListContainerItems + from .lease_container_request import LeaseContainerRequest + from .lease_container_response import LeaseContainerResponse from .operation_paged import OperationPaged from .sku_paged import SkuPaged from .storage_account_paged import StorageAccountPaged @@ -180,6 +184,8 @@ 'LegalHold', 'ListContainerItem', 'ListContainerItems', + 'LeaseContainerRequest', + 'LeaseContainerResponse', 'OperationPaged', 'SkuPaged', 'StorageAccountPaged', diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_request.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_request.py new file mode 100644 index 000000000000..77fb6929b8fa --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_request.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2018_02_01.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.lease_id = kwargs.get('lease_id', None) + self.break_period = kwargs.get('break_period', None) + self.lease_duration = kwargs.get('lease_duration', None) + self.proposed_lease_id = kwargs.get('proposed_lease_id', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_request_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_request_py3.py new file mode 100644 index 000000000000..2708ec47e7c1 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_request_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2018_02_01.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, *, action, lease_id: str=None, break_period: int=None, lease_duration: int=None, proposed_lease_id: str=None, **kwargs) -> None: + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = action + self.lease_id = lease_id + self.break_period = break_period + self.lease_duration = lease_duration + self.proposed_lease_id = proposed_lease_id diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_response.py new file mode 100644 index 000000000000..666f0e899f1e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = kwargs.get('lease_id', None) + self.lease_time_seconds = kwargs.get('lease_time_seconds', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_response_py3.py new file mode 100644 index 000000000000..fa87d930571d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/lease_container_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, *, lease_id: str=None, lease_time_seconds: str=None, **kwargs) -> None: + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = lease_id + self.lease_time_seconds = lease_time_seconds diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/operations/blob_containers_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/operations/blob_containers_operations.py index 5d79aa599054..de7148005453 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/operations/blob_containers_operations.py +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/operations/blob_containers_operations.py @@ -1042,3 +1042,87 @@ def extend_immutability_policy( return deserialized extend_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend'} + + def lease( + self, resource_group_name, account_name, container_name, parameters=None, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param parameters: Lease Container request body. + :type parameters: + ~azure.mgmt.storage.v2018_02_01.models.LeaseContainerRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LeaseContainerResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_02_01.models.LeaseContainerResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.lease.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'LeaseContainerRequest') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LeaseContainerResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + lease.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/__init__.py index d5121718507f..d94f1af1a327 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/__init__.py +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/__init__.py @@ -57,6 +57,8 @@ from .legal_hold_py3 import LegalHold from .list_container_item_py3 import ListContainerItem from .list_container_items_py3 import ListContainerItems + from .lease_container_request_py3 import LeaseContainerRequest + from .lease_container_response_py3 import LeaseContainerResponse except (SyntaxError, ImportError): from .operation_display import OperationDisplay from .dimension import Dimension @@ -105,6 +107,8 @@ from .legal_hold import LegalHold from .list_container_item import ListContainerItem from .list_container_items import ListContainerItems + from .lease_container_request import LeaseContainerRequest + from .lease_container_response import LeaseContainerResponse from .operation_paged import OperationPaged from .sku_paged import SkuPaged from .storage_account_paged import StorageAccountPaged @@ -186,6 +190,8 @@ 'LegalHold', 'ListContainerItem', 'ListContainerItems', + 'LeaseContainerRequest', + 'LeaseContainerResponse', 'OperationPaged', 'SkuPaged', 'StorageAccountPaged', diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_request.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_request.py new file mode 100644 index 000000000000..a2a5f4b647ba --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_request.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2018_03_01_preview.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.lease_id = kwargs.get('lease_id', None) + self.break_period = kwargs.get('break_period', None) + self.lease_duration = kwargs.get('lease_duration', None) + self.proposed_lease_id = kwargs.get('proposed_lease_id', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_request_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_request_py3.py new file mode 100644 index 000000000000..d826237f18c5 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_request_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2018_03_01_preview.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, *, action, lease_id: str=None, break_period: int=None, lease_duration: int=None, proposed_lease_id: str=None, **kwargs) -> None: + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = action + self.lease_id = lease_id + self.break_period = break_period + self.lease_duration = lease_duration + self.proposed_lease_id = proposed_lease_id diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_response.py new file mode 100644 index 000000000000..666f0e899f1e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = kwargs.get('lease_id', None) + self.lease_time_seconds = kwargs.get('lease_time_seconds', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_response_py3.py new file mode 100644 index 000000000000..fa87d930571d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/models/lease_container_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, *, lease_id: str=None, lease_time_seconds: str=None, **kwargs) -> None: + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = lease_id + self.lease_time_seconds = lease_time_seconds diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/blob_containers_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/blob_containers_operations.py index 8d69bbcdf38e..9b1ce276d01b 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/blob_containers_operations.py +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_03_01_preview/operations/blob_containers_operations.py @@ -1048,3 +1048,88 @@ def extend_immutability_policy( return deserialized extend_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend'} + + def lease( + self, resource_group_name, account_name, container_name, parameters=None, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param parameters: Lease Container request body. + :type parameters: + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseContainerRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LeaseContainerResponse or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_03_01_preview.models.LeaseContainerResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.lease.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'LeaseContainerRequest') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LeaseContainerResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + lease.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/__init__.py index 10fdba5e08a3..e5e20c59f10f 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/__init__.py +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/__init__.py @@ -60,6 +60,8 @@ from .cors_rules_py3 import CorsRules from .delete_retention_policy_py3 import DeleteRetentionPolicy from .blob_service_properties_py3 import BlobServiceProperties + from .lease_container_request_py3 import LeaseContainerRequest + from .lease_container_response_py3 import LeaseContainerResponse from .storage_account_management_policies_py3 import StorageAccountManagementPolicies from .management_policies_rules_set_parameter_py3 import ManagementPoliciesRulesSetParameter except (SyntaxError, ImportError): @@ -113,6 +115,8 @@ from .cors_rules import CorsRules from .delete_retention_policy import DeleteRetentionPolicy from .blob_service_properties import BlobServiceProperties + from .lease_container_request import LeaseContainerRequest + from .lease_container_response import LeaseContainerResponse from .storage_account_management_policies import StorageAccountManagementPolicies from .management_policies_rules_set_parameter import ManagementPoliciesRulesSetParameter from .operation_paged import OperationPaged @@ -201,6 +205,8 @@ 'CorsRules', 'DeleteRetentionPolicy', 'BlobServiceProperties', + 'LeaseContainerRequest', + 'LeaseContainerResponse', 'StorageAccountManagementPolicies', 'ManagementPoliciesRulesSetParameter', 'OperationPaged', diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_request.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_request.py new file mode 100644 index 000000000000..1c9bcd18dba9 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_request.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2018_07_01.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.lease_id = kwargs.get('lease_id', None) + self.break_period = kwargs.get('break_period', None) + self.lease_duration = kwargs.get('lease_duration', None) + self.proposed_lease_id = kwargs.get('proposed_lease_id', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_request_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_request_py3.py new file mode 100644 index 000000000000..c8cf4b1df78f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_request_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2018_07_01.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, *, action, lease_id: str=None, break_period: int=None, lease_duration: int=None, proposed_lease_id: str=None, **kwargs) -> None: + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = action + self.lease_id = lease_id + self.break_period = break_period + self.lease_duration = lease_duration + self.proposed_lease_id = proposed_lease_id diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_response.py new file mode 100644 index 000000000000..666f0e899f1e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = kwargs.get('lease_id', None) + self.lease_time_seconds = kwargs.get('lease_time_seconds', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_response_py3.py new file mode 100644 index 000000000000..fa87d930571d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/models/lease_container_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, *, lease_id: str=None, lease_time_seconds: str=None, **kwargs) -> None: + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = lease_id + self.lease_time_seconds = lease_time_seconds diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/operations/blob_containers_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/operations/blob_containers_operations.py index cb251bb1aec7..46b53c34d5c2 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/operations/blob_containers_operations.py +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_07_01/operations/blob_containers_operations.py @@ -1042,3 +1042,87 @@ def extend_immutability_policy( return deserialized extend_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend'} + + def lease( + self, resource_group_name, account_name, container_name, parameters=None, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param parameters: Lease Container request body. + :type parameters: + ~azure.mgmt.storage.v2018_07_01.models.LeaseContainerRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LeaseContainerResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_07_01.models.LeaseContainerResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.lease.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'LeaseContainerRequest') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LeaseContainerResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + lease.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/__init__.py new file mode 100644 index 000000000000..0854715e0c10 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .storage_management_client import StorageManagementClient +from .version import VERSION + +__all__ = ['StorageManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/__init__.py new file mode 100644 index 000000000000..1e5d1a426aaf --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/__init__.py @@ -0,0 +1,268 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .operation_display_py3 import OperationDisplay + from .dimension_py3 import Dimension + from .metric_specification_py3 import MetricSpecification + from .service_specification_py3 import ServiceSpecification + from .operation_py3 import Operation + from .storage_account_check_name_availability_parameters_py3 import StorageAccountCheckNameAvailabilityParameters + from .sku_capability_py3 import SKUCapability + from .restriction_py3 import Restriction + from .sku_py3 import Sku + from .check_name_availability_result_py3 import CheckNameAvailabilityResult + from .custom_domain_py3 import CustomDomain + from .encryption_service_py3 import EncryptionService + from .encryption_services_py3 import EncryptionServices + from .key_vault_properties_py3 import KeyVaultProperties + from .encryption_py3 import Encryption + from .virtual_network_rule_py3 import VirtualNetworkRule + from .ip_rule_py3 import IPRule + from .network_rule_set_py3 import NetworkRuleSet + from .identity_py3 import Identity + from .storage_account_create_parameters_py3 import StorageAccountCreateParameters + from .endpoints_py3 import Endpoints + from .geo_replication_stats_py3 import GeoReplicationStats + from .storage_account_py3 import StorageAccount + from .storage_account_key_py3 import StorageAccountKey + from .storage_account_list_keys_result_py3 import StorageAccountListKeysResult + from .storage_account_regenerate_key_parameters_py3 import StorageAccountRegenerateKeyParameters + from .storage_account_update_parameters_py3 import StorageAccountUpdateParameters + from .usage_name_py3 import UsageName + from .usage_py3 import Usage + from .account_sas_parameters_py3 import AccountSasParameters + from .list_account_sas_response_py3 import ListAccountSasResponse + from .service_sas_parameters_py3 import ServiceSasParameters + from .list_service_sas_response_py3 import ListServiceSasResponse + from .date_after_modification_py3 import DateAfterModification + from .management_policy_base_blob_py3 import ManagementPolicyBaseBlob + from .date_after_creation_py3 import DateAfterCreation + from .management_policy_snap_shot_py3 import ManagementPolicySnapShot + from .management_policy_action_py3 import ManagementPolicyAction + from .management_policy_filter_py3 import ManagementPolicyFilter + from .management_policy_definition_py3 import ManagementPolicyDefinition + from .management_policy_rule_py3 import ManagementPolicyRule + from .management_policy_schema_py3 import ManagementPolicySchema + from .management_policy_py3 import ManagementPolicy + from .proxy_resource_py3 import ProxyResource + from .tracked_resource_py3 import TrackedResource + from .azure_entity_resource_py3 import AzureEntityResource + from .resource_py3 import Resource + from .update_history_property_py3 import UpdateHistoryProperty + from .immutability_policy_properties_py3 import ImmutabilityPolicyProperties + from .tag_property_py3 import TagProperty + from .legal_hold_properties_py3 import LegalHoldProperties + from .blob_container_py3 import BlobContainer + from .immutability_policy_py3 import ImmutabilityPolicy + from .legal_hold_py3 import LegalHold + from .list_container_item_py3 import ListContainerItem + from .list_container_items_py3 import ListContainerItems + from .cors_rule_py3 import CorsRule + from .cors_rules_py3 import CorsRules + from .delete_retention_policy_py3 import DeleteRetentionPolicy + from .blob_service_properties_py3 import BlobServiceProperties + from .lease_container_request_py3 import LeaseContainerRequest + from .lease_container_response_py3 import LeaseContainerResponse +except (SyntaxError, ImportError): + from .operation_display import OperationDisplay + from .dimension import Dimension + from .metric_specification import MetricSpecification + from .service_specification import ServiceSpecification + from .operation import Operation + from .storage_account_check_name_availability_parameters import StorageAccountCheckNameAvailabilityParameters + from .sku_capability import SKUCapability + from .restriction import Restriction + from .sku import Sku + from .check_name_availability_result import CheckNameAvailabilityResult + from .custom_domain import CustomDomain + from .encryption_service import EncryptionService + from .encryption_services import EncryptionServices + from .key_vault_properties import KeyVaultProperties + from .encryption import Encryption + from .virtual_network_rule import VirtualNetworkRule + from .ip_rule import IPRule + from .network_rule_set import NetworkRuleSet + from .identity import Identity + from .storage_account_create_parameters import StorageAccountCreateParameters + from .endpoints import Endpoints + from .geo_replication_stats import GeoReplicationStats + from .storage_account import StorageAccount + from .storage_account_key import StorageAccountKey + from .storage_account_list_keys_result import StorageAccountListKeysResult + from .storage_account_regenerate_key_parameters import StorageAccountRegenerateKeyParameters + from .storage_account_update_parameters import StorageAccountUpdateParameters + from .usage_name import UsageName + from .usage import Usage + from .account_sas_parameters import AccountSasParameters + from .list_account_sas_response import ListAccountSasResponse + from .service_sas_parameters import ServiceSasParameters + from .list_service_sas_response import ListServiceSasResponse + from .date_after_modification import DateAfterModification + from .management_policy_base_blob import ManagementPolicyBaseBlob + from .date_after_creation import DateAfterCreation + from .management_policy_snap_shot import ManagementPolicySnapShot + from .management_policy_action import ManagementPolicyAction + from .management_policy_filter import ManagementPolicyFilter + from .management_policy_definition import ManagementPolicyDefinition + from .management_policy_rule import ManagementPolicyRule + from .management_policy_schema import ManagementPolicySchema + from .management_policy import ManagementPolicy + from .proxy_resource import ProxyResource + from .tracked_resource import TrackedResource + from .azure_entity_resource import AzureEntityResource + from .resource import Resource + from .update_history_property import UpdateHistoryProperty + from .immutability_policy_properties import ImmutabilityPolicyProperties + from .tag_property import TagProperty + from .legal_hold_properties import LegalHoldProperties + from .blob_container import BlobContainer + from .immutability_policy import ImmutabilityPolicy + from .legal_hold import LegalHold + from .list_container_item import ListContainerItem + from .list_container_items import ListContainerItems + from .cors_rule import CorsRule + from .cors_rules import CorsRules + from .delete_retention_policy import DeleteRetentionPolicy + from .blob_service_properties import BlobServiceProperties + from .lease_container_request import LeaseContainerRequest + from .lease_container_response import LeaseContainerResponse +from .operation_paged import OperationPaged +from .sku_paged import SkuPaged +from .storage_account_paged import StorageAccountPaged +from .usage_paged import UsagePaged +from .storage_management_client_enums import ( + ReasonCode, + SkuName, + SkuTier, + Kind, + Reason, + KeySource, + Action, + State, + Bypass, + DefaultAction, + AccessTier, + GeoReplicationStatus, + ProvisioningState, + AccountStatus, + KeyPermission, + UsageUnit, + Services, + SignedResourceTypes, + Permissions, + HttpProtocol, + SignedResource, + PublicAccess, + LeaseStatus, + LeaseState, + LeaseDuration, + ImmutabilityPolicyState, + ImmutabilityPolicyUpdateType, + StorageAccountExpand, +) + +__all__ = [ + 'OperationDisplay', + 'Dimension', + 'MetricSpecification', + 'ServiceSpecification', + 'Operation', + 'StorageAccountCheckNameAvailabilityParameters', + 'SKUCapability', + 'Restriction', + 'Sku', + 'CheckNameAvailabilityResult', + 'CustomDomain', + 'EncryptionService', + 'EncryptionServices', + 'KeyVaultProperties', + 'Encryption', + 'VirtualNetworkRule', + 'IPRule', + 'NetworkRuleSet', + 'Identity', + 'StorageAccountCreateParameters', + 'Endpoints', + 'GeoReplicationStats', + 'StorageAccount', + 'StorageAccountKey', + 'StorageAccountListKeysResult', + 'StorageAccountRegenerateKeyParameters', + 'StorageAccountUpdateParameters', + 'UsageName', + 'Usage', + 'AccountSasParameters', + 'ListAccountSasResponse', + 'ServiceSasParameters', + 'ListServiceSasResponse', + 'DateAfterModification', + 'ManagementPolicyBaseBlob', + 'DateAfterCreation', + 'ManagementPolicySnapShot', + 'ManagementPolicyAction', + 'ManagementPolicyFilter', + 'ManagementPolicyDefinition', + 'ManagementPolicyRule', + 'ManagementPolicySchema', + 'ManagementPolicy', + 'ProxyResource', + 'TrackedResource', + 'AzureEntityResource', + 'Resource', + 'UpdateHistoryProperty', + 'ImmutabilityPolicyProperties', + 'TagProperty', + 'LegalHoldProperties', + 'BlobContainer', + 'ImmutabilityPolicy', + 'LegalHold', + 'ListContainerItem', + 'ListContainerItems', + 'CorsRule', + 'CorsRules', + 'DeleteRetentionPolicy', + 'BlobServiceProperties', + 'LeaseContainerRequest', + 'LeaseContainerResponse', + 'OperationPaged', + 'SkuPaged', + 'StorageAccountPaged', + 'UsagePaged', + 'ReasonCode', + 'SkuName', + 'SkuTier', + 'Kind', + 'Reason', + 'KeySource', + 'Action', + 'State', + 'Bypass', + 'DefaultAction', + 'AccessTier', + 'GeoReplicationStatus', + 'ProvisioningState', + 'AccountStatus', + 'KeyPermission', + 'UsageUnit', + 'Services', + 'SignedResourceTypes', + 'Permissions', + 'HttpProtocol', + 'SignedResource', + 'PublicAccess', + 'LeaseStatus', + 'LeaseState', + 'LeaseDuration', + 'ImmutabilityPolicyState', + 'ImmutabilityPolicyUpdateType', + 'StorageAccountExpand', +] diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/account_sas_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/account_sas_parameters.py new file mode 100644 index 000000000000..e7c045bfb0c3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/account_sas_parameters.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccountSasParameters(Model): + """The parameters to list SAS credentials of a storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: Required. The signed services accessible with the account + SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). + Possible values include: 'b', 'q', 't', 'f' + :type services: str or ~azure.mgmt.storage.v2018_11_01.models.Services + :param resource_types: Required. The signed resource types that are + accessible with the account SAS. Service (s): Access to service-level + APIs; Container (c): Access to container-level APIs; Object (o): Access to + object-level APIs for blobs, queue messages, table entities, and files. + Possible values include: 's', 'c', 'o' + :type resource_types: str or + ~azure.mgmt.storage.v2018_11_01.models.SignedResourceTypes + :param permissions: Required. The signed permissions for the account SAS. + Possible values include: Read (r), Write (w), Delete (d), List (l), Add + (a), Create (c), Update (u) and Process (p). Possible values include: 'r', + 'd', 'w', 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2018_11_01.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2018_11_01.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: Required. The time at which the shared + access signature becomes invalid. + :type shared_access_expiry_time: datetime + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + """ + + _validation = { + 'services': {'required': True}, + 'resource_types': {'required': True}, + 'permissions': {'required': True}, + 'shared_access_expiry_time': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'signedServices', 'type': 'str'}, + 'resource_types': {'key': 'signedResourceTypes', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccountSasParameters, self).__init__(**kwargs) + self.services = kwargs.get('services', None) + self.resource_types = kwargs.get('resource_types', None) + self.permissions = kwargs.get('permissions', None) + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) + self.protocols = kwargs.get('protocols', None) + self.shared_access_start_time = kwargs.get('shared_access_start_time', None) + self.shared_access_expiry_time = kwargs.get('shared_access_expiry_time', None) + self.key_to_sign = kwargs.get('key_to_sign', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/account_sas_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/account_sas_parameters_py3.py new file mode 100644 index 000000000000..2a4b649492a3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/account_sas_parameters_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccountSasParameters(Model): + """The parameters to list SAS credentials of a storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: Required. The signed services accessible with the account + SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). + Possible values include: 'b', 'q', 't', 'f' + :type services: str or ~azure.mgmt.storage.v2018_11_01.models.Services + :param resource_types: Required. The signed resource types that are + accessible with the account SAS. Service (s): Access to service-level + APIs; Container (c): Access to container-level APIs; Object (o): Access to + object-level APIs for blobs, queue messages, table entities, and files. + Possible values include: 's', 'c', 'o' + :type resource_types: str or + ~azure.mgmt.storage.v2018_11_01.models.SignedResourceTypes + :param permissions: Required. The signed permissions for the account SAS. + Possible values include: Read (r), Write (w), Delete (d), List (l), Add + (a), Create (c), Update (u) and Process (p). Possible values include: 'r', + 'd', 'w', 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2018_11_01.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2018_11_01.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: Required. The time at which the shared + access signature becomes invalid. + :type shared_access_expiry_time: datetime + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + """ + + _validation = { + 'services': {'required': True}, + 'resource_types': {'required': True}, + 'permissions': {'required': True}, + 'shared_access_expiry_time': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'signedServices', 'type': 'str'}, + 'resource_types': {'key': 'signedResourceTypes', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + } + + def __init__(self, *, services, resource_types, permissions, shared_access_expiry_time, ip_address_or_range: str=None, protocols=None, shared_access_start_time=None, key_to_sign: str=None, **kwargs) -> None: + super(AccountSasParameters, self).__init__(**kwargs) + self.services = services + self.resource_types = resource_types + self.permissions = permissions + self.ip_address_or_range = ip_address_or_range + self.protocols = protocols + self.shared_access_start_time = shared_access_start_time + self.shared_access_expiry_time = shared_access_expiry_time + self.key_to_sign = key_to_sign diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/azure_entity_resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/azure_entity_resource.py new file mode 100644 index 000000000000..3bffaab8d35b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/azure_entity_resource.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/azure_entity_resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/azure_entity_resource_py3.py new file mode 100644 index 000000000000..d3f80d87498a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/azure_entity_resource_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_container.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_container.py new file mode 100644 index 000000000000..02eb42ed1b7b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_container.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource import AzureEntityResource + + +class BlobContainer(AzureEntityResource): + """Properties of the blob container, including Id, resource name, resource + type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_11_01.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2018_11_01.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(BlobContainer, self).__init__(**kwargs) + self.public_access = kwargs.get('public_access', None) + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = kwargs.get('metadata', None) + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_container_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_container_py3.py new file mode 100644 index 000000000000..7ec441c4c256 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_container_py3.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource_py3 import AzureEntityResource + + +class BlobContainer(AzureEntityResource): + """Properties of the blob container, including Id, resource name, resource + type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_11_01.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2018_11_01.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, *, public_access=None, metadata=None, **kwargs) -> None: + super(BlobContainer, self).__init__(**kwargs) + self.public_access = public_access + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = metadata + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_service_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_service_properties.py new file mode 100644 index 000000000000..d300b77a39dc --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_service_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class BlobServiceProperties(Resource): + """The properties of a storage account’s Blob service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param cors: Specifies CORS rules for the Blob 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 Blob service. + :type cors: ~azure.mgmt.storage.v2018_11_01.models.CorsRules + :param default_service_version: DefaultServiceVersion indicates the + default version to use for requests to the Blob service if an incoming + request’s version is not specified. Possible values include version + 2008-10-27 and all more recent versions. + :type default_service_version: str + :param delete_retention_policy: The blob service properties for soft + delete. + :type delete_retention_policy: + ~azure.mgmt.storage.v2018_11_01.models.DeleteRetentionPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsRules'}, + 'default_service_version': {'key': 'properties.defaultServiceVersion', 'type': 'str'}, + 'delete_retention_policy': {'key': 'properties.deleteRetentionPolicy', 'type': 'DeleteRetentionPolicy'}, + } + + def __init__(self, **kwargs): + super(BlobServiceProperties, self).__init__(**kwargs) + self.cors = kwargs.get('cors', None) + self.default_service_version = kwargs.get('default_service_version', None) + self.delete_retention_policy = kwargs.get('delete_retention_policy', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_service_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_service_properties_py3.py new file mode 100644 index 000000000000..4595e3ed6027 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/blob_service_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class BlobServiceProperties(Resource): + """The properties of a storage account’s Blob service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param cors: Specifies CORS rules for the Blob 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 Blob service. + :type cors: ~azure.mgmt.storage.v2018_11_01.models.CorsRules + :param default_service_version: DefaultServiceVersion indicates the + default version to use for requests to the Blob service if an incoming + request’s version is not specified. Possible values include version + 2008-10-27 and all more recent versions. + :type default_service_version: str + :param delete_retention_policy: The blob service properties for soft + delete. + :type delete_retention_policy: + ~azure.mgmt.storage.v2018_11_01.models.DeleteRetentionPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsRules'}, + 'default_service_version': {'key': 'properties.defaultServiceVersion', 'type': 'str'}, + 'delete_retention_policy': {'key': 'properties.deleteRetentionPolicy', 'type': 'DeleteRetentionPolicy'}, + } + + def __init__(self, *, cors=None, default_service_version: str=None, delete_retention_policy=None, **kwargs) -> None: + super(BlobServiceProperties, self).__init__(**kwargs) + self.cors = cors + self.default_service_version = default_service_version + self.delete_retention_policy = delete_retention_policy diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/check_name_availability_result.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/check_name_availability_result.py new file mode 100644 index 000000000000..03b9f760a48f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/check_name_availability_result.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Gets a boolean value that indicates whether the name + is available for you to use. If true, the name is available. If false, the + name has already been taken or is invalid and cannot be used. + :vartype name_available: bool + :ivar reason: Gets the reason that a storage account name could not be + used. The Reason element is only returned if NameAvailable is false. + Possible values include: 'AccountNameInvalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.storage.v2018_11_01.models.Reason + :ivar message: Gets an error message explaining the Reason value in more + detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/check_name_availability_result_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/check_name_availability_result_py3.py new file mode 100644 index 000000000000..8cf811aa6140 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/check_name_availability_result_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Gets a boolean value that indicates whether the name + is available for you to use. If true, the name is available. If false, the + name has already been taken or is invalid and cannot be used. + :vartype name_available: bool + :ivar reason: Gets the reason that a storage account name could not be + used. The Reason element is only returned if NameAvailable is false. + Possible values include: 'AccountNameInvalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.storage.v2018_11_01.models.Reason + :ivar message: Gets an error message explaining the Reason value in more + detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rule.py new file mode 100644 index 000000000000..0777423f048f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rule.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CorsRule(Model): + """Specifies a CORS rule for the Blob service. + + All required parameters must be populated in order to send to Azure. + + :param allowed_origins: Required. Required if CorsRule element is present. + A list of origin domains that will be allowed via CORS, or "*" to allow + all domains + :type allowed_origins: list[str] + :param allowed_methods: Required. Required if CorsRule element is present. + A list of HTTP methods that are allowed to be executed by the origin. + :type allowed_methods: list[str] + :param max_age_in_seconds: Required. Required if CorsRule element is + present. The number of seconds that the client/browser should cache a + preflight response. + :type max_age_in_seconds: int + :param exposed_headers: Required. Required if CorsRule element is present. + A list of response headers to expose to CORS clients. + :type exposed_headers: list[str] + :param allowed_headers: Required. Required if CorsRule element is present. + A list of headers allowed to be part of the cross-origin request. + :type allowed_headers: list[str] + """ + + _validation = { + 'allowed_origins': {'required': True}, + 'allowed_methods': {'required': True}, + 'max_age_in_seconds': {'required': True}, + 'exposed_headers': {'required': True}, + 'allowed_headers': {'required': True}, + } + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + 'allowed_methods': {'key': 'allowedMethods', 'type': '[str]'}, + 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'int'}, + 'exposed_headers': {'key': 'exposedHeaders', 'type': '[str]'}, + 'allowed_headers': {'key': 'allowedHeaders', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(CorsRule, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + self.allowed_methods = kwargs.get('allowed_methods', None) + self.max_age_in_seconds = kwargs.get('max_age_in_seconds', None) + self.exposed_headers = kwargs.get('exposed_headers', None) + self.allowed_headers = kwargs.get('allowed_headers', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rule_py3.py new file mode 100644 index 000000000000..b88a7928cd1c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rule_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CorsRule(Model): + """Specifies a CORS rule for the Blob service. + + All required parameters must be populated in order to send to Azure. + + :param allowed_origins: Required. Required if CorsRule element is present. + A list of origin domains that will be allowed via CORS, or "*" to allow + all domains + :type allowed_origins: list[str] + :param allowed_methods: Required. Required if CorsRule element is present. + A list of HTTP methods that are allowed to be executed by the origin. + :type allowed_methods: list[str] + :param max_age_in_seconds: Required. Required if CorsRule element is + present. The number of seconds that the client/browser should cache a + preflight response. + :type max_age_in_seconds: int + :param exposed_headers: Required. Required if CorsRule element is present. + A list of response headers to expose to CORS clients. + :type exposed_headers: list[str] + :param allowed_headers: Required. Required if CorsRule element is present. + A list of headers allowed to be part of the cross-origin request. + :type allowed_headers: list[str] + """ + + _validation = { + 'allowed_origins': {'required': True}, + 'allowed_methods': {'required': True}, + 'max_age_in_seconds': {'required': True}, + 'exposed_headers': {'required': True}, + 'allowed_headers': {'required': True}, + } + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + 'allowed_methods': {'key': 'allowedMethods', 'type': '[str]'}, + 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'int'}, + 'exposed_headers': {'key': 'exposedHeaders', 'type': '[str]'}, + 'allowed_headers': {'key': 'allowedHeaders', 'type': '[str]'}, + } + + def __init__(self, *, allowed_origins, allowed_methods, max_age_in_seconds: int, exposed_headers, allowed_headers, **kwargs) -> None: + super(CorsRule, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.allowed_methods = allowed_methods + self.max_age_in_seconds = max_age_in_seconds + self.exposed_headers = exposed_headers + self.allowed_headers = allowed_headers diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rules.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rules.py new file mode 100644 index 000000000000..a12737c7e3ba --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rules.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CorsRules(Model): + """Sets the CORS rules. You can include up to five CorsRule elements in the + request. . + + :param cors_rules: The List of CORS rules. You can include up to five + CorsRule elements in the request. + :type cors_rules: list[~azure.mgmt.storage.v2018_11_01.models.CorsRule] + """ + + _attribute_map = { + 'cors_rules': {'key': 'corsRules', 'type': '[CorsRule]'}, + } + + def __init__(self, **kwargs): + super(CorsRules, self).__init__(**kwargs) + self.cors_rules = kwargs.get('cors_rules', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rules_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rules_py3.py new file mode 100644 index 000000000000..0dffb0d983b8 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/cors_rules_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CorsRules(Model): + """Sets the CORS rules. You can include up to five CorsRule elements in the + request. . + + :param cors_rules: The List of CORS rules. You can include up to five + CorsRule elements in the request. + :type cors_rules: list[~azure.mgmt.storage.v2018_11_01.models.CorsRule] + """ + + _attribute_map = { + 'cors_rules': {'key': 'corsRules', 'type': '[CorsRule]'}, + } + + def __init__(self, *, cors_rules=None, **kwargs) -> None: + super(CorsRules, self).__init__(**kwargs) + self.cors_rules = cors_rules diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/custom_domain.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/custom_domain.py new file mode 100644 index 000000000000..d5cc10da36cb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/custom_domain.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomDomain(Model): + """The custom domain assigned to this storage account. This can be set via + Update. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the custom domain name assigned to the + storage account. Name is the CNAME source. + :type name: str + :param use_sub_domain_name: Indicates whether indirect CName validation is + enabled. Default value is false. This should only be set on updates. + :type use_sub_domain_name: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'use_sub_domain_name': {'key': 'useSubDomainName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CustomDomain, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.use_sub_domain_name = kwargs.get('use_sub_domain_name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/custom_domain_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/custom_domain_py3.py new file mode 100644 index 000000000000..25dce0b57aee --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/custom_domain_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomDomain(Model): + """The custom domain assigned to this storage account. This can be set via + Update. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the custom domain name assigned to the + storage account. Name is the CNAME source. + :type name: str + :param use_sub_domain_name: Indicates whether indirect CName validation is + enabled. Default value is false. This should only be set on updates. + :type use_sub_domain_name: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'use_sub_domain_name': {'key': 'useSubDomainName', 'type': 'bool'}, + } + + def __init__(self, *, name: str, use_sub_domain_name: bool=None, **kwargs) -> None: + super(CustomDomain, self).__init__(**kwargs) + self.name = name + self.use_sub_domain_name = use_sub_domain_name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_creation.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_creation.py new file mode 100644 index 000000000000..41272568a7a6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_creation.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DateAfterCreation(Model): + """Object to define the number of days after creation. + + All required parameters must be populated in order to send to Azure. + + :param days_after_creation_greater_than: Required. Integer value + indicating the age in days after creation + :type days_after_creation_greater_than: int + """ + + _validation = { + 'days_after_creation_greater_than': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'days_after_creation_greater_than': {'key': 'daysAfterCreationGreaterThan', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DateAfterCreation, self).__init__(**kwargs) + self.days_after_creation_greater_than = kwargs.get('days_after_creation_greater_than', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_creation_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_creation_py3.py new file mode 100644 index 000000000000..ad6001e55a4e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_creation_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DateAfterCreation(Model): + """Object to define the number of days after creation. + + All required parameters must be populated in order to send to Azure. + + :param days_after_creation_greater_than: Required. Integer value + indicating the age in days after creation + :type days_after_creation_greater_than: int + """ + + _validation = { + 'days_after_creation_greater_than': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'days_after_creation_greater_than': {'key': 'daysAfterCreationGreaterThan', 'type': 'int'}, + } + + def __init__(self, *, days_after_creation_greater_than: int, **kwargs) -> None: + super(DateAfterCreation, self).__init__(**kwargs) + self.days_after_creation_greater_than = days_after_creation_greater_than diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_modification.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_modification.py new file mode 100644 index 000000000000..772272ba044a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_modification.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DateAfterModification(Model): + """Object to define the number of days after last modification. + + All required parameters must be populated in order to send to Azure. + + :param days_after_modification_greater_than: Required. Integer value + indicating the age in days after last modification + :type days_after_modification_greater_than: int + """ + + _validation = { + 'days_after_modification_greater_than': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'days_after_modification_greater_than': {'key': 'daysAfterModificationGreaterThan', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DateAfterModification, self).__init__(**kwargs) + self.days_after_modification_greater_than = kwargs.get('days_after_modification_greater_than', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_modification_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_modification_py3.py new file mode 100644 index 000000000000..cd8433ba06fa --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/date_after_modification_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DateAfterModification(Model): + """Object to define the number of days after last modification. + + All required parameters must be populated in order to send to Azure. + + :param days_after_modification_greater_than: Required. Integer value + indicating the age in days after last modification + :type days_after_modification_greater_than: int + """ + + _validation = { + 'days_after_modification_greater_than': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'days_after_modification_greater_than': {'key': 'daysAfterModificationGreaterThan', 'type': 'int'}, + } + + def __init__(self, *, days_after_modification_greater_than: int, **kwargs) -> None: + super(DateAfterModification, self).__init__(**kwargs) + self.days_after_modification_greater_than = days_after_modification_greater_than diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/delete_retention_policy.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/delete_retention_policy.py new file mode 100644 index 000000000000..1edc91c2320a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/delete_retention_policy.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeleteRetentionPolicy(Model): + """The blob service properties for soft delete. + + :param enabled: Indicates whether DeleteRetentionPolicy is enabled for the + Blob service. + :type enabled: bool + :param days: Indicates the number of days that the deleted blob should be + retained. The minimum specified value can be 1 and the maximum value can + be 365. + :type days: int + """ + + _validation = { + 'days': {'maximum': 365, 'minimum': 1}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'days': {'key': 'days', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DeleteRetentionPolicy, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.days = kwargs.get('days', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/delete_retention_policy_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/delete_retention_policy_py3.py new file mode 100644 index 000000000000..9fcc691aadad --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/delete_retention_policy_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeleteRetentionPolicy(Model): + """The blob service properties for soft delete. + + :param enabled: Indicates whether DeleteRetentionPolicy is enabled for the + Blob service. + :type enabled: bool + :param days: Indicates the number of days that the deleted blob should be + retained. The minimum specified value can be 1 and the maximum value can + be 365. + :type days: int + """ + + _validation = { + 'days': {'maximum': 365, 'minimum': 1}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'days': {'key': 'days', 'type': 'int'}, + } + + def __init__(self, *, enabled: bool=None, days: int=None, **kwargs) -> None: + super(DeleteRetentionPolicy, self).__init__(**kwargs) + self.enabled = enabled + self.days = days diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/dimension.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/dimension.py new file mode 100644 index 000000000000..2398aa46e8f6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/dimension.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Dimension(Model): + """Dimension of blobs, possibly be blob type or access tier. + + :param name: Display name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Dimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/dimension_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/dimension_py3.py new file mode 100644 index 000000000000..af5b0aac3d23 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/dimension_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Dimension(Model): + """Dimension of blobs, possibly be blob type or access tier. + + :param name: Display name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(Dimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption.py new file mode 100644 index 000000000000..0f6e31105b16 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Encryption(Model): + """The encryption settings on the storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: List of services which support encryption. + :type services: ~azure.mgmt.storage.v2018_11_01.models.EncryptionServices + :param key_source: Required. The encryption keySource (provider). Possible + values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. + Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. + Default value: "Microsoft.Storage" . + :type key_source: str or ~azure.mgmt.storage.v2018_11_01.models.KeySource + :param key_vault_properties: Properties provided by key vault. + :type key_vault_properties: + ~azure.mgmt.storage.v2018_11_01.models.KeyVaultProperties + """ + + _validation = { + 'key_source': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'services', 'type': 'EncryptionServices'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyvaultproperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, **kwargs): + super(Encryption, self).__init__(**kwargs) + self.services = kwargs.get('services', None) + self.key_source = kwargs.get('key_source', "Microsoft.Storage") + self.key_vault_properties = kwargs.get('key_vault_properties', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_py3.py new file mode 100644 index 000000000000..8153352d3220 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Encryption(Model): + """The encryption settings on the storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: List of services which support encryption. + :type services: ~azure.mgmt.storage.v2018_11_01.models.EncryptionServices + :param key_source: Required. The encryption keySource (provider). Possible + values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. + Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. + Default value: "Microsoft.Storage" . + :type key_source: str or ~azure.mgmt.storage.v2018_11_01.models.KeySource + :param key_vault_properties: Properties provided by key vault. + :type key_vault_properties: + ~azure.mgmt.storage.v2018_11_01.models.KeyVaultProperties + """ + + _validation = { + 'key_source': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'services', 'type': 'EncryptionServices'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyvaultproperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, *, services=None, key_source="Microsoft.Storage", key_vault_properties=None, **kwargs) -> None: + super(Encryption, self).__init__(**kwargs) + self.services = services + self.key_source = key_source + self.key_vault_properties = key_vault_properties diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_service.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_service.py new file mode 100644 index 000000000000..3a020c468f64 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_service.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionService(Model): + """A service that allows server-side encryption to be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param enabled: A boolean indicating whether or not the service encrypts + the data as it is stored. + :type enabled: bool + :ivar last_enabled_time: Gets a rough estimate of the date/time when the + encryption was last enabled by the user. Only returned when encryption is + enabled. There might be some unencrypted blobs which were written after + this time, as it is just a rough estimate. + :vartype last_enabled_time: datetime + """ + + _validation = { + 'last_enabled_time': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'last_enabled_time': {'key': 'lastEnabledTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(EncryptionService, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.last_enabled_time = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_service_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_service_py3.py new file mode 100644 index 000000000000..0566050c6155 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_service_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionService(Model): + """A service that allows server-side encryption to be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param enabled: A boolean indicating whether or not the service encrypts + the data as it is stored. + :type enabled: bool + :ivar last_enabled_time: Gets a rough estimate of the date/time when the + encryption was last enabled by the user. Only returned when encryption is + enabled. There might be some unencrypted blobs which were written after + this time, as it is just a rough estimate. + :vartype last_enabled_time: datetime + """ + + _validation = { + 'last_enabled_time': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'last_enabled_time': {'key': 'lastEnabledTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, enabled: bool=None, **kwargs) -> None: + super(EncryptionService, self).__init__(**kwargs) + self.enabled = enabled + self.last_enabled_time = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_services.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_services.py new file mode 100644 index 000000000000..5d931278b899 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_services.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionServices(Model): + """A list of services that support encryption. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param blob: The encryption function of the blob storage service. + :type blob: ~azure.mgmt.storage.v2018_11_01.models.EncryptionService + :param file: The encryption function of the file storage service. + :type file: ~azure.mgmt.storage.v2018_11_01.models.EncryptionService + :ivar table: The encryption function of the table storage service. + :vartype table: ~azure.mgmt.storage.v2018_11_01.models.EncryptionService + :ivar queue: The encryption function of the queue storage service. + :vartype queue: ~azure.mgmt.storage.v2018_11_01.models.EncryptionService + """ + + _validation = { + 'table': {'readonly': True}, + 'queue': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'EncryptionService'}, + 'file': {'key': 'file', 'type': 'EncryptionService'}, + 'table': {'key': 'table', 'type': 'EncryptionService'}, + 'queue': {'key': 'queue', 'type': 'EncryptionService'}, + } + + def __init__(self, **kwargs): + super(EncryptionServices, self).__init__(**kwargs) + self.blob = kwargs.get('blob', None) + self.file = kwargs.get('file', None) + self.table = None + self.queue = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_services_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_services_py3.py new file mode 100644 index 000000000000..df7354b5a1d2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/encryption_services_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionServices(Model): + """A list of services that support encryption. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param blob: The encryption function of the blob storage service. + :type blob: ~azure.mgmt.storage.v2018_11_01.models.EncryptionService + :param file: The encryption function of the file storage service. + :type file: ~azure.mgmt.storage.v2018_11_01.models.EncryptionService + :ivar table: The encryption function of the table storage service. + :vartype table: ~azure.mgmt.storage.v2018_11_01.models.EncryptionService + :ivar queue: The encryption function of the queue storage service. + :vartype queue: ~azure.mgmt.storage.v2018_11_01.models.EncryptionService + """ + + _validation = { + 'table': {'readonly': True}, + 'queue': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'EncryptionService'}, + 'file': {'key': 'file', 'type': 'EncryptionService'}, + 'table': {'key': 'table', 'type': 'EncryptionService'}, + 'queue': {'key': 'queue', 'type': 'EncryptionService'}, + } + + def __init__(self, *, blob=None, file=None, **kwargs) -> None: + super(EncryptionServices, self).__init__(**kwargs) + self.blob = blob + self.file = file + self.table = None + self.queue = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/endpoints.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/endpoints.py new file mode 100644 index 000000000000..66b1c3459a5e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/endpoints.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Endpoints(Model): + """The URIs that are used to perform a retrieval of a public blob, queue, + table, web or dfs object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar blob: Gets the blob endpoint. + :vartype blob: str + :ivar queue: Gets the queue endpoint. + :vartype queue: str + :ivar table: Gets the table endpoint. + :vartype table: str + :ivar file: Gets the file endpoint. + :vartype file: str + :ivar web: Gets the web endpoint. + :vartype web: str + :ivar dfs: Gets the dfs endpoint. + :vartype dfs: str + """ + + _validation = { + 'blob': {'readonly': True}, + 'queue': {'readonly': True}, + 'table': {'readonly': True}, + 'file': {'readonly': True}, + 'web': {'readonly': True}, + 'dfs': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'str'}, + 'queue': {'key': 'queue', 'type': 'str'}, + 'table': {'key': 'table', 'type': 'str'}, + 'file': {'key': 'file', 'type': 'str'}, + 'web': {'key': 'web', 'type': 'str'}, + 'dfs': {'key': 'dfs', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Endpoints, self).__init__(**kwargs) + self.blob = None + self.queue = None + self.table = None + self.file = None + self.web = None + self.dfs = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/endpoints_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/endpoints_py3.py new file mode 100644 index 000000000000..ced561acd85b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/endpoints_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Endpoints(Model): + """The URIs that are used to perform a retrieval of a public blob, queue, + table, web or dfs object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar blob: Gets the blob endpoint. + :vartype blob: str + :ivar queue: Gets the queue endpoint. + :vartype queue: str + :ivar table: Gets the table endpoint. + :vartype table: str + :ivar file: Gets the file endpoint. + :vartype file: str + :ivar web: Gets the web endpoint. + :vartype web: str + :ivar dfs: Gets the dfs endpoint. + :vartype dfs: str + """ + + _validation = { + 'blob': {'readonly': True}, + 'queue': {'readonly': True}, + 'table': {'readonly': True}, + 'file': {'readonly': True}, + 'web': {'readonly': True}, + 'dfs': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'str'}, + 'queue': {'key': 'queue', 'type': 'str'}, + 'table': {'key': 'table', 'type': 'str'}, + 'file': {'key': 'file', 'type': 'str'}, + 'web': {'key': 'web', 'type': 'str'}, + 'dfs': {'key': 'dfs', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Endpoints, self).__init__(**kwargs) + self.blob = None + self.queue = None + self.table = None + self.file = None + self.web = None + self.dfs = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/geo_replication_stats.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/geo_replication_stats.py new file mode 100644 index 000000000000..b8096a467a6c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/geo_replication_stats.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GeoReplicationStats(Model): + """Statistics related to replication for storage account's Blob, Table, Queue + and File services. It is only available when geo-redundant replication is + enabled for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The status of the secondary location. Possible values are: - + Live: Indicates that the secondary location is active and operational. - + Bootstrap: Indicates initial synchronization from the primary location to + the secondary location is in progress.This typically occurs when + replication is first enabled. - Unavailable: Indicates that the secondary + location is temporarily unavailable. Possible values include: 'Live', + 'Bootstrap', 'Unavailable' + :vartype status: str or + ~azure.mgmt.storage.v2018_11_01.models.GeoReplicationStatus + :ivar last_sync_time: All primary writes preceding this UTC date/time + value are guaranteed to be available for read operations. Primary writes + following this point in time may or may not be available for reads. + Element may be default value if value of LastSyncTime is not available, + this can happen if secondary is offline or we are in bootstrap. + :vartype last_sync_time: datetime + :ivar can_failover: A boolean flag which indicates whether or not account + failover is supported for the account. + :vartype can_failover: bool + """ + + _validation = { + 'status': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'can_failover': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'last_sync_time': {'key': 'lastSyncTime', 'type': 'iso-8601'}, + 'can_failover': {'key': 'canFailover', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GeoReplicationStats, self).__init__(**kwargs) + self.status = None + self.last_sync_time = None + self.can_failover = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/geo_replication_stats_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/geo_replication_stats_py3.py new file mode 100644 index 000000000000..2a06ee263f4f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/geo_replication_stats_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GeoReplicationStats(Model): + """Statistics related to replication for storage account's Blob, Table, Queue + and File services. It is only available when geo-redundant replication is + enabled for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The status of the secondary location. Possible values are: - + Live: Indicates that the secondary location is active and operational. - + Bootstrap: Indicates initial synchronization from the primary location to + the secondary location is in progress.This typically occurs when + replication is first enabled. - Unavailable: Indicates that the secondary + location is temporarily unavailable. Possible values include: 'Live', + 'Bootstrap', 'Unavailable' + :vartype status: str or + ~azure.mgmt.storage.v2018_11_01.models.GeoReplicationStatus + :ivar last_sync_time: All primary writes preceding this UTC date/time + value are guaranteed to be available for read operations. Primary writes + following this point in time may or may not be available for reads. + Element may be default value if value of LastSyncTime is not available, + this can happen if secondary is offline or we are in bootstrap. + :vartype last_sync_time: datetime + :ivar can_failover: A boolean flag which indicates whether or not account + failover is supported for the account. + :vartype can_failover: bool + """ + + _validation = { + 'status': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'can_failover': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'last_sync_time': {'key': 'lastSyncTime', 'type': 'iso-8601'}, + 'can_failover': {'key': 'canFailover', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(GeoReplicationStats, self).__init__(**kwargs) + self.status = None + self.last_sync_time = None + self.can_failover = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/identity.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/identity.py new file mode 100644 index 000000000000..f526b986fc70 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/identity.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: Required. The identity type. Default value: "SystemAssigned" . + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/identity_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/identity_py3.py new file mode 100644 index 000000000000..22d25fdd85b7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/identity_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: Required. The identity type. Default value: "SystemAssigned" . + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy.py new file mode 100644 index 000000000000..d001526ad5bb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource import AzureEntityResource + + +class ImmutabilityPolicy(AzureEntityResource): + """The ImmutabilityPolicy property of a blob container, including Id, resource + name, resource type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImmutabilityPolicy, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = kwargs.get('immutability_period_since_creation_in_days', None) + self.state = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy_properties.py new file mode 100644 index 000000000000..e904bb13ff4b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy_properties.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImmutabilityPolicyProperties(Model): + """The properties of an ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyState + :ivar etag: ImmutabilityPolicy Etag. + :vartype etag: str + :ivar update_history: The ImmutabilityPolicy update history of the blob + container. + :vartype update_history: + list[~azure.mgmt.storage.v2018_11_01.models.UpdateHistoryProperty] + """ + + _validation = { + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + 'etag': {'readonly': True}, + 'update_history': {'readonly': True}, + } + + _attribute_map = { + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'update_history': {'key': 'updateHistory', 'type': '[UpdateHistoryProperty]'}, + } + + def __init__(self, **kwargs): + super(ImmutabilityPolicyProperties, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = kwargs.get('immutability_period_since_creation_in_days', None) + self.state = None + self.etag = None + self.update_history = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy_properties_py3.py new file mode 100644 index 000000000000..3252415b44a9 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy_properties_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImmutabilityPolicyProperties(Model): + """The properties of an ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyState + :ivar etag: ImmutabilityPolicy Etag. + :vartype etag: str + :ivar update_history: The ImmutabilityPolicy update history of the blob + container. + :vartype update_history: + list[~azure.mgmt.storage.v2018_11_01.models.UpdateHistoryProperty] + """ + + _validation = { + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + 'etag': {'readonly': True}, + 'update_history': {'readonly': True}, + } + + _attribute_map = { + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'update_history': {'key': 'updateHistory', 'type': '[UpdateHistoryProperty]'}, + } + + def __init__(self, *, immutability_period_since_creation_in_days: int, **kwargs) -> None: + super(ImmutabilityPolicyProperties, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = immutability_period_since_creation_in_days + self.state = None + self.etag = None + self.update_history = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy_py3.py new file mode 100644 index 000000000000..36275f539592 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/immutability_policy_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource_py3 import AzureEntityResource + + +class ImmutabilityPolicy(AzureEntityResource): + """The ImmutabilityPolicy property of a blob container, including Id, resource + name, resource type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, immutability_period_since_creation_in_days: int, **kwargs) -> None: + super(ImmutabilityPolicy, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = immutability_period_since_creation_in_days + self.state = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/ip_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/ip_rule.py new file mode 100644 index 000000000000..a62fe1a1ad45 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/ip_rule.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2018_11_01.models.Action + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + } + + def __init__(self, **kwargs): + super(IPRule, self).__init__(**kwargs) + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) + self.action = kwargs.get('action', "Allow") diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/ip_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/ip_rule_py3.py new file mode 100644 index 000000000000..28fe9583e685 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/ip_rule_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2018_11_01.models.Action + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + } + + def __init__(self, *, ip_address_or_range: str, action="Allow", **kwargs) -> None: + super(IPRule, self).__init__(**kwargs) + self.ip_address_or_range = ip_address_or_range + self.action = action diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/key_vault_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/key_vault_properties.py new file mode 100644 index 000000000000..44eaf379f6f2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/key_vault_properties.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultProperties(Model): + """Properties of key vault. + + :param key_name: The name of KeyVault key. + :type key_name: str + :param key_version: The version of KeyVault key. + :type key_version: str + :param key_vault_uri: The Uri of KeyVault. + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyname', 'type': 'str'}, + 'key_version': {'key': 'keyversion', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + self.key_vault_uri = kwargs.get('key_vault_uri', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/key_vault_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/key_vault_properties_py3.py new file mode 100644 index 000000000000..9e6350eec898 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/key_vault_properties_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultProperties(Model): + """Properties of key vault. + + :param key_name: The name of KeyVault key. + :type key_name: str + :param key_version: The version of KeyVault key. + :type key_version: str + :param key_vault_uri: The Uri of KeyVault. + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyname', 'type': 'str'}, + 'key_version': {'key': 'keyversion', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'}, + } + + def __init__(self, *, key_name: str=None, key_version: str=None, key_vault_uri: str=None, **kwargs) -> None: + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = key_name + self.key_version = key_version + self.key_vault_uri = key_vault_uri diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_request.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_request.py new file mode 100644 index 000000000000..246893817045 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_request.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2018_11_01.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.lease_id = kwargs.get('lease_id', None) + self.break_period = kwargs.get('break_period', None) + self.lease_duration = kwargs.get('lease_duration', None) + self.proposed_lease_id = kwargs.get('proposed_lease_id', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_request_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_request_py3.py new file mode 100644 index 000000000000..06f0d83d4740 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_request_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2018_11_01.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, *, action, lease_id: str=None, break_period: int=None, lease_duration: int=None, proposed_lease_id: str=None, **kwargs) -> None: + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = action + self.lease_id = lease_id + self.break_period = break_period + self.lease_duration = lease_duration + self.proposed_lease_id = proposed_lease_id diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_response.py new file mode 100644 index 000000000000..666f0e899f1e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = kwargs.get('lease_id', None) + self.lease_time_seconds = kwargs.get('lease_time_seconds', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_response_py3.py new file mode 100644 index 000000000000..fa87d930571d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/lease_container_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, *, lease_id: str=None, lease_time_seconds: str=None, **kwargs) -> None: + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = lease_id + self.lease_time_seconds = lease_time_seconds diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold.py new file mode 100644 index 000000000000..4eb93df1d9fe --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHold(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: Required. Each tag should be 3 to 23 alphanumeric characters + and is normalized to lower case at SRP. + :type tags: list[str] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(LegalHold, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold_properties.py new file mode 100644 index 000000000000..e5290645a0e8 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold_properties.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHoldProperties(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: The list of LegalHold tags of a blob container. + :type tags: list[~azure.mgmt.storage.v2018_11_01.models.TagProperty] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[TagProperty]'}, + } + + def __init__(self, **kwargs): + super(LegalHoldProperties, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold_properties_py3.py new file mode 100644 index 000000000000..53154887db78 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold_properties_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHoldProperties(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: The list of LegalHold tags of a blob container. + :type tags: list[~azure.mgmt.storage.v2018_11_01.models.TagProperty] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[TagProperty]'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(LegalHoldProperties, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = tags diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold_py3.py new file mode 100644 index 000000000000..a4bc196cb604 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/legal_hold_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHold(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: Required. Each tag should be 3 to 23 alphanumeric characters + and is normalized to lower case at SRP. + :type tags: list[str] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + } + + def __init__(self, *, tags, **kwargs) -> None: + super(LegalHold, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = tags diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_account_sas_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_account_sas_response.py new file mode 100644 index 000000000000..a56e959a34bd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_account_sas_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListAccountSasResponse(Model): + """The List SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_sas_token: List SAS credentials of storage account. + :vartype account_sas_token: str + """ + + _validation = { + 'account_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'account_sas_token': {'key': 'accountSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListAccountSasResponse, self).__init__(**kwargs) + self.account_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_account_sas_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_account_sas_response_py3.py new file mode 100644 index 000000000000..b8b9a314d9f6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_account_sas_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListAccountSasResponse(Model): + """The List SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_sas_token: List SAS credentials of storage account. + :vartype account_sas_token: str + """ + + _validation = { + 'account_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'account_sas_token': {'key': 'accountSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListAccountSasResponse, self).__init__(**kwargs) + self.account_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_item.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_item.py new file mode 100644 index 000000000000..a3e440ec6712 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_item.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource import AzureEntityResource + + +class ListContainerItem(AzureEntityResource): + """The blob container properties be listed out. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_11_01.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2018_11_01.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ListContainerItem, self).__init__(**kwargs) + self.public_access = kwargs.get('public_access', None) + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = kwargs.get('metadata', None) + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_item_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_item_py3.py new file mode 100644 index 000000000000..3a42837b4d3d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_item_py3.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource_py3 import AzureEntityResource + + +class ListContainerItem(AzureEntityResource): + """The blob container properties be listed out. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_11_01.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2018_11_01.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2018_11_01.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, *, public_access=None, metadata=None, **kwargs) -> None: + super(ListContainerItem, self).__init__(**kwargs) + self.public_access = public_access + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = metadata + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_items.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_items.py new file mode 100644 index 000000000000..ecdfe1916baa --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_items.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListContainerItems(Model): + """The list of blob containers. + + :param value: The list of blob containers. + :type value: + list[~azure.mgmt.storage.v2018_11_01.models.ListContainerItem] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ListContainerItem]'}, + } + + def __init__(self, **kwargs): + super(ListContainerItems, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_items_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_items_py3.py new file mode 100644 index 000000000000..32b626f1c6ac --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_container_items_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListContainerItems(Model): + """The list of blob containers. + + :param value: The list of blob containers. + :type value: + list[~azure.mgmt.storage.v2018_11_01.models.ListContainerItem] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ListContainerItem]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ListContainerItems, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_service_sas_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_service_sas_response.py new file mode 100644 index 000000000000..d4ab160ae364 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_service_sas_response.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListServiceSasResponse(Model): + """The List service SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_sas_token: List service SAS credentials of specific + resource. + :vartype service_sas_token: str + """ + + _validation = { + 'service_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'service_sas_token': {'key': 'serviceSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListServiceSasResponse, self).__init__(**kwargs) + self.service_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_service_sas_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_service_sas_response_py3.py new file mode 100644 index 000000000000..7c20617658df --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/list_service_sas_response_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListServiceSasResponse(Model): + """The List service SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_sas_token: List service SAS credentials of specific + resource. + :vartype service_sas_token: str + """ + + _validation = { + 'service_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'service_sas_token': {'key': 'serviceSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListServiceSasResponse, self).__init__(**kwargs) + self.service_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy.py new file mode 100644 index 000000000000..c22f1dd2011b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ManagementPolicy(Resource): + """The Get Storage Account ManagementPolicies operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar last_modified_time: Returns the date and time the ManagementPolicies + was last modified. + :vartype last_modified_time: datetime + :param policy: Required. The Storage Account ManagementPolicy, in JSON + format. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicySchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'policy': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'policy': {'key': 'properties.policy', 'type': 'ManagementPolicySchema'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicy, self).__init__(**kwargs) + self.last_modified_time = None + self.policy = kwargs.get('policy', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_action.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_action.py new file mode 100644 index 000000000000..47daef517d92 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_action.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyAction(Model): + """Actions are applied to the filtered blobs when the execution condition is + met. + + :param base_blob: The management policy action for base blob + :type base_blob: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyBaseBlob + :param snapshot: The management policy action for snapshot + :type snapshot: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicySnapShot + """ + + _attribute_map = { + 'base_blob': {'key': 'baseBlob', 'type': 'ManagementPolicyBaseBlob'}, + 'snapshot': {'key': 'snapshot', 'type': 'ManagementPolicySnapShot'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicyAction, self).__init__(**kwargs) + self.base_blob = kwargs.get('base_blob', None) + self.snapshot = kwargs.get('snapshot', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_action_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_action_py3.py new file mode 100644 index 000000000000..336756ac3fea --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_action_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyAction(Model): + """Actions are applied to the filtered blobs when the execution condition is + met. + + :param base_blob: The management policy action for base blob + :type base_blob: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyBaseBlob + :param snapshot: The management policy action for snapshot + :type snapshot: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicySnapShot + """ + + _attribute_map = { + 'base_blob': {'key': 'baseBlob', 'type': 'ManagementPolicyBaseBlob'}, + 'snapshot': {'key': 'snapshot', 'type': 'ManagementPolicySnapShot'}, + } + + def __init__(self, *, base_blob=None, snapshot=None, **kwargs) -> None: + super(ManagementPolicyAction, self).__init__(**kwargs) + self.base_blob = base_blob + self.snapshot = snapshot diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_base_blob.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_base_blob.py new file mode 100644 index 000000000000..654c61d4e0b8 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_base_blob.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyBaseBlob(Model): + """Management policy action for base blob. + + :param tier_to_cool: The function to tier blobs to cool storage. Support + blobs currently at Hot tier + :type tier_to_cool: + ~azure.mgmt.storage.v2018_11_01.models.DateAfterModification + :param tier_to_archive: The function to tier blobs to archive storage. + Support blobs currently at Hot or Cool tier + :type tier_to_archive: + ~azure.mgmt.storage.v2018_11_01.models.DateAfterModification + :param delete: The function to delete the blob + :type delete: ~azure.mgmt.storage.v2018_11_01.models.DateAfterModification + """ + + _attribute_map = { + 'tier_to_cool': {'key': 'tierToCool', 'type': 'DateAfterModification'}, + 'tier_to_archive': {'key': 'tierToArchive', 'type': 'DateAfterModification'}, + 'delete': {'key': 'delete', 'type': 'DateAfterModification'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicyBaseBlob, self).__init__(**kwargs) + self.tier_to_cool = kwargs.get('tier_to_cool', None) + self.tier_to_archive = kwargs.get('tier_to_archive', None) + self.delete = kwargs.get('delete', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_base_blob_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_base_blob_py3.py new file mode 100644 index 000000000000..a0b75fd7bc33 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_base_blob_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyBaseBlob(Model): + """Management policy action for base blob. + + :param tier_to_cool: The function to tier blobs to cool storage. Support + blobs currently at Hot tier + :type tier_to_cool: + ~azure.mgmt.storage.v2018_11_01.models.DateAfterModification + :param tier_to_archive: The function to tier blobs to archive storage. + Support blobs currently at Hot or Cool tier + :type tier_to_archive: + ~azure.mgmt.storage.v2018_11_01.models.DateAfterModification + :param delete: The function to delete the blob + :type delete: ~azure.mgmt.storage.v2018_11_01.models.DateAfterModification + """ + + _attribute_map = { + 'tier_to_cool': {'key': 'tierToCool', 'type': 'DateAfterModification'}, + 'tier_to_archive': {'key': 'tierToArchive', 'type': 'DateAfterModification'}, + 'delete': {'key': 'delete', 'type': 'DateAfterModification'}, + } + + def __init__(self, *, tier_to_cool=None, tier_to_archive=None, delete=None, **kwargs) -> None: + super(ManagementPolicyBaseBlob, self).__init__(**kwargs) + self.tier_to_cool = tier_to_cool + self.tier_to_archive = tier_to_archive + self.delete = delete diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_definition.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_definition.py new file mode 100644 index 000000000000..13b49bba5253 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_definition.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyDefinition(Model): + """An object that defines the Lifecycle rule. Each definition is made up with + a filters set and an actions set. + + All required parameters must be populated in order to send to Azure. + + :param actions: Required. An object that defines the action set. + :type actions: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyAction + :param filters: An object that defines the filter set. + :type filters: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyFilter + """ + + _validation = { + 'actions': {'required': True}, + } + + _attribute_map = { + 'actions': {'key': 'actions', 'type': 'ManagementPolicyAction'}, + 'filters': {'key': 'filters', 'type': 'ManagementPolicyFilter'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicyDefinition, self).__init__(**kwargs) + self.actions = kwargs.get('actions', None) + self.filters = kwargs.get('filters', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_definition_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_definition_py3.py new file mode 100644 index 000000000000..82ad4df00979 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_definition_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyDefinition(Model): + """An object that defines the Lifecycle rule. Each definition is made up with + a filters set and an actions set. + + All required parameters must be populated in order to send to Azure. + + :param actions: Required. An object that defines the action set. + :type actions: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyAction + :param filters: An object that defines the filter set. + :type filters: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyFilter + """ + + _validation = { + 'actions': {'required': True}, + } + + _attribute_map = { + 'actions': {'key': 'actions', 'type': 'ManagementPolicyAction'}, + 'filters': {'key': 'filters', 'type': 'ManagementPolicyFilter'}, + } + + def __init__(self, *, actions, filters=None, **kwargs) -> None: + super(ManagementPolicyDefinition, self).__init__(**kwargs) + self.actions = actions + self.filters = filters diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_filter.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_filter.py new file mode 100644 index 000000000000..29a7cadc9444 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_filter.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyFilter(Model): + """Filters limit rule actions to a subset of blobs within the storage account. + If multiple filters are defined, a logical AND is performed on all filters. + . + + All required parameters must be populated in order to send to Azure. + + :param prefix_match: An array of strings for prefixes to be match. + :type prefix_match: list[str] + :param blob_types: Required. An array of predefined enum values. Only + blockBlob is supported. + :type blob_types: list[str] + """ + + _validation = { + 'blob_types': {'required': True}, + } + + _attribute_map = { + 'prefix_match': {'key': 'prefixMatch', 'type': '[str]'}, + 'blob_types': {'key': 'blobTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicyFilter, self).__init__(**kwargs) + self.prefix_match = kwargs.get('prefix_match', None) + self.blob_types = kwargs.get('blob_types', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_filter_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_filter_py3.py new file mode 100644 index 000000000000..2bf8d03ca66f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_filter_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyFilter(Model): + """Filters limit rule actions to a subset of blobs within the storage account. + If multiple filters are defined, a logical AND is performed on all filters. + . + + All required parameters must be populated in order to send to Azure. + + :param prefix_match: An array of strings for prefixes to be match. + :type prefix_match: list[str] + :param blob_types: Required. An array of predefined enum values. Only + blockBlob is supported. + :type blob_types: list[str] + """ + + _validation = { + 'blob_types': {'required': True}, + } + + _attribute_map = { + 'prefix_match': {'key': 'prefixMatch', 'type': '[str]'}, + 'blob_types': {'key': 'blobTypes', 'type': '[str]'}, + } + + def __init__(self, *, blob_types, prefix_match=None, **kwargs) -> None: + super(ManagementPolicyFilter, self).__init__(**kwargs) + self.prefix_match = prefix_match + self.blob_types = blob_types diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_py3.py new file mode 100644 index 000000000000..a166189ad1ca --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ManagementPolicy(Resource): + """The Get Storage Account ManagementPolicies operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar last_modified_time: Returns the date and time the ManagementPolicies + was last modified. + :vartype last_modified_time: datetime + :param policy: Required. The Storage Account ManagementPolicy, in JSON + format. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicySchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'policy': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'policy': {'key': 'properties.policy', 'type': 'ManagementPolicySchema'}, + } + + def __init__(self, *, policy, **kwargs) -> None: + super(ManagementPolicy, self).__init__(**kwargs) + self.last_modified_time = None + self.policy = policy diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_rule.py new file mode 100644 index 000000000000..088484b19856 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_rule.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyRule(Model): + """An object that wraps the Lifecycle rule. Each rule is uniquely defined by + name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Rule is enabled if set to true. + :type enabled: bool + :param name: Required. A rule name can contain any combination of alpha + numeric characters. Rule name is case-sensitive. It must be unique within + a policy. + :type name: str + :ivar type: Required. The valid value is Lifecycle. Default value: + "Lifecycle" . + :vartype type: str + :param definition: Required. An object that defines the Lifecycle rule. + :type definition: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyDefinition + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + 'definition': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'definition': {'key': 'definition', 'type': 'ManagementPolicyDefinition'}, + } + + type = "Lifecycle" + + def __init__(self, **kwargs): + super(ManagementPolicyRule, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.name = kwargs.get('name', None) + self.definition = kwargs.get('definition', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_rule_py3.py new file mode 100644 index 000000000000..3466924dd3a9 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_rule_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyRule(Model): + """An object that wraps the Lifecycle rule. Each rule is uniquely defined by + name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Rule is enabled if set to true. + :type enabled: bool + :param name: Required. A rule name can contain any combination of alpha + numeric characters. Rule name is case-sensitive. It must be unique within + a policy. + :type name: str + :ivar type: Required. The valid value is Lifecycle. Default value: + "Lifecycle" . + :vartype type: str + :param definition: Required. An object that defines the Lifecycle rule. + :type definition: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyDefinition + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + 'definition': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'definition': {'key': 'definition', 'type': 'ManagementPolicyDefinition'}, + } + + type = "Lifecycle" + + def __init__(self, *, name: str, definition, enabled: bool=None, **kwargs) -> None: + super(ManagementPolicyRule, self).__init__(**kwargs) + self.enabled = enabled + self.name = name + self.definition = definition diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_schema.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_schema.py new file mode 100644 index 000000000000..f635000a38cd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_schema.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicySchema(Model): + """The Storage Account ManagementPolicies Rules. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + + All required parameters must be populated in order to send to Azure. + + :param rules: Required. The Storage Account ManagementPolicies Rules. See + more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type rules: + list[~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyRule] + """ + + _validation = { + 'rules': {'required': True}, + } + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[ManagementPolicyRule]'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicySchema, self).__init__(**kwargs) + self.rules = kwargs.get('rules', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_schema_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_schema_py3.py new file mode 100644 index 000000000000..05d5f7de477b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_schema_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicySchema(Model): + """The Storage Account ManagementPolicies Rules. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + + All required parameters must be populated in order to send to Azure. + + :param rules: Required. The Storage Account ManagementPolicies Rules. See + more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type rules: + list[~azure.mgmt.storage.v2018_11_01.models.ManagementPolicyRule] + """ + + _validation = { + 'rules': {'required': True}, + } + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[ManagementPolicyRule]'}, + } + + def __init__(self, *, rules, **kwargs) -> None: + super(ManagementPolicySchema, self).__init__(**kwargs) + self.rules = rules diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_snap_shot.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_snap_shot.py new file mode 100644 index 000000000000..ff0fe7972ca7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_snap_shot.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicySnapShot(Model): + """Management policy action for snapshot. + + :param delete: The function to delete the blob snapshot + :type delete: ~azure.mgmt.storage.v2018_11_01.models.DateAfterCreation + """ + + _attribute_map = { + 'delete': {'key': 'delete', 'type': 'DateAfterCreation'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicySnapShot, self).__init__(**kwargs) + self.delete = kwargs.get('delete', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_snap_shot_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_snap_shot_py3.py new file mode 100644 index 000000000000..77f999bcb916 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_snap_shot_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicySnapShot(Model): + """Management policy action for snapshot. + + :param delete: The function to delete the blob snapshot + :type delete: ~azure.mgmt.storage.v2018_11_01.models.DateAfterCreation + """ + + _attribute_map = { + 'delete': {'key': 'delete', 'type': 'DateAfterCreation'}, + } + + def __init__(self, *, delete=None, **kwargs) -> None: + super(ManagementPolicySnapShot, self).__init__(**kwargs) + self.delete = delete diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/metric_specification.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/metric_specification.py new file mode 100644 index 000000000000..e098fcd062e0 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/metric_specification.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricSpecification(Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: Unit could be Bytes or Count. + :type unit: str + :param dimensions: Dimensions of blobs, including blob type and access + tier. + :type dimensions: list[~azure.mgmt.storage.v2018_11_01.models.Dimension] + :param aggregation_type: Aggregation type could be Average. + :type aggregation_type: str + :param fill_gap_with_zero: The property to decide fill gap with zero or + not. + :type fill_gap_with_zero: bool + :param category: The category this metric specification belong to, could + be Capacity. + :type category: str + :param resource_id_dimension_name_override: Account Resource Id. + :type resource_id_dimension_name_override: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.dimensions = kwargs.get('dimensions', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.category = kwargs.get('category', None) + self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/metric_specification_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/metric_specification_py3.py new file mode 100644 index 000000000000..efb5c10ec578 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/metric_specification_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricSpecification(Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: Unit could be Bytes or Count. + :type unit: str + :param dimensions: Dimensions of blobs, including blob type and access + tier. + :type dimensions: list[~azure.mgmt.storage.v2018_11_01.models.Dimension] + :param aggregation_type: Aggregation type could be Average. + :type aggregation_type: str + :param fill_gap_with_zero: The property to decide fill gap with zero or + not. + :type fill_gap_with_zero: bool + :param category: The category this metric specification belong to, could + be Capacity. + :type category: str + :param resource_id_dimension_name_override: Account Resource Id. + :type resource_id_dimension_name_override: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, dimensions=None, aggregation_type: str=None, fill_gap_with_zero: bool=None, category: str=None, resource_id_dimension_name_override: str=None, **kwargs) -> None: + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.dimensions = dimensions + self.aggregation_type = aggregation_type + self.fill_gap_with_zero = fill_gap_with_zero + self.category = category + self.resource_id_dimension_name_override = resource_id_dimension_name_override diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/network_rule_set.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/network_rule_set.py new file mode 100644 index 000000000000..8a8a047e6fce --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/network_rule_set.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """Network rule set. + + All required parameters must be populated in order to send to Azure. + + :param bypass: Specifies whether traffic is bypassed for + Logging/Metrics/AzureServices. Possible values are any combination of + Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None + to bypass none of those traffics. Possible values include: 'None', + 'Logging', 'Metrics', 'AzureServices'. Default value: "AzureServices" . + :type bypass: str or ~azure.mgmt.storage.v2018_11_01.models.Bypass + :param virtual_network_rules: Sets the virtual network rules + :type virtual_network_rules: + list[~azure.mgmt.storage.v2018_11_01.models.VirtualNetworkRule] + :param ip_rules: Sets the IP ACL rules + :type ip_rules: list[~azure.mgmt.storage.v2018_11_01.models.IPRule] + :param default_action: Required. Specifies the default action of allow or + deny when no other rules match. Possible values include: 'Allow', 'Deny'. + Default value: "Allow" . + :type default_action: str or + ~azure.mgmt.storage.v2018_11_01.models.DefaultAction + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + 'default_action': {'key': 'defaultAction', 'type': 'DefaultAction'}, + } + + def __init__(self, **kwargs): + super(NetworkRuleSet, self).__init__(**kwargs) + self.bypass = kwargs.get('bypass', "AzureServices") + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.ip_rules = kwargs.get('ip_rules', None) + self.default_action = kwargs.get('default_action', "Allow") diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/network_rule_set_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/network_rule_set_py3.py new file mode 100644 index 000000000000..066e419e0974 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/network_rule_set_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """Network rule set. + + All required parameters must be populated in order to send to Azure. + + :param bypass: Specifies whether traffic is bypassed for + Logging/Metrics/AzureServices. Possible values are any combination of + Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None + to bypass none of those traffics. Possible values include: 'None', + 'Logging', 'Metrics', 'AzureServices'. Default value: "AzureServices" . + :type bypass: str or ~azure.mgmt.storage.v2018_11_01.models.Bypass + :param virtual_network_rules: Sets the virtual network rules + :type virtual_network_rules: + list[~azure.mgmt.storage.v2018_11_01.models.VirtualNetworkRule] + :param ip_rules: Sets the IP ACL rules + :type ip_rules: list[~azure.mgmt.storage.v2018_11_01.models.IPRule] + :param default_action: Required. Specifies the default action of allow or + deny when no other rules match. Possible values include: 'Allow', 'Deny'. + Default value: "Allow" . + :type default_action: str or + ~azure.mgmt.storage.v2018_11_01.models.DefaultAction + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + 'default_action': {'key': 'defaultAction', 'type': 'DefaultAction'}, + } + + def __init__(self, *, bypass="AzureServices", virtual_network_rules=None, ip_rules=None, default_action="Allow", **kwargs) -> None: + super(NetworkRuleSet, self).__init__(**kwargs) + self.bypass = bypass + self.virtual_network_rules = virtual_network_rules + self.ip_rules = ip_rules + self.default_action = default_action diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation.py new file mode 100644 index 000000000000..5d383ee929ef --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Storage REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.storage.v2018_11_01.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param service_specification: One property of operation, include metric + specifications. + :type service_specification: + ~azure.mgmt.storage.v2018_11_01.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.service_specification = kwargs.get('service_specification', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_display.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_display.py new file mode 100644 index 000000000000..029cfa2a8304 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_display.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Storage. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_display_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_display_py3.py new file mode 100644 index 000000000000..318ba2236d3e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_display_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Storage. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_paged.py new file mode 100644 index 000000000000..7c8486fec41f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_py3.py new file mode 100644 index 000000000000..41bf2e9d01eb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/operation_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Storage REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.storage.v2018_11_01.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param service_specification: One property of operation, include metric + specifications. + :type service_specification: + ~azure.mgmt.storage.v2018_11_01.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, service_specification=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.service_specification = service_specification diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/proxy_resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/proxy_resource.py new file mode 100644 index 000000000000..0de8fb6bd420 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/proxy_resource.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/proxy_resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/proxy_resource_py3.py new file mode 100644 index 000000000000..2e8391f912d6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/proxy_resource_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/resource.py new file mode 100644 index 000000000000..9333a2ac49ef --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/resource.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/resource_py3.py new file mode 100644 index 000000000000..370e6c506581 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/resource_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/restriction.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/restriction.py new file mode 100644 index 000000000000..7df1b4c2fbca --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/restriction.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Restriction(Model): + """The restriction because of which SKU cannot be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. As of now only possible value for + this is location. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :param reason_code: The reason for the restriction. As of now this can be + "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU + has requiredQuotas parameter as the subscription does not belong to that + quota. The "NotAvailableForSubscription" is related to capacity at DC. + Possible values include: 'QuotaId', 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.storage.v2018_11_01.models.ReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Restriction, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = kwargs.get('reason_code', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/restriction_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/restriction_py3.py new file mode 100644 index 000000000000..cb0b5268db76 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/restriction_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Restriction(Model): + """The restriction because of which SKU cannot be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. As of now only possible value for + this is location. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :param reason_code: The reason for the restriction. As of now this can be + "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU + has requiredQuotas parameter as the subscription does not belong to that + quota. The "NotAvailableForSubscription" is related to capacity at DC. + Possible values include: 'QuotaId', 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.storage.v2018_11_01.models.ReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, *, reason_code=None, **kwargs) -> None: + super(Restriction, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = reason_code diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_sas_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_sas_parameters.py new file mode 100644 index 000000000000..e9d17f216351 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_sas_parameters.py @@ -0,0 +1,120 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSasParameters(Model): + """The parameters to list service SAS credentials of a specific resource. + + All required parameters must be populated in order to send to Azure. + + :param canonicalized_resource: Required. The canonical path to the signed + resource. + :type canonicalized_resource: str + :param resource: The signed services accessible with the service SAS. + Possible values include: Blob (b), Container (c), File (f), Share (s). + Possible values include: 'b', 'c', 'f', 's' + :type resource: str or + ~azure.mgmt.storage.v2018_11_01.models.SignedResource + :param permissions: The signed permissions for the service SAS. Possible + values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create + (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', + 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2018_11_01.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2018_11_01.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: The time at which the shared access + signature becomes invalid. + :type shared_access_expiry_time: datetime + :param identifier: A unique value up to 64 characters in length that + correlates to an access policy specified for the container, queue, or + table. + :type identifier: str + :param partition_key_start: The start of partition key. + :type partition_key_start: str + :param partition_key_end: The end of partition key. + :type partition_key_end: str + :param row_key_start: The start of row key. + :type row_key_start: str + :param row_key_end: The end of row key. + :type row_key_end: str + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + :param cache_control: The response header override for cache control. + :type cache_control: str + :param content_disposition: The response header override for content + disposition. + :type content_disposition: str + :param content_encoding: The response header override for content + encoding. + :type content_encoding: str + :param content_language: The response header override for content + language. + :type content_language: str + :param content_type: The response header override for content type. + :type content_type: str + """ + + _validation = { + 'canonicalized_resource': {'required': True}, + 'identifier': {'max_length': 64}, + } + + _attribute_map = { + 'canonicalized_resource': {'key': 'canonicalizedResource', 'type': 'str'}, + 'resource': {'key': 'signedResource', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'identifier': {'key': 'signedIdentifier', 'type': 'str'}, + 'partition_key_start': {'key': 'startPk', 'type': 'str'}, + 'partition_key_end': {'key': 'endPk', 'type': 'str'}, + 'row_key_start': {'key': 'startRk', 'type': 'str'}, + 'row_key_end': {'key': 'endRk', 'type': 'str'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + 'cache_control': {'key': 'rscc', 'type': 'str'}, + 'content_disposition': {'key': 'rscd', 'type': 'str'}, + 'content_encoding': {'key': 'rsce', 'type': 'str'}, + 'content_language': {'key': 'rscl', 'type': 'str'}, + 'content_type': {'key': 'rsct', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceSasParameters, self).__init__(**kwargs) + self.canonicalized_resource = kwargs.get('canonicalized_resource', None) + self.resource = kwargs.get('resource', None) + self.permissions = kwargs.get('permissions', None) + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) + self.protocols = kwargs.get('protocols', None) + self.shared_access_start_time = kwargs.get('shared_access_start_time', None) + self.shared_access_expiry_time = kwargs.get('shared_access_expiry_time', None) + self.identifier = kwargs.get('identifier', None) + self.partition_key_start = kwargs.get('partition_key_start', None) + self.partition_key_end = kwargs.get('partition_key_end', None) + self.row_key_start = kwargs.get('row_key_start', None) + self.row_key_end = kwargs.get('row_key_end', None) + self.key_to_sign = kwargs.get('key_to_sign', None) + self.cache_control = kwargs.get('cache_control', None) + self.content_disposition = kwargs.get('content_disposition', None) + self.content_encoding = kwargs.get('content_encoding', None) + self.content_language = kwargs.get('content_language', None) + self.content_type = kwargs.get('content_type', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_sas_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_sas_parameters_py3.py new file mode 100644 index 000000000000..3d4153d05d52 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_sas_parameters_py3.py @@ -0,0 +1,120 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSasParameters(Model): + """The parameters to list service SAS credentials of a specific resource. + + All required parameters must be populated in order to send to Azure. + + :param canonicalized_resource: Required. The canonical path to the signed + resource. + :type canonicalized_resource: str + :param resource: The signed services accessible with the service SAS. + Possible values include: Blob (b), Container (c), File (f), Share (s). + Possible values include: 'b', 'c', 'f', 's' + :type resource: str or + ~azure.mgmt.storage.v2018_11_01.models.SignedResource + :param permissions: The signed permissions for the service SAS. Possible + values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create + (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', + 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2018_11_01.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2018_11_01.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: The time at which the shared access + signature becomes invalid. + :type shared_access_expiry_time: datetime + :param identifier: A unique value up to 64 characters in length that + correlates to an access policy specified for the container, queue, or + table. + :type identifier: str + :param partition_key_start: The start of partition key. + :type partition_key_start: str + :param partition_key_end: The end of partition key. + :type partition_key_end: str + :param row_key_start: The start of row key. + :type row_key_start: str + :param row_key_end: The end of row key. + :type row_key_end: str + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + :param cache_control: The response header override for cache control. + :type cache_control: str + :param content_disposition: The response header override for content + disposition. + :type content_disposition: str + :param content_encoding: The response header override for content + encoding. + :type content_encoding: str + :param content_language: The response header override for content + language. + :type content_language: str + :param content_type: The response header override for content type. + :type content_type: str + """ + + _validation = { + 'canonicalized_resource': {'required': True}, + 'identifier': {'max_length': 64}, + } + + _attribute_map = { + 'canonicalized_resource': {'key': 'canonicalizedResource', 'type': 'str'}, + 'resource': {'key': 'signedResource', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'identifier': {'key': 'signedIdentifier', 'type': 'str'}, + 'partition_key_start': {'key': 'startPk', 'type': 'str'}, + 'partition_key_end': {'key': 'endPk', 'type': 'str'}, + 'row_key_start': {'key': 'startRk', 'type': 'str'}, + 'row_key_end': {'key': 'endRk', 'type': 'str'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + 'cache_control': {'key': 'rscc', 'type': 'str'}, + 'content_disposition': {'key': 'rscd', 'type': 'str'}, + 'content_encoding': {'key': 'rsce', 'type': 'str'}, + 'content_language': {'key': 'rscl', 'type': 'str'}, + 'content_type': {'key': 'rsct', 'type': 'str'}, + } + + def __init__(self, *, canonicalized_resource: str, resource=None, permissions=None, ip_address_or_range: str=None, protocols=None, shared_access_start_time=None, shared_access_expiry_time=None, identifier: str=None, partition_key_start: str=None, partition_key_end: str=None, row_key_start: str=None, row_key_end: str=None, key_to_sign: str=None, cache_control: str=None, content_disposition: str=None, content_encoding: str=None, content_language: str=None, content_type: str=None, **kwargs) -> None: + super(ServiceSasParameters, self).__init__(**kwargs) + self.canonicalized_resource = canonicalized_resource + self.resource = resource + self.permissions = permissions + self.ip_address_or_range = ip_address_or_range + self.protocols = protocols + self.shared_access_start_time = shared_access_start_time + self.shared_access_expiry_time = shared_access_expiry_time + self.identifier = identifier + self.partition_key_start = partition_key_start + self.partition_key_end = partition_key_end + self.row_key_start = row_key_start + self.row_key_end = row_key_end + self.key_to_sign = key_to_sign + self.cache_control = cache_control + self.content_disposition = content_disposition + self.content_encoding = content_encoding + self.content_language = content_language + self.content_type = content_type diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_specification.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_specification.py new file mode 100644 index 000000000000..c6c2b4158989 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_specification.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSpecification(Model): + """One property of operation, include metric specifications. + + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.storage.v2018_11_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_specification_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_specification_py3.py new file mode 100644 index 000000000000..c6b966f02ca0 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/service_specification_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSpecification(Model): + """One property of operation, include metric specifications. + + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.storage.v2018_11_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku.py new file mode 100644 index 000000000000..94f0f529af62 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The SKU of the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the SKU name. Required for account + creation; optional for update. Note that in older versions, SKU name was + called accountType. Possible values include: 'Standard_LRS', + 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', + 'Premium_ZRS' + :type name: str or ~azure.mgmt.storage.v2018_11_01.models.SkuName + :ivar tier: Gets the SKU tier. This is based on the SKU name. Possible + values include: 'Standard', 'Premium' + :vartype tier: str or ~azure.mgmt.storage.v2018_11_01.models.SkuTier + :ivar resource_type: The type of the resource, usually it is + 'storageAccounts'. + :vartype resource_type: str + :ivar kind: Indicates the type of storage account. Possible values + include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', + 'BlockBlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2018_11_01.models.Kind + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar capabilities: The capability information in the specified SKU, + including file encryption, network ACLs, change notification, etc. + :vartype capabilities: + list[~azure.mgmt.storage.v2018_11_01.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.storage.v2018_11_01.models.Restriction] + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + self.resource_type = None + self.kind = None + self.locations = None + self.capabilities = None + self.restrictions = kwargs.get('restrictions', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_capability.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_capability.py new file mode 100644 index 000000000000..3f27b5e45feb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_capability.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SKUCapability(Model): + """The capability information in the specified SKU, including file encryption, + network ACLs, change notification, etc. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of capability, The capability information in the + specified SKU, including file encryption, network ACLs, change + notification, etc. + :vartype name: str + :ivar value: A string value to indicate states of given capability. + Possibly 'true' or 'false'. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SKUCapability, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_capability_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_capability_py3.py new file mode 100644 index 000000000000..5bc3628f2173 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_capability_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SKUCapability(Model): + """The capability information in the specified SKU, including file encryption, + network ACLs, change notification, etc. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of capability, The capability information in the + specified SKU, including file encryption, network ACLs, change + notification, etc. + :vartype name: str + :ivar value: A string value to indicate states of given capability. + Possibly 'true' or 'false'. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SKUCapability, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_paged.py new file mode 100644 index 000000000000..7e55aaef69d8 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class SkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`Sku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Sku]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_py3.py new file mode 100644 index 000000000000..c5d7159eccad --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/sku_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The SKU of the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the SKU name. Required for account + creation; optional for update. Note that in older versions, SKU name was + called accountType. Possible values include: 'Standard_LRS', + 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', + 'Premium_ZRS' + :type name: str or ~azure.mgmt.storage.v2018_11_01.models.SkuName + :ivar tier: Gets the SKU tier. This is based on the SKU name. Possible + values include: 'Standard', 'Premium' + :vartype tier: str or ~azure.mgmt.storage.v2018_11_01.models.SkuTier + :ivar resource_type: The type of the resource, usually it is + 'storageAccounts'. + :vartype resource_type: str + :ivar kind: Indicates the type of storage account. Possible values + include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', + 'BlockBlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2018_11_01.models.Kind + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar capabilities: The capability information in the specified SKU, + including file encryption, network ACLs, change notification, etc. + :vartype capabilities: + list[~azure.mgmt.storage.v2018_11_01.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.storage.v2018_11_01.models.Restriction] + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, *, name, restrictions=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None + self.resource_type = None + self.kind = None + self.locations = None + self.capabilities = None + self.restrictions = restrictions diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account.py new file mode 100644 index 000000000000..18963a089c43 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account.py @@ -0,0 +1,191 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class StorageAccount(TrackedResource): + """The storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :ivar sku: Gets the SKU. + :vartype sku: ~azure.mgmt.storage.v2018_11_01.models.Sku + :ivar kind: Gets the Kind. Possible values include: 'Storage', + 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2018_11_01.models.Kind + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_11_01.models.Identity + :ivar provisioning_state: Gets the status of the storage account at the + time the operation was called. Possible values include: 'Creating', + 'ResolvingDNS', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.storage.v2018_11_01.models.ProvisioningState + :ivar primary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object. Note that Standard_ZRS + and Premium_LRS accounts only return the blob endpoint. + :vartype primary_endpoints: + ~azure.mgmt.storage.v2018_11_01.models.Endpoints + :ivar primary_location: Gets the location of the primary data center for + the storage account. + :vartype primary_location: str + :ivar status_of_primary: Gets the status indicating whether the primary + location of the storage account is available or unavailable. Possible + values include: 'available', 'unavailable' + :vartype status_of_primary: str or + ~azure.mgmt.storage.v2018_11_01.models.AccountStatus + :ivar last_geo_failover_time: Gets the timestamp of the most recent + instance of a failover to the secondary location. Only the most recent + timestamp is retained. This element is not returned if there has never + been a failover instance. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype last_geo_failover_time: datetime + :ivar secondary_location: Gets the location of the geo-replicated + secondary for the storage account. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype secondary_location: str + :ivar status_of_secondary: Gets the status indicating whether the + secondary location of the storage account is available or unavailable. + Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible + values include: 'available', 'unavailable' + :vartype status_of_secondary: str or + ~azure.mgmt.storage.v2018_11_01.models.AccountStatus + :ivar creation_time: Gets the creation date and time of the storage + account in UTC. + :vartype creation_time: datetime + :ivar custom_domain: Gets the custom domain the user assigned to this + storage account. + :vartype custom_domain: + ~azure.mgmt.storage.v2018_11_01.models.CustomDomain + :ivar secondary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object from the secondary + location of the storage account. Only available if the SKU name is + Standard_RAGRS. + :vartype secondary_endpoints: + ~azure.mgmt.storage.v2018_11_01.models.Endpoints + :ivar encryption: Gets the encryption settings on the account. If + unspecified, the account is unencrypted. + :vartype encryption: ~azure.mgmt.storage.v2018_11_01.models.Encryption + :ivar access_tier: Required for storage accounts where kind = BlobStorage. + The access tier used for billing. Possible values include: 'Hot', 'Cool' + :vartype access_tier: str or + ~azure.mgmt.storage.v2018_11_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :ivar network_rule_set: Network rule set + :vartype network_rule_set: + ~azure.mgmt.storage.v2018_11_01.models.NetworkRuleSet + :param is_hns_enabled: Account HierarchicalNamespace enabled if sets to + true. + :type is_hns_enabled: bool + :ivar geo_replication_stats: Geo Replication Stats + :vartype geo_replication_stats: + ~azure.mgmt.storage.v2018_11_01.models.GeoReplicationStats + :ivar failover_in_progress: If the failover is in progress, the value will + be true, otherwise, it will be null. + :vartype failover_in_progress: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'readonly': True}, + 'kind': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'primary_endpoints': {'readonly': True}, + 'primary_location': {'readonly': True}, + 'status_of_primary': {'readonly': True}, + 'last_geo_failover_time': {'readonly': True}, + 'secondary_location': {'readonly': True}, + 'status_of_secondary': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'custom_domain': {'readonly': True}, + 'secondary_endpoints': {'readonly': True}, + 'encryption': {'readonly': True}, + 'access_tier': {'readonly': True}, + 'network_rule_set': {'readonly': True}, + 'geo_replication_stats': {'readonly': True}, + 'failover_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'primary_endpoints': {'key': 'properties.primaryEndpoints', 'type': 'Endpoints'}, + 'primary_location': {'key': 'properties.primaryLocation', 'type': 'str'}, + 'status_of_primary': {'key': 'properties.statusOfPrimary', 'type': 'AccountStatus'}, + 'last_geo_failover_time': {'key': 'properties.lastGeoFailoverTime', 'type': 'iso-8601'}, + 'secondary_location': {'key': 'properties.secondaryLocation', 'type': 'str'}, + 'status_of_secondary': {'key': 'properties.statusOfSecondary', 'type': 'AccountStatus'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'secondary_endpoints': {'key': 'properties.secondaryEndpoints', 'type': 'Endpoints'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'is_hns_enabled': {'key': 'properties.isHnsEnabled', 'type': 'bool'}, + 'geo_replication_stats': {'key': 'properties.geoReplicationStats', 'type': 'GeoReplicationStats'}, + 'failover_in_progress': {'key': 'properties.failoverInProgress', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.sku = None + self.kind = None + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.primary_endpoints = None + self.primary_location = None + self.status_of_primary = None + self.last_geo_failover_time = None + self.secondary_location = None + self.status_of_secondary = None + self.creation_time = None + self.custom_domain = None + self.secondary_endpoints = None + self.encryption = None + self.access_tier = None + self.enable_azure_files_aad_integration = kwargs.get('enable_azure_files_aad_integration', None) + self.enable_https_traffic_only = kwargs.get('enable_https_traffic_only', None) + self.network_rule_set = None + self.is_hns_enabled = kwargs.get('is_hns_enabled', None) + self.geo_replication_stats = None + self.failover_in_progress = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_check_name_availability_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_check_name_availability_parameters.py new file mode 100644 index 000000000000..dbe41bb2c6b1 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_check_name_availability_parameters.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCheckNameAvailabilityParameters(Model): + """The parameters used to check the availability of the storage account name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The storage account name. + :type name: str + :ivar type: Required. The type of resource, + Microsoft.Storage/storageAccounts. Default value: + "Microsoft.Storage/storageAccounts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Storage/storageAccounts" + + def __init__(self, **kwargs): + super(StorageAccountCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_check_name_availability_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_check_name_availability_parameters_py3.py new file mode 100644 index 000000000000..8d2b031e2284 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_check_name_availability_parameters_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCheckNameAvailabilityParameters(Model): + """The parameters used to check the availability of the storage account name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The storage account name. + :type name: str + :ivar type: Required. The type of resource, + Microsoft.Storage/storageAccounts. Default value: + "Microsoft.Storage/storageAccounts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Storage/storageAccounts" + + def __init__(self, *, name: str, **kwargs) -> None: + super(StorageAccountCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_create_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_create_parameters.py new file mode 100644 index 000000000000..30dab530cd16 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_create_parameters.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCreateParameters(Model): + """The parameters used when creating a storage account. + + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the SKU name. + :type sku: ~azure.mgmt.storage.v2018_11_01.models.Sku + :param kind: Required. Required. Indicates the type of storage account. + Possible values include: 'Storage', 'StorageV2', 'BlobStorage', + 'FileStorage', 'BlockBlobStorage' + :type kind: str or ~azure.mgmt.storage.v2018_11_01.models.Kind + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_11_01.models.Identity + :param custom_domain: User domain assigned to the storage account. Name is + the CNAME source. Only one custom domain is supported per storage account + at this time. To clear the existing custom domain, use an empty string for + the custom domain name property. + :type custom_domain: ~azure.mgmt.storage.v2018_11_01.models.CustomDomain + :param encryption: Provides the encryption settings on the account. If + left unspecified the account encryption settings will remain the same. The + default setting is unencrypted. + :type encryption: ~azure.mgmt.storage.v2018_11_01.models.Encryption + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2018_11_01.models.NetworkRuleSet + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2018_11_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :param is_hns_enabled: Account HierarchicalNamespace enabled if sets to + true. + :type is_hns_enabled: bool + """ + + _validation = { + 'sku': {'required': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'is_hns_enabled': {'key': 'properties.isHnsEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StorageAccountCreateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.custom_domain = kwargs.get('custom_domain', None) + self.encryption = kwargs.get('encryption', None) + self.network_rule_set = kwargs.get('network_rule_set', None) + self.access_tier = kwargs.get('access_tier', None) + self.enable_azure_files_aad_integration = kwargs.get('enable_azure_files_aad_integration', None) + self.enable_https_traffic_only = kwargs.get('enable_https_traffic_only', None) + self.is_hns_enabled = kwargs.get('is_hns_enabled', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_create_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_create_parameters_py3.py new file mode 100644 index 000000000000..1f87d41668ca --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_create_parameters_py3.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCreateParameters(Model): + """The parameters used when creating a storage account. + + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the SKU name. + :type sku: ~azure.mgmt.storage.v2018_11_01.models.Sku + :param kind: Required. Required. Indicates the type of storage account. + Possible values include: 'Storage', 'StorageV2', 'BlobStorage', + 'FileStorage', 'BlockBlobStorage' + :type kind: str or ~azure.mgmt.storage.v2018_11_01.models.Kind + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_11_01.models.Identity + :param custom_domain: User domain assigned to the storage account. Name is + the CNAME source. Only one custom domain is supported per storage account + at this time. To clear the existing custom domain, use an empty string for + the custom domain name property. + :type custom_domain: ~azure.mgmt.storage.v2018_11_01.models.CustomDomain + :param encryption: Provides the encryption settings on the account. If + left unspecified the account encryption settings will remain the same. The + default setting is unencrypted. + :type encryption: ~azure.mgmt.storage.v2018_11_01.models.Encryption + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2018_11_01.models.NetworkRuleSet + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2018_11_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :param is_hns_enabled: Account HierarchicalNamespace enabled if sets to + true. + :type is_hns_enabled: bool + """ + + _validation = { + 'sku': {'required': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'is_hns_enabled': {'key': 'properties.isHnsEnabled', 'type': 'bool'}, + } + + def __init__(self, *, sku, kind, location: str, tags=None, identity=None, custom_domain=None, encryption=None, network_rule_set=None, access_tier=None, enable_azure_files_aad_integration: bool=None, enable_https_traffic_only: bool=None, is_hns_enabled: bool=None, **kwargs) -> None: + super(StorageAccountCreateParameters, self).__init__(**kwargs) + self.sku = sku + self.kind = kind + self.location = location + self.tags = tags + self.identity = identity + self.custom_domain = custom_domain + self.encryption = encryption + self.network_rule_set = network_rule_set + self.access_tier = access_tier + self.enable_azure_files_aad_integration = enable_azure_files_aad_integration + self.enable_https_traffic_only = enable_https_traffic_only + self.is_hns_enabled = is_hns_enabled diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_key.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_key.py new file mode 100644 index 000000000000..8a4e14e4a9b4 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_key.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountKey(Model): + """An access key for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key_name: Name of the key. + :vartype key_name: str + :ivar value: Base 64-encoded value of the key. + :vartype value: str + :ivar permissions: Permissions for the key -- read-only or full + permissions. Possible values include: 'Read', 'Full' + :vartype permissions: str or + ~azure.mgmt.storage.v2018_11_01.models.KeyPermission + """ + + _validation = { + 'key_name': {'readonly': True}, + 'value': {'readonly': True}, + 'permissions': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'KeyPermission'}, + } + + def __init__(self, **kwargs): + super(StorageAccountKey, self).__init__(**kwargs) + self.key_name = None + self.value = None + self.permissions = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_key_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_key_py3.py new file mode 100644 index 000000000000..451bd80abab7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_key_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountKey(Model): + """An access key for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key_name: Name of the key. + :vartype key_name: str + :ivar value: Base 64-encoded value of the key. + :vartype value: str + :ivar permissions: Permissions for the key -- read-only or full + permissions. Possible values include: 'Read', 'Full' + :vartype permissions: str or + ~azure.mgmt.storage.v2018_11_01.models.KeyPermission + """ + + _validation = { + 'key_name': {'readonly': True}, + 'value': {'readonly': True}, + 'permissions': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'KeyPermission'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageAccountKey, self).__init__(**kwargs) + self.key_name = None + self.value = None + self.permissions = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_list_keys_result.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_list_keys_result.py new file mode 100644 index 000000000000..c0f7223b7db4 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_list_keys_result.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountListKeysResult(Model): + """The response from the ListKeys operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar keys: Gets the list of storage account keys and their properties for + the specified storage account. + :vartype keys: + list[~azure.mgmt.storage.v2018_11_01.models.StorageAccountKey] + """ + + _validation = { + 'keys': {'readonly': True}, + } + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[StorageAccountKey]'}, + } + + def __init__(self, **kwargs): + super(StorageAccountListKeysResult, self).__init__(**kwargs) + self.keys = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_list_keys_result_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_list_keys_result_py3.py new file mode 100644 index 000000000000..7fdf1fcbc171 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_list_keys_result_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountListKeysResult(Model): + """The response from the ListKeys operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar keys: Gets the list of storage account keys and their properties for + the specified storage account. + :vartype keys: + list[~azure.mgmt.storage.v2018_11_01.models.StorageAccountKey] + """ + + _validation = { + 'keys': {'readonly': True}, + } + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[StorageAccountKey]'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageAccountListKeysResult, self).__init__(**kwargs) + self.keys = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_paged.py new file mode 100644 index 000000000000..853e0053b992 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class StorageAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageAccountPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_py3.py new file mode 100644 index 000000000000..d026cb6fc66b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_py3.py @@ -0,0 +1,191 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class StorageAccount(TrackedResource): + """The storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :ivar sku: Gets the SKU. + :vartype sku: ~azure.mgmt.storage.v2018_11_01.models.Sku + :ivar kind: Gets the Kind. Possible values include: 'Storage', + 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2018_11_01.models.Kind + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_11_01.models.Identity + :ivar provisioning_state: Gets the status of the storage account at the + time the operation was called. Possible values include: 'Creating', + 'ResolvingDNS', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.storage.v2018_11_01.models.ProvisioningState + :ivar primary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object. Note that Standard_ZRS + and Premium_LRS accounts only return the blob endpoint. + :vartype primary_endpoints: + ~azure.mgmt.storage.v2018_11_01.models.Endpoints + :ivar primary_location: Gets the location of the primary data center for + the storage account. + :vartype primary_location: str + :ivar status_of_primary: Gets the status indicating whether the primary + location of the storage account is available or unavailable. Possible + values include: 'available', 'unavailable' + :vartype status_of_primary: str or + ~azure.mgmt.storage.v2018_11_01.models.AccountStatus + :ivar last_geo_failover_time: Gets the timestamp of the most recent + instance of a failover to the secondary location. Only the most recent + timestamp is retained. This element is not returned if there has never + been a failover instance. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype last_geo_failover_time: datetime + :ivar secondary_location: Gets the location of the geo-replicated + secondary for the storage account. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype secondary_location: str + :ivar status_of_secondary: Gets the status indicating whether the + secondary location of the storage account is available or unavailable. + Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible + values include: 'available', 'unavailable' + :vartype status_of_secondary: str or + ~azure.mgmt.storage.v2018_11_01.models.AccountStatus + :ivar creation_time: Gets the creation date and time of the storage + account in UTC. + :vartype creation_time: datetime + :ivar custom_domain: Gets the custom domain the user assigned to this + storage account. + :vartype custom_domain: + ~azure.mgmt.storage.v2018_11_01.models.CustomDomain + :ivar secondary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object from the secondary + location of the storage account. Only available if the SKU name is + Standard_RAGRS. + :vartype secondary_endpoints: + ~azure.mgmt.storage.v2018_11_01.models.Endpoints + :ivar encryption: Gets the encryption settings on the account. If + unspecified, the account is unencrypted. + :vartype encryption: ~azure.mgmt.storage.v2018_11_01.models.Encryption + :ivar access_tier: Required for storage accounts where kind = BlobStorage. + The access tier used for billing. Possible values include: 'Hot', 'Cool' + :vartype access_tier: str or + ~azure.mgmt.storage.v2018_11_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :ivar network_rule_set: Network rule set + :vartype network_rule_set: + ~azure.mgmt.storage.v2018_11_01.models.NetworkRuleSet + :param is_hns_enabled: Account HierarchicalNamespace enabled if sets to + true. + :type is_hns_enabled: bool + :ivar geo_replication_stats: Geo Replication Stats + :vartype geo_replication_stats: + ~azure.mgmt.storage.v2018_11_01.models.GeoReplicationStats + :ivar failover_in_progress: If the failover is in progress, the value will + be true, otherwise, it will be null. + :vartype failover_in_progress: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'readonly': True}, + 'kind': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'primary_endpoints': {'readonly': True}, + 'primary_location': {'readonly': True}, + 'status_of_primary': {'readonly': True}, + 'last_geo_failover_time': {'readonly': True}, + 'secondary_location': {'readonly': True}, + 'status_of_secondary': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'custom_domain': {'readonly': True}, + 'secondary_endpoints': {'readonly': True}, + 'encryption': {'readonly': True}, + 'access_tier': {'readonly': True}, + 'network_rule_set': {'readonly': True}, + 'geo_replication_stats': {'readonly': True}, + 'failover_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'primary_endpoints': {'key': 'properties.primaryEndpoints', 'type': 'Endpoints'}, + 'primary_location': {'key': 'properties.primaryLocation', 'type': 'str'}, + 'status_of_primary': {'key': 'properties.statusOfPrimary', 'type': 'AccountStatus'}, + 'last_geo_failover_time': {'key': 'properties.lastGeoFailoverTime', 'type': 'iso-8601'}, + 'secondary_location': {'key': 'properties.secondaryLocation', 'type': 'str'}, + 'status_of_secondary': {'key': 'properties.statusOfSecondary', 'type': 'AccountStatus'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'secondary_endpoints': {'key': 'properties.secondaryEndpoints', 'type': 'Endpoints'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'is_hns_enabled': {'key': 'properties.isHnsEnabled', 'type': 'bool'}, + 'geo_replication_stats': {'key': 'properties.geoReplicationStats', 'type': 'GeoReplicationStats'}, + 'failover_in_progress': {'key': 'properties.failoverInProgress', 'type': 'bool'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, enable_azure_files_aad_integration: bool=None, enable_https_traffic_only: bool=None, is_hns_enabled: bool=None, **kwargs) -> None: + super(StorageAccount, self).__init__(tags=tags, location=location, **kwargs) + self.sku = None + self.kind = None + self.identity = identity + self.provisioning_state = None + self.primary_endpoints = None + self.primary_location = None + self.status_of_primary = None + self.last_geo_failover_time = None + self.secondary_location = None + self.status_of_secondary = None + self.creation_time = None + self.custom_domain = None + self.secondary_endpoints = None + self.encryption = None + self.access_tier = None + self.enable_azure_files_aad_integration = enable_azure_files_aad_integration + self.enable_https_traffic_only = enable_https_traffic_only + self.network_rule_set = None + self.is_hns_enabled = is_hns_enabled + self.geo_replication_stats = None + self.failover_in_progress = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_regenerate_key_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_regenerate_key_parameters.py new file mode 100644 index 000000000000..6dba2135fdc7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_regenerate_key_parameters.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountRegenerateKeyParameters(Model): + """The parameters used to regenerate the storage account key. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of storage keys that want to be + regenerated, possible values are key1, key2. + :type key_name: str + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_regenerate_key_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_regenerate_key_parameters_py3.py new file mode 100644 index 000000000000..6e06a071eba3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_regenerate_key_parameters_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountRegenerateKeyParameters(Model): + """The parameters used to regenerate the storage account key. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of storage keys that want to be + regenerated, possible values are key1, key2. + :type key_name: str + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, key_name: str, **kwargs) -> None: + super(StorageAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = key_name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_update_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_update_parameters.py new file mode 100644 index 000000000000..61893b558a4c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_update_parameters.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountUpdateParameters(Model): + """The parameters that can be provided when updating the storage account + properties. + + :param sku: Gets or sets the SKU name. Note that the SKU name cannot be + updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of + those SKU names be updated to any other value. + :type sku: ~azure.mgmt.storage.v2018_11_01.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater in length than 128 + characters and a value no greater in length than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_11_01.models.Identity + :param custom_domain: Custom domain assigned to the storage account by the + user. Name is the CNAME source. Only one custom domain is supported per + storage account at this time. To clear the existing custom domain, use an + empty string for the custom domain name property. + :type custom_domain: ~azure.mgmt.storage.v2018_11_01.models.CustomDomain + :param encryption: Provides the encryption settings on the account. The + default setting is unencrypted. + :type encryption: ~azure.mgmt.storage.v2018_11_01.models.Encryption + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2018_11_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2018_11_01.models.NetworkRuleSet + :param kind: Optional. Indicates the type of storage account. Currently + only StorageV2 value supported by server. Possible values include: + 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + :type kind: str or ~azure.mgmt.storage.v2018_11_01.models.Kind + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + } + + def __init__(self, **kwargs): + super(StorageAccountUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.custom_domain = kwargs.get('custom_domain', None) + self.encryption = kwargs.get('encryption', None) + self.access_tier = kwargs.get('access_tier', None) + self.enable_azure_files_aad_integration = kwargs.get('enable_azure_files_aad_integration', None) + self.enable_https_traffic_only = kwargs.get('enable_https_traffic_only', None) + self.network_rule_set = kwargs.get('network_rule_set', None) + self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_update_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_update_parameters_py3.py new file mode 100644 index 000000000000..55b9e0e379e1 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_account_update_parameters_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountUpdateParameters(Model): + """The parameters that can be provided when updating the storage account + properties. + + :param sku: Gets or sets the SKU name. Note that the SKU name cannot be + updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of + those SKU names be updated to any other value. + :type sku: ~azure.mgmt.storage.v2018_11_01.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater in length than 128 + characters and a value no greater in length than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2018_11_01.models.Identity + :param custom_domain: Custom domain assigned to the storage account by the + user. Name is the CNAME source. Only one custom domain is supported per + storage account at this time. To clear the existing custom domain, use an + empty string for the custom domain name property. + :type custom_domain: ~azure.mgmt.storage.v2018_11_01.models.CustomDomain + :param encryption: Provides the encryption settings on the account. The + default setting is unencrypted. + :type encryption: ~azure.mgmt.storage.v2018_11_01.models.Encryption + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2018_11_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2018_11_01.models.NetworkRuleSet + :param kind: Optional. Indicates the type of storage account. Currently + only StorageV2 value supported by server. Possible values include: + 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + :type kind: str or ~azure.mgmt.storage.v2018_11_01.models.Kind + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'kind': {'key': 'kind', 'type': 'Kind'}, + } + + def __init__(self, *, sku=None, tags=None, identity=None, custom_domain=None, encryption=None, access_tier=None, enable_azure_files_aad_integration: bool=None, enable_https_traffic_only: bool=None, network_rule_set=None, kind=None, **kwargs) -> None: + super(StorageAccountUpdateParameters, self).__init__(**kwargs) + self.sku = sku + self.tags = tags + self.identity = identity + self.custom_domain = custom_domain + self.encryption = encryption + self.access_tier = access_tier + self.enable_azure_files_aad_integration = enable_azure_files_aad_integration + self.enable_https_traffic_only = enable_https_traffic_only + self.network_rule_set = network_rule_set + self.kind = kind diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_management_client_enums.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_management_client_enums.py new file mode 100644 index 000000000000..b8dd0a6874ef --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/storage_management_client_enums.py @@ -0,0 +1,212 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ReasonCode(str, Enum): + + quota_id = "QuotaId" + not_available_for_subscription = "NotAvailableForSubscription" + + +class SkuName(str, Enum): + + standard_lrs = "Standard_LRS" + standard_grs = "Standard_GRS" + standard_ragrs = "Standard_RAGRS" + standard_zrs = "Standard_ZRS" + premium_lrs = "Premium_LRS" + premium_zrs = "Premium_ZRS" + + +class SkuTier(str, Enum): + + standard = "Standard" + premium = "Premium" + + +class Kind(str, Enum): + + storage = "Storage" + storage_v2 = "StorageV2" + blob_storage = "BlobStorage" + file_storage = "FileStorage" + block_blob_storage = "BlockBlobStorage" + + +class Reason(str, Enum): + + account_name_invalid = "AccountNameInvalid" + already_exists = "AlreadyExists" + + +class KeySource(str, Enum): + + microsoft_storage = "Microsoft.Storage" + microsoft_keyvault = "Microsoft.Keyvault" + + +class Action(str, Enum): + + allow = "Allow" + + +class State(str, Enum): + + provisioning = "provisioning" + deprovisioning = "deprovisioning" + succeeded = "succeeded" + failed = "failed" + network_source_deleted = "networkSourceDeleted" + + +class Bypass(str, Enum): + + none = "None" + logging = "Logging" + metrics = "Metrics" + azure_services = "AzureServices" + + +class DefaultAction(str, Enum): + + allow = "Allow" + deny = "Deny" + + +class AccessTier(str, Enum): + + hot = "Hot" + cool = "Cool" + + +class GeoReplicationStatus(str, Enum): + + live = "Live" + bootstrap = "Bootstrap" + unavailable = "Unavailable" + + +class ProvisioningState(str, Enum): + + creating = "Creating" + resolving_dns = "ResolvingDNS" + succeeded = "Succeeded" + + +class AccountStatus(str, Enum): + + available = "available" + unavailable = "unavailable" + + +class KeyPermission(str, Enum): + + read = "Read" + full = "Full" + + +class UsageUnit(str, Enum): + + count = "Count" + bytes = "Bytes" + seconds = "Seconds" + percent = "Percent" + counts_per_second = "CountsPerSecond" + bytes_per_second = "BytesPerSecond" + + +class Services(str, Enum): + + b = "b" + q = "q" + t = "t" + f = "f" + + +class SignedResourceTypes(str, Enum): + + s = "s" + c = "c" + o = "o" + + +class Permissions(str, Enum): + + r = "r" + d = "d" + w = "w" + l = "l" + a = "a" + c = "c" + u = "u" + p = "p" + + +class HttpProtocol(str, Enum): + + httpshttp = "https,http" + https = "https" + + +class SignedResource(str, Enum): + + b = "b" + c = "c" + f = "f" + s = "s" + + +class PublicAccess(str, Enum): + + container = "Container" + blob = "Blob" + none = "None" + + +class LeaseStatus(str, Enum): + + locked = "Locked" + unlocked = "Unlocked" + + +class LeaseState(str, Enum): + + available = "Available" + leased = "Leased" + expired = "Expired" + breaking = "Breaking" + broken = "Broken" + + +class LeaseDuration(str, Enum): + + infinite = "Infinite" + fixed = "Fixed" + + +class ImmutabilityPolicyState(str, Enum): + + locked = "Locked" + unlocked = "Unlocked" + + +class ImmutabilityPolicyUpdateType(str, Enum): + + put = "put" + lock = "lock" + extend = "extend" + + +class StorageAccountExpand(str, Enum): + + geo_replication_stats = "geoReplicationStats" diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tag_property.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tag_property.py new file mode 100644 index 000000000000..3b879061fd2b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tag_property.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagProperty(Model): + """A tag of the LegalHold of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tag: The tag value. + :vartype tag: str + :ivar timestamp: Returns the date and time the tag was added. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who added the + tag. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who added the tag. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who added the tag. + :vartype upn: str + """ + + _validation = { + 'tag': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'tag': {'key': 'tag', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TagProperty, self).__init__(**kwargs) + self.tag = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tag_property_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tag_property_py3.py new file mode 100644 index 000000000000..22aaf6cb82ba --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tag_property_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagProperty(Model): + """A tag of the LegalHold of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tag: The tag value. + :vartype tag: str + :ivar timestamp: Returns the date and time the tag was added. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who added the + tag. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who added the tag. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who added the tag. + :vartype upn: str + """ + + _validation = { + 'tag': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'tag': {'key': 'tag', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TagProperty, self).__init__(**kwargs) + self.tag = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tracked_resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tracked_resource.py new file mode 100644 index 000000000000..27ab94c7a8dd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tracked_resource.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tracked_resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tracked_resource_py3.py new file mode 100644 index 000000000000..b28cc1859448 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/tracked_resource_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/update_history_property.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/update_history_property.py new file mode 100644 index 000000000000..790be614a340 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/update_history_property.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateHistoryProperty(Model): + """An update history of the ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar update: The ImmutabilityPolicy update type of a blob container, + possible values include: put, lock and extend. Possible values include: + 'put', 'lock', 'extend' + :vartype update: str or + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyUpdateType + :ivar immutability_period_since_creation_in_days: The immutability period + for the blobs in the container since the policy creation, in days. + :vartype immutability_period_since_creation_in_days: int + :ivar timestamp: Returns the date and time the ImmutabilityPolicy was + updated. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who updated the + ImmutabilityPolicy. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who updated the ImmutabilityPolicy. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who updated the + ImmutabilityPolicy. + :vartype upn: str + """ + + _validation = { + 'update': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'update': {'key': 'update', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpdateHistoryProperty, self).__init__(**kwargs) + self.update = None + self.immutability_period_since_creation_in_days = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/update_history_property_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/update_history_property_py3.py new file mode 100644 index 000000000000..20f375cbbde3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/update_history_property_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateHistoryProperty(Model): + """An update history of the ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar update: The ImmutabilityPolicy update type of a blob container, + possible values include: put, lock and extend. Possible values include: + 'put', 'lock', 'extend' + :vartype update: str or + ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicyUpdateType + :ivar immutability_period_since_creation_in_days: The immutability period + for the blobs in the container since the policy creation, in days. + :vartype immutability_period_since_creation_in_days: int + :ivar timestamp: Returns the date and time the ImmutabilityPolicy was + updated. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who updated the + ImmutabilityPolicy. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who updated the ImmutabilityPolicy. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who updated the + ImmutabilityPolicy. + :vartype upn: str + """ + + _validation = { + 'update': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'update': {'key': 'update', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateHistoryProperty, self).__init__(**kwargs) + self.update = None + self.immutability_period_since_creation_in_days = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage.py new file mode 100644 index 000000000000..3429b6dc781f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """Describes Storage Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: Gets the unit of measurement. Possible values include: + 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', + 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.storage.v2018_11_01.models.UsageUnit + :ivar current_value: Gets the current count of the allocated resources in + the subscription. + :vartype current_value: int + :ivar limit: Gets the maximum count of the resources that can be allocated + in the subscription. + :vartype limit: int + :ivar name: Gets the name of the type of usage. + :vartype name: ~azure.mgmt.storage.v2018_11_01.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'UsageUnit'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_name.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_name.py new file mode 100644 index 000000000000..e4082bf52384 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsageName(Model): + """The usage names that can be used; currently limited to StorageAccount. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets a string describing the resource name. + :vartype value: str + :ivar localized_value: Gets a localized string describing the resource + name. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_name_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_name_py3.py new file mode 100644 index 000000000000..f519bb5072b1 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_name_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsageName(Model): + """The usage names that can be used; currently limited to StorageAccount. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets a string describing the resource name. + :vartype value: str + :ivar localized_value: Gets a localized string describing the resource + name. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_paged.py new file mode 100644 index 000000000000..45e4f67523b2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_py3.py new file mode 100644 index 000000000000..3bf024d50d74 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/usage_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """Describes Storage Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: Gets the unit of measurement. Possible values include: + 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', + 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.storage.v2018_11_01.models.UsageUnit + :ivar current_value: Gets the current count of the allocated resources in + the subscription. + :vartype current_value: int + :ivar limit: Gets the maximum count of the resources that can be allocated + in the subscription. + :vartype limit: int + :ivar name: Gets the name of the type of usage. + :vartype name: ~azure.mgmt.storage.v2018_11_01.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'UsageUnit'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/virtual_network_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/virtual_network_rule.py new file mode 100644 index 000000000000..db4d16cf06aa --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/virtual_network_rule.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """Virtual Network rule. + + All required parameters must be populated in order to send to Azure. + + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: + /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type virtual_network_resource_id: str + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2018_11_01.models.Action + :param state: Gets the state of virtual network rule. Possible values + include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', + 'networkSourceDeleted' + :type state: str or ~azure.mgmt.storage.v2018_11_01.models.State + """ + + _validation = { + 'virtual_network_resource_id': {'required': True}, + } + + _attribute_map = { + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + 'state': {'key': 'state', 'type': 'State'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_resource_id = kwargs.get('virtual_network_resource_id', None) + self.action = kwargs.get('action', "Allow") + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/virtual_network_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..5d6462e88369 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/virtual_network_rule_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """Virtual Network rule. + + All required parameters must be populated in order to send to Azure. + + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: + /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type virtual_network_resource_id: str + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2018_11_01.models.Action + :param state: Gets the state of virtual network rule. Possible values + include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', + 'networkSourceDeleted' + :type state: str or ~azure.mgmt.storage.v2018_11_01.models.State + """ + + _validation = { + 'virtual_network_resource_id': {'required': True}, + } + + _attribute_map = { + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + 'state': {'key': 'state', 'type': 'State'}, + } + + def __init__(self, *, virtual_network_resource_id: str, action="Allow", state=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_resource_id = virtual_network_resource_id + self.action = action + self.state = state diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/__init__.py new file mode 100644 index 000000000000..2e0271d17068 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/__init__.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operations import Operations +from .skus_operations import SkusOperations +from .storage_accounts_operations import StorageAccountsOperations +from .usages_operations import UsagesOperations +from .management_policies_operations import ManagementPoliciesOperations +from .blob_services_operations import BlobServicesOperations +from .blob_containers_operations import BlobContainersOperations + +__all__ = [ + 'Operations', + 'SkusOperations', + 'StorageAccountsOperations', + 'UsagesOperations', + 'ManagementPoliciesOperations', + 'BlobServicesOperations', + 'BlobContainersOperations', +] diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/blob_containers_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/blob_containers_operations.py new file mode 100644 index 000000000000..3131f31863a2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/blob_containers_operations.py @@ -0,0 +1,1130 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class BlobContainersOperations(object): + """BlobContainersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-11-01". + :ivar immutability_policy_name: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01" + self.immutability_policy_name = "default" + + self.config = config + + def list( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists all containers and does not support a prefix like data plane. + Also SRP today does not return continuation token. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListContainerItems or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ListContainerItems or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListContainerItems', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers'} + + def create( + self, resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config): + """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. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_11_01.models.PublicAccess + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.BlobContainer or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + blob_container = models.BlobContainer(public_access=public_access, metadata=metadata) + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(blob_container, 'BlobContainer') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobContainer', response) + if response.status_code == 201: + deserialized = self._deserialize('BlobContainer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def update( + self, resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config): + """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. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2018_11_01.models.PublicAccess + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.BlobContainer or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + blob_container = models.BlobContainer(public_access=public_access, metadata=metadata) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(blob_container, 'BlobContainer') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobContainer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def get( + self, resource_group_name, account_name, container_name, custom_headers=None, raw=False, **operation_config): + """Gets properties of a specified container. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.BlobContainer or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobContainer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def delete( + self, resource_group_name, account_name, container_name, custom_headers=None, raw=False, **operation_config): + """Deletes specified container under its account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def set_legal_hold( + self, resource_group_name, account_name, container_name, tags, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param tags: Each tag should be 3 to 23 alphanumeric characters and is + normalized to lower case at SRP. + :type tags: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LegalHold or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.LegalHold or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + legal_hold = models.LegalHold(tags=tags) + + # Construct URL + url = self.set_legal_hold.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(legal_hold, 'LegalHold') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LegalHold', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + set_legal_hold.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold'} + + def clear_legal_hold( + self, resource_group_name, account_name, container_name, tags, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param tags: Each tag should be 3 to 23 alphanumeric characters and is + normalized to lower case at SRP. + :type tags: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LegalHold or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.LegalHold or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + legal_hold = models.LegalHold(tags=tags) + + # Construct URL + url = self.clear_legal_hold.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(legal_hold, 'LegalHold') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LegalHold', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + clear_legal_hold.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold'} + + def create_or_update_immutability_policy( + self, resource_group_name, account_name, container_name, immutability_period_since_creation_in_days, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an unlocked immutability policy. ETag in If-Match is + honored if given but not required for this operation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param immutability_period_since_creation_in_days: The immutability + period for the blobs in the container since the policy creation, in + days. + :type immutability_period_since_creation_in_days: int + :param if_match: 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. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + if immutability_period_since_creation_in_days is not None: + parameters = models.ImmutabilityPolicy(immutability_period_since_creation_in_days=immutability_period_since_creation_in_days) + + # Construct URL + url = self.create_or_update_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'immutabilityPolicyName': self._serialize.url("self.immutability_policy_name", self.immutability_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'ImmutabilityPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'} + + def get_immutability_policy( + self, resource_group_name, account_name, container_name, if_match=None, custom_headers=None, raw=False, **operation_config): + """Gets the existing immutability policy along with the corresponding ETag + in response headers and body. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param if_match: 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. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'immutabilityPolicyName': self._serialize.url("self.immutability_policy_name", self.immutability_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'} + + def delete_immutability_policy( + self, resource_group_name, account_name, container_name, if_match, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param if_match: 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. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'immutabilityPolicyName': self._serialize.url("self.immutability_policy_name", self.immutability_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'} + + def lock_immutability_policy( + self, resource_group_name, account_name, container_name, if_match, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param if_match: 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. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.lock_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + lock_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock'} + + def extend_immutability_policy( + self, resource_group_name, account_name, container_name, if_match, immutability_period_since_creation_in_days, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param if_match: 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. + :type if_match: str + :param immutability_period_since_creation_in_days: The immutability + period for the blobs in the container since the policy creation, in + days. + :type immutability_period_since_creation_in_days: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + if immutability_period_since_creation_in_days is not None: + parameters = models.ImmutabilityPolicy(immutability_period_since_creation_in_days=immutability_period_since_creation_in_days) + + # Construct URL + url = self.extend_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'ImmutabilityPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + extend_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend'} + + def lease( + self, resource_group_name, account_name, container_name, parameters=None, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param parameters: Lease Container request body. + :type parameters: + ~azure.mgmt.storage.v2018_11_01.models.LeaseContainerRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LeaseContainerResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.LeaseContainerResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.lease.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'LeaseContainerRequest') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LeaseContainerResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + lease.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/blob_services_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/blob_services_operations.py new file mode 100644 index 000000000000..5a0c8a1ff6fd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/blob_services_operations.py @@ -0,0 +1,185 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class BlobServicesOperations(object): + """BlobServicesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-11-01". + :ivar blob_services_name: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01" + self.blob_services_name = "default" + + self.config = config + + def set_service_properties( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """Sets the properties of a storage account’s Blob service, including + properties for Storage Analytics and CORS (Cross-Origin Resource + Sharing) rules. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The properties of a storage account’s Blob service, + including properties for Storage Analytics and CORS (Cross-Origin + Resource Sharing) rules. + :type parameters: + ~azure.mgmt.storage.v2018_11_01.models.BlobServiceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.BlobServiceProperties + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.set_service_properties.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'BlobServicesName': self._serialize.url("self.blob_services_name", self.blob_services_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'BlobServiceProperties') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + set_service_properties.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}'} + + def get_service_properties( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of a storage account’s Blob service, including + properties for Storage Analytics and CORS (Cross-Origin Resource + Sharing) rules. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.BlobServiceProperties + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_service_properties.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'BlobServicesName': self._serialize.url("self.blob_services_name", self.blob_services_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_properties.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/management_policies_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/management_policies_operations.py new file mode 100644 index 000000000000..4749ecebf2d7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/management_policies_operations.py @@ -0,0 +1,242 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ManagementPoliciesOperations(object): + """ManagementPoliciesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-11-01". + :ivar management_policy_name: The name of the Storage Account Management Policy. It should always be 'default'. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01" + self.management_policy_name = "default" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets the managementpolicy associated with the specified storage + account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagementPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'managementPolicyName': self._serialize.url("self.management_policy_name", self.management_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagementPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}'} + + def create_or_update( + self, resource_group_name, account_name, policy, custom_headers=None, raw=False, **operation_config): + """Sets the managementpolicy to the specified storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param policy: The Storage Account ManagementPolicy, in JSON format. + See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: + ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicySchema + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagementPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ManagementPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + properties = models.ManagementPolicy(policy=policy) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'managementPolicyName': self._serialize.url("self.management_policy_name", self.management_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(properties, 'ManagementPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagementPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}'} + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes the managementpolicy associated with the specified storage + account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'managementPolicyName': self._serialize.url("self.management_policy_name", self.management_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/operations.py new file mode 100644 index 000000000000..0418320b9a2a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/operations.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Storage Rest API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.storage.v2018_11_01.models.OperationPaged[~azure.mgmt.storage.v2018_11_01.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Storage/operations'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/skus_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/skus_operations.py new file mode 100644 index 000000000000..a7d71da55fdc --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/skus_operations.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SkusOperations(object): + """SkusOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists the available SKUs supported by Microsoft.Storage for given + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Sku + :rtype: + ~azure.mgmt.storage.v2018_11_01.models.SkuPaged[~azure.mgmt.storage.v2018_11_01.models.Sku] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.SkuPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/storage_accounts_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/storage_accounts_operations.py new file mode 100644 index 000000000000..f33b8da9f839 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/storage_accounts_operations.py @@ -0,0 +1,991 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class StorageAccountsOperations(object): + """StorageAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01" + + self.config = config + + def check_name_availability( + self, name, custom_headers=None, raw=False, **operation_config): + """Checks that the storage account name is valid and is not already in + use. + + :param name: The storage account name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_11_01.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + account_name = models.StorageAccountCheckNameAvailabilityParameters(name=name) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(account_name, 'StorageAccountCheckNameAvailabilityParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability'} + + + def _create_initial( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The parameters to provide for the created account. + :type parameters: + ~azure.mgmt.storage.v2018_11_01.models.StorageAccountCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns StorageAccount or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.storage.v2018_11_01.models.StorageAccount] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storage.v2018_11_01.models.StorageAccount]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes a storage account in Microsoft Azure. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def get_properties( + self, resource_group_name, account_name, expand=None, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param expand: 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' + :type expand: str or + ~azure.mgmt.storage.v2018_11_01.models.StorageAccountExpand + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.StorageAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_properties.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'StorageAccountExpand') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_properties.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def update( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The parameters to provide for the updated account. + :type parameters: + ~azure.mgmt.storage.v2018_11_01.models.StorageAccountUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.StorageAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the storage accounts available under the subscription. Note + that storage keys are not returned; use the ListKeys operation for + this. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StorageAccount + :rtype: + ~azure.mgmt.storage.v2018_11_01.models.StorageAccountPaged[~azure.mgmt.storage.v2018_11_01.models.StorageAccount] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the storage accounts available under the given resource + group. Note that storage keys are not returned; use the ListKeys + operation for this. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StorageAccount + :rtype: + ~azure.mgmt.storage.v2018_11_01.models.StorageAccountPaged[~azure.mgmt.storage.v2018_11_01.models.StorageAccount] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts'} + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccountListKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_11_01.models.StorageAccountListKeysResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys'} + + def regenerate_key( + self, resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config): + """Regenerates one of the access keys for the specified storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param key_name: The name of storage keys that want to be regenerated, + possible values are key1, key2. + :type key_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccountListKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2018_11_01.models.StorageAccountListKeysResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_key1 = models.StorageAccountRegenerateKeyParameters(key_name=key_name) + + # Construct URL + url = self.regenerate_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate_key1, 'StorageAccountRegenerateKeyParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey'} + + def list_account_sas( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """List SAS credentials of a storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The parameters to provide to list SAS credentials + for the storage account. + :type parameters: + ~azure.mgmt.storage.v2018_11_01.models.AccountSasParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListAccountSasResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ListAccountSasResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_account_sas.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AccountSasParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListAccountSasResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_account_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas'} + + def list_service_sas( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """List service SAS credentials of a specific resource. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The parameters to provide to list service SAS + credentials. + :type parameters: + ~azure.mgmt.storage.v2018_11_01.models.ServiceSasParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListServiceSasResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2018_11_01.models.ListServiceSasResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_service_sas.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServiceSasParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListServiceSasResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_service_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas'} + + + def _failover_initial( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._failover_initial( + resource_group_name=resource_group_name, + account_name=account_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover'} + + def revoke_user_delegation_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Revoke user delegation keys. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.revoke_user_delegation_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + revoke_user_delegation_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/usages_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/usages_operations.py new file mode 100644 index 000000000000..a3c8ba22dbcd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/operations/usages_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsagesOperations(object): + """UsagesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01" + + self.config = config + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets the current usage count and the limit for the resources of the + location under the subscription. + + :param location: The location of the Azure Storage resource. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.storage.v2018_11_01.models.UsagePaged[~azure.mgmt.storage.v2018_11_01.models.Usage] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/storage_management_client.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/storage_management_client.py new file mode 100644 index 000000000000..aadbfd8ad6c3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/storage_management_client.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.operations import Operations +from .operations.skus_operations import SkusOperations +from .operations.storage_accounts_operations import StorageAccountsOperations +from .operations.usages_operations import UsagesOperations +from .operations.management_policies_operations import ManagementPoliciesOperations +from .operations.blob_services_operations import BlobServicesOperations +from .operations.blob_containers_operations import BlobContainersOperations +from . import models + + +class StorageManagementClientConfiguration(AzureConfiguration): + """Configuration for StorageManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(StorageManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-storage/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class StorageManagementClient(SDKClient): + """The Azure Storage Management API. + + :ivar config: Configuration for client. + :vartype config: StorageManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.storage.v2018_11_01.operations.Operations + :ivar skus: Skus operations + :vartype skus: azure.mgmt.storage.v2018_11_01.operations.SkusOperations + :ivar storage_accounts: StorageAccounts operations + :vartype storage_accounts: azure.mgmt.storage.v2018_11_01.operations.StorageAccountsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.storage.v2018_11_01.operations.UsagesOperations + :ivar management_policies: ManagementPolicies operations + :vartype management_policies: azure.mgmt.storage.v2018_11_01.operations.ManagementPoliciesOperations + :ivar blob_services: BlobServices operations + :vartype blob_services: azure.mgmt.storage.v2018_11_01.operations.BlobServicesOperations + :ivar blob_containers: BlobContainers operations + :vartype blob_containers: azure.mgmt.storage.v2018_11_01.operations.BlobContainersOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = StorageManagementClientConfiguration(credentials, subscription_id, base_url) + super(StorageManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-11-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.skus = SkusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_accounts = StorageAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.management_policies = ManagementPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.blob_services = BlobServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.blob_containers = BlobContainersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/version.py b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/version.py new file mode 100644 index 000000000000..36adbbf367bf --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2018-11-01" + diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/__init__.py new file mode 100644 index 000000000000..0854715e0c10 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .storage_management_client import StorageManagementClient +from .version import VERSION + +__all__ = ['StorageManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/__init__.py new file mode 100644 index 000000000000..1e5d1a426aaf --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/__init__.py @@ -0,0 +1,268 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .operation_display_py3 import OperationDisplay + from .dimension_py3 import Dimension + from .metric_specification_py3 import MetricSpecification + from .service_specification_py3 import ServiceSpecification + from .operation_py3 import Operation + from .storage_account_check_name_availability_parameters_py3 import StorageAccountCheckNameAvailabilityParameters + from .sku_capability_py3 import SKUCapability + from .restriction_py3 import Restriction + from .sku_py3 import Sku + from .check_name_availability_result_py3 import CheckNameAvailabilityResult + from .custom_domain_py3 import CustomDomain + from .encryption_service_py3 import EncryptionService + from .encryption_services_py3 import EncryptionServices + from .key_vault_properties_py3 import KeyVaultProperties + from .encryption_py3 import Encryption + from .virtual_network_rule_py3 import VirtualNetworkRule + from .ip_rule_py3 import IPRule + from .network_rule_set_py3 import NetworkRuleSet + from .identity_py3 import Identity + from .storage_account_create_parameters_py3 import StorageAccountCreateParameters + from .endpoints_py3 import Endpoints + from .geo_replication_stats_py3 import GeoReplicationStats + from .storage_account_py3 import StorageAccount + from .storage_account_key_py3 import StorageAccountKey + from .storage_account_list_keys_result_py3 import StorageAccountListKeysResult + from .storage_account_regenerate_key_parameters_py3 import StorageAccountRegenerateKeyParameters + from .storage_account_update_parameters_py3 import StorageAccountUpdateParameters + from .usage_name_py3 import UsageName + from .usage_py3 import Usage + from .account_sas_parameters_py3 import AccountSasParameters + from .list_account_sas_response_py3 import ListAccountSasResponse + from .service_sas_parameters_py3 import ServiceSasParameters + from .list_service_sas_response_py3 import ListServiceSasResponse + from .date_after_modification_py3 import DateAfterModification + from .management_policy_base_blob_py3 import ManagementPolicyBaseBlob + from .date_after_creation_py3 import DateAfterCreation + from .management_policy_snap_shot_py3 import ManagementPolicySnapShot + from .management_policy_action_py3 import ManagementPolicyAction + from .management_policy_filter_py3 import ManagementPolicyFilter + from .management_policy_definition_py3 import ManagementPolicyDefinition + from .management_policy_rule_py3 import ManagementPolicyRule + from .management_policy_schema_py3 import ManagementPolicySchema + from .management_policy_py3 import ManagementPolicy + from .proxy_resource_py3 import ProxyResource + from .tracked_resource_py3 import TrackedResource + from .azure_entity_resource_py3 import AzureEntityResource + from .resource_py3 import Resource + from .update_history_property_py3 import UpdateHistoryProperty + from .immutability_policy_properties_py3 import ImmutabilityPolicyProperties + from .tag_property_py3 import TagProperty + from .legal_hold_properties_py3 import LegalHoldProperties + from .blob_container_py3 import BlobContainer + from .immutability_policy_py3 import ImmutabilityPolicy + from .legal_hold_py3 import LegalHold + from .list_container_item_py3 import ListContainerItem + from .list_container_items_py3 import ListContainerItems + from .cors_rule_py3 import CorsRule + from .cors_rules_py3 import CorsRules + from .delete_retention_policy_py3 import DeleteRetentionPolicy + from .blob_service_properties_py3 import BlobServiceProperties + from .lease_container_request_py3 import LeaseContainerRequest + from .lease_container_response_py3 import LeaseContainerResponse +except (SyntaxError, ImportError): + from .operation_display import OperationDisplay + from .dimension import Dimension + from .metric_specification import MetricSpecification + from .service_specification import ServiceSpecification + from .operation import Operation + from .storage_account_check_name_availability_parameters import StorageAccountCheckNameAvailabilityParameters + from .sku_capability import SKUCapability + from .restriction import Restriction + from .sku import Sku + from .check_name_availability_result import CheckNameAvailabilityResult + from .custom_domain import CustomDomain + from .encryption_service import EncryptionService + from .encryption_services import EncryptionServices + from .key_vault_properties import KeyVaultProperties + from .encryption import Encryption + from .virtual_network_rule import VirtualNetworkRule + from .ip_rule import IPRule + from .network_rule_set import NetworkRuleSet + from .identity import Identity + from .storage_account_create_parameters import StorageAccountCreateParameters + from .endpoints import Endpoints + from .geo_replication_stats import GeoReplicationStats + from .storage_account import StorageAccount + from .storage_account_key import StorageAccountKey + from .storage_account_list_keys_result import StorageAccountListKeysResult + from .storage_account_regenerate_key_parameters import StorageAccountRegenerateKeyParameters + from .storage_account_update_parameters import StorageAccountUpdateParameters + from .usage_name import UsageName + from .usage import Usage + from .account_sas_parameters import AccountSasParameters + from .list_account_sas_response import ListAccountSasResponse + from .service_sas_parameters import ServiceSasParameters + from .list_service_sas_response import ListServiceSasResponse + from .date_after_modification import DateAfterModification + from .management_policy_base_blob import ManagementPolicyBaseBlob + from .date_after_creation import DateAfterCreation + from .management_policy_snap_shot import ManagementPolicySnapShot + from .management_policy_action import ManagementPolicyAction + from .management_policy_filter import ManagementPolicyFilter + from .management_policy_definition import ManagementPolicyDefinition + from .management_policy_rule import ManagementPolicyRule + from .management_policy_schema import ManagementPolicySchema + from .management_policy import ManagementPolicy + from .proxy_resource import ProxyResource + from .tracked_resource import TrackedResource + from .azure_entity_resource import AzureEntityResource + from .resource import Resource + from .update_history_property import UpdateHistoryProperty + from .immutability_policy_properties import ImmutabilityPolicyProperties + from .tag_property import TagProperty + from .legal_hold_properties import LegalHoldProperties + from .blob_container import BlobContainer + from .immutability_policy import ImmutabilityPolicy + from .legal_hold import LegalHold + from .list_container_item import ListContainerItem + from .list_container_items import ListContainerItems + from .cors_rule import CorsRule + from .cors_rules import CorsRules + from .delete_retention_policy import DeleteRetentionPolicy + from .blob_service_properties import BlobServiceProperties + from .lease_container_request import LeaseContainerRequest + from .lease_container_response import LeaseContainerResponse +from .operation_paged import OperationPaged +from .sku_paged import SkuPaged +from .storage_account_paged import StorageAccountPaged +from .usage_paged import UsagePaged +from .storage_management_client_enums import ( + ReasonCode, + SkuName, + SkuTier, + Kind, + Reason, + KeySource, + Action, + State, + Bypass, + DefaultAction, + AccessTier, + GeoReplicationStatus, + ProvisioningState, + AccountStatus, + KeyPermission, + UsageUnit, + Services, + SignedResourceTypes, + Permissions, + HttpProtocol, + SignedResource, + PublicAccess, + LeaseStatus, + LeaseState, + LeaseDuration, + ImmutabilityPolicyState, + ImmutabilityPolicyUpdateType, + StorageAccountExpand, +) + +__all__ = [ + 'OperationDisplay', + 'Dimension', + 'MetricSpecification', + 'ServiceSpecification', + 'Operation', + 'StorageAccountCheckNameAvailabilityParameters', + 'SKUCapability', + 'Restriction', + 'Sku', + 'CheckNameAvailabilityResult', + 'CustomDomain', + 'EncryptionService', + 'EncryptionServices', + 'KeyVaultProperties', + 'Encryption', + 'VirtualNetworkRule', + 'IPRule', + 'NetworkRuleSet', + 'Identity', + 'StorageAccountCreateParameters', + 'Endpoints', + 'GeoReplicationStats', + 'StorageAccount', + 'StorageAccountKey', + 'StorageAccountListKeysResult', + 'StorageAccountRegenerateKeyParameters', + 'StorageAccountUpdateParameters', + 'UsageName', + 'Usage', + 'AccountSasParameters', + 'ListAccountSasResponse', + 'ServiceSasParameters', + 'ListServiceSasResponse', + 'DateAfterModification', + 'ManagementPolicyBaseBlob', + 'DateAfterCreation', + 'ManagementPolicySnapShot', + 'ManagementPolicyAction', + 'ManagementPolicyFilter', + 'ManagementPolicyDefinition', + 'ManagementPolicyRule', + 'ManagementPolicySchema', + 'ManagementPolicy', + 'ProxyResource', + 'TrackedResource', + 'AzureEntityResource', + 'Resource', + 'UpdateHistoryProperty', + 'ImmutabilityPolicyProperties', + 'TagProperty', + 'LegalHoldProperties', + 'BlobContainer', + 'ImmutabilityPolicy', + 'LegalHold', + 'ListContainerItem', + 'ListContainerItems', + 'CorsRule', + 'CorsRules', + 'DeleteRetentionPolicy', + 'BlobServiceProperties', + 'LeaseContainerRequest', + 'LeaseContainerResponse', + 'OperationPaged', + 'SkuPaged', + 'StorageAccountPaged', + 'UsagePaged', + 'ReasonCode', + 'SkuName', + 'SkuTier', + 'Kind', + 'Reason', + 'KeySource', + 'Action', + 'State', + 'Bypass', + 'DefaultAction', + 'AccessTier', + 'GeoReplicationStatus', + 'ProvisioningState', + 'AccountStatus', + 'KeyPermission', + 'UsageUnit', + 'Services', + 'SignedResourceTypes', + 'Permissions', + 'HttpProtocol', + 'SignedResource', + 'PublicAccess', + 'LeaseStatus', + 'LeaseState', + 'LeaseDuration', + 'ImmutabilityPolicyState', + 'ImmutabilityPolicyUpdateType', + 'StorageAccountExpand', +] diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/account_sas_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/account_sas_parameters.py new file mode 100644 index 000000000000..c6fa8ca99de6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/account_sas_parameters.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccountSasParameters(Model): + """The parameters to list SAS credentials of a storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: Required. The signed services accessible with the account + SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). + Possible values include: 'b', 'q', 't', 'f' + :type services: str or ~azure.mgmt.storage.v2019_04_01.models.Services + :param resource_types: Required. The signed resource types that are + accessible with the account SAS. Service (s): Access to service-level + APIs; Container (c): Access to container-level APIs; Object (o): Access to + object-level APIs for blobs, queue messages, table entities, and files. + Possible values include: 's', 'c', 'o' + :type resource_types: str or + ~azure.mgmt.storage.v2019_04_01.models.SignedResourceTypes + :param permissions: Required. The signed permissions for the account SAS. + Possible values include: Read (r), Write (w), Delete (d), List (l), Add + (a), Create (c), Update (u) and Process (p). Possible values include: 'r', + 'd', 'w', 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2019_04_01.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2019_04_01.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: Required. The time at which the shared + access signature becomes invalid. + :type shared_access_expiry_time: datetime + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + """ + + _validation = { + 'services': {'required': True}, + 'resource_types': {'required': True}, + 'permissions': {'required': True}, + 'shared_access_expiry_time': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'signedServices', 'type': 'str'}, + 'resource_types': {'key': 'signedResourceTypes', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AccountSasParameters, self).__init__(**kwargs) + self.services = kwargs.get('services', None) + self.resource_types = kwargs.get('resource_types', None) + self.permissions = kwargs.get('permissions', None) + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) + self.protocols = kwargs.get('protocols', None) + self.shared_access_start_time = kwargs.get('shared_access_start_time', None) + self.shared_access_expiry_time = kwargs.get('shared_access_expiry_time', None) + self.key_to_sign = kwargs.get('key_to_sign', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/account_sas_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/account_sas_parameters_py3.py new file mode 100644 index 000000000000..78a15de6b534 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/account_sas_parameters_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccountSasParameters(Model): + """The parameters to list SAS credentials of a storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: Required. The signed services accessible with the account + SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). + Possible values include: 'b', 'q', 't', 'f' + :type services: str or ~azure.mgmt.storage.v2019_04_01.models.Services + :param resource_types: Required. The signed resource types that are + accessible with the account SAS. Service (s): Access to service-level + APIs; Container (c): Access to container-level APIs; Object (o): Access to + object-level APIs for blobs, queue messages, table entities, and files. + Possible values include: 's', 'c', 'o' + :type resource_types: str or + ~azure.mgmt.storage.v2019_04_01.models.SignedResourceTypes + :param permissions: Required. The signed permissions for the account SAS. + Possible values include: Read (r), Write (w), Delete (d), List (l), Add + (a), Create (c), Update (u) and Process (p). Possible values include: 'r', + 'd', 'w', 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2019_04_01.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2019_04_01.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: Required. The time at which the shared + access signature becomes invalid. + :type shared_access_expiry_time: datetime + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + """ + + _validation = { + 'services': {'required': True}, + 'resource_types': {'required': True}, + 'permissions': {'required': True}, + 'shared_access_expiry_time': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'signedServices', 'type': 'str'}, + 'resource_types': {'key': 'signedResourceTypes', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + } + + def __init__(self, *, services, resource_types, permissions, shared_access_expiry_time, ip_address_or_range: str=None, protocols=None, shared_access_start_time=None, key_to_sign: str=None, **kwargs) -> None: + super(AccountSasParameters, self).__init__(**kwargs) + self.services = services + self.resource_types = resource_types + self.permissions = permissions + self.ip_address_or_range = ip_address_or_range + self.protocols = protocols + self.shared_access_start_time = shared_access_start_time + self.shared_access_expiry_time = shared_access_expiry_time + self.key_to_sign = key_to_sign diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/azure_entity_resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/azure_entity_resource.py new file mode 100644 index 000000000000..3bffaab8d35b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/azure_entity_resource.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/azure_entity_resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/azure_entity_resource_py3.py new file mode 100644 index 000000000000..d3f80d87498a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/azure_entity_resource_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_container.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_container.py new file mode 100644 index 000000000000..625b0c5d4aae --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_container.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource import AzureEntityResource + + +class BlobContainer(AzureEntityResource): + """Properties of the blob container, including Id, resource name, resource + type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2019_04_01.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2019_04_01.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(BlobContainer, self).__init__(**kwargs) + self.public_access = kwargs.get('public_access', None) + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = kwargs.get('metadata', None) + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_container_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_container_py3.py new file mode 100644 index 000000000000..b18048af6a9f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_container_py3.py @@ -0,0 +1,119 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource_py3 import AzureEntityResource + + +class BlobContainer(AzureEntityResource): + """Properties of the blob container, including Id, resource name, resource + type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2019_04_01.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2019_04_01.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, *, public_access=None, metadata=None, **kwargs) -> None: + super(BlobContainer, self).__init__(**kwargs) + self.public_access = public_access + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = metadata + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_service_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_service_properties.py new file mode 100644 index 000000000000..1bba040b45f6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_service_properties.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class BlobServiceProperties(Resource): + """The properties of a storage account’s Blob service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param cors: Specifies CORS rules for the Blob 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 Blob service. + :type cors: ~azure.mgmt.storage.v2019_04_01.models.CorsRules + :param default_service_version: DefaultServiceVersion indicates the + default version to use for requests to the Blob service if an incoming + request’s version is not specified. Possible values include version + 2008-10-27 and all more recent versions. + :type default_service_version: str + :param delete_retention_policy: The blob service properties for soft + delete. + :type delete_retention_policy: + ~azure.mgmt.storage.v2019_04_01.models.DeleteRetentionPolicy + :param automatic_snapshot_policy_enabled: Automatic Snapshot is enabled if + set to true. + :type automatic_snapshot_policy_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsRules'}, + 'default_service_version': {'key': 'properties.defaultServiceVersion', 'type': 'str'}, + 'delete_retention_policy': {'key': 'properties.deleteRetentionPolicy', 'type': 'DeleteRetentionPolicy'}, + 'automatic_snapshot_policy_enabled': {'key': 'properties.automaticSnapshotPolicyEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(BlobServiceProperties, self).__init__(**kwargs) + self.cors = kwargs.get('cors', None) + self.default_service_version = kwargs.get('default_service_version', None) + self.delete_retention_policy = kwargs.get('delete_retention_policy', None) + self.automatic_snapshot_policy_enabled = kwargs.get('automatic_snapshot_policy_enabled', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_service_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_service_properties_py3.py new file mode 100644 index 000000000000..adceafd8b2f7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/blob_service_properties_py3.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class BlobServiceProperties(Resource): + """The properties of a storage account’s Blob service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param cors: Specifies CORS rules for the Blob 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 Blob service. + :type cors: ~azure.mgmt.storage.v2019_04_01.models.CorsRules + :param default_service_version: DefaultServiceVersion indicates the + default version to use for requests to the Blob service if an incoming + request’s version is not specified. Possible values include version + 2008-10-27 and all more recent versions. + :type default_service_version: str + :param delete_retention_policy: The blob service properties for soft + delete. + :type delete_retention_policy: + ~azure.mgmt.storage.v2019_04_01.models.DeleteRetentionPolicy + :param automatic_snapshot_policy_enabled: Automatic Snapshot is enabled if + set to true. + :type automatic_snapshot_policy_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'cors': {'key': 'properties.cors', 'type': 'CorsRules'}, + 'default_service_version': {'key': 'properties.defaultServiceVersion', 'type': 'str'}, + 'delete_retention_policy': {'key': 'properties.deleteRetentionPolicy', 'type': 'DeleteRetentionPolicy'}, + 'automatic_snapshot_policy_enabled': {'key': 'properties.automaticSnapshotPolicyEnabled', 'type': 'bool'}, + } + + def __init__(self, *, cors=None, default_service_version: str=None, delete_retention_policy=None, automatic_snapshot_policy_enabled: bool=None, **kwargs) -> None: + super(BlobServiceProperties, self).__init__(**kwargs) + self.cors = cors + self.default_service_version = default_service_version + self.delete_retention_policy = delete_retention_policy + self.automatic_snapshot_policy_enabled = automatic_snapshot_policy_enabled diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/check_name_availability_result.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/check_name_availability_result.py new file mode 100644 index 000000000000..85e6b7c4a46b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/check_name_availability_result.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Gets a boolean value that indicates whether the name + is available for you to use. If true, the name is available. If false, the + name has already been taken or is invalid and cannot be used. + :vartype name_available: bool + :ivar reason: Gets the reason that a storage account name could not be + used. The Reason element is only returned if NameAvailable is false. + Possible values include: 'AccountNameInvalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.storage.v2019_04_01.models.Reason + :ivar message: Gets an error message explaining the Reason value in more + detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/check_name_availability_result_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/check_name_availability_result_py3.py new file mode 100644 index 000000000000..7b755ae88993 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/check_name_availability_result_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResult(Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name_available: Gets a boolean value that indicates whether the name + is available for you to use. If true, the name is available. If false, the + name has already been taken or is invalid and cannot be used. + :vartype name_available: bool + :ivar reason: Gets the reason that a storage account name could not be + used. The Reason element is only returned if NameAvailable is false. + Possible values include: 'AccountNameInvalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.storage.v2019_04_01.models.Reason + :ivar message: Gets an error message explaining the Reason value in more + detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'Reason'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rule.py new file mode 100644 index 000000000000..0777423f048f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rule.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CorsRule(Model): + """Specifies a CORS rule for the Blob service. + + All required parameters must be populated in order to send to Azure. + + :param allowed_origins: Required. Required if CorsRule element is present. + A list of origin domains that will be allowed via CORS, or "*" to allow + all domains + :type allowed_origins: list[str] + :param allowed_methods: Required. Required if CorsRule element is present. + A list of HTTP methods that are allowed to be executed by the origin. + :type allowed_methods: list[str] + :param max_age_in_seconds: Required. Required if CorsRule element is + present. The number of seconds that the client/browser should cache a + preflight response. + :type max_age_in_seconds: int + :param exposed_headers: Required. Required if CorsRule element is present. + A list of response headers to expose to CORS clients. + :type exposed_headers: list[str] + :param allowed_headers: Required. Required if CorsRule element is present. + A list of headers allowed to be part of the cross-origin request. + :type allowed_headers: list[str] + """ + + _validation = { + 'allowed_origins': {'required': True}, + 'allowed_methods': {'required': True}, + 'max_age_in_seconds': {'required': True}, + 'exposed_headers': {'required': True}, + 'allowed_headers': {'required': True}, + } + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + 'allowed_methods': {'key': 'allowedMethods', 'type': '[str]'}, + 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'int'}, + 'exposed_headers': {'key': 'exposedHeaders', 'type': '[str]'}, + 'allowed_headers': {'key': 'allowedHeaders', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(CorsRule, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + self.allowed_methods = kwargs.get('allowed_methods', None) + self.max_age_in_seconds = kwargs.get('max_age_in_seconds', None) + self.exposed_headers = kwargs.get('exposed_headers', None) + self.allowed_headers = kwargs.get('allowed_headers', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rule_py3.py new file mode 100644 index 000000000000..b88a7928cd1c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rule_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CorsRule(Model): + """Specifies a CORS rule for the Blob service. + + All required parameters must be populated in order to send to Azure. + + :param allowed_origins: Required. Required if CorsRule element is present. + A list of origin domains that will be allowed via CORS, or "*" to allow + all domains + :type allowed_origins: list[str] + :param allowed_methods: Required. Required if CorsRule element is present. + A list of HTTP methods that are allowed to be executed by the origin. + :type allowed_methods: list[str] + :param max_age_in_seconds: Required. Required if CorsRule element is + present. The number of seconds that the client/browser should cache a + preflight response. + :type max_age_in_seconds: int + :param exposed_headers: Required. Required if CorsRule element is present. + A list of response headers to expose to CORS clients. + :type exposed_headers: list[str] + :param allowed_headers: Required. Required if CorsRule element is present. + A list of headers allowed to be part of the cross-origin request. + :type allowed_headers: list[str] + """ + + _validation = { + 'allowed_origins': {'required': True}, + 'allowed_methods': {'required': True}, + 'max_age_in_seconds': {'required': True}, + 'exposed_headers': {'required': True}, + 'allowed_headers': {'required': True}, + } + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + 'allowed_methods': {'key': 'allowedMethods', 'type': '[str]'}, + 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'int'}, + 'exposed_headers': {'key': 'exposedHeaders', 'type': '[str]'}, + 'allowed_headers': {'key': 'allowedHeaders', 'type': '[str]'}, + } + + def __init__(self, *, allowed_origins, allowed_methods, max_age_in_seconds: int, exposed_headers, allowed_headers, **kwargs) -> None: + super(CorsRule, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.allowed_methods = allowed_methods + self.max_age_in_seconds = max_age_in_seconds + self.exposed_headers = exposed_headers + self.allowed_headers = allowed_headers diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rules.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rules.py new file mode 100644 index 000000000000..531a5da028dc --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rules.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CorsRules(Model): + """Sets the CORS rules. You can include up to five CorsRule elements in the + request. . + + :param cors_rules: The List of CORS rules. You can include up to five + CorsRule elements in the request. + :type cors_rules: list[~azure.mgmt.storage.v2019_04_01.models.CorsRule] + """ + + _attribute_map = { + 'cors_rules': {'key': 'corsRules', 'type': '[CorsRule]'}, + } + + def __init__(self, **kwargs): + super(CorsRules, self).__init__(**kwargs) + self.cors_rules = kwargs.get('cors_rules', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rules_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rules_py3.py new file mode 100644 index 000000000000..76a311f7f399 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/cors_rules_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CorsRules(Model): + """Sets the CORS rules. You can include up to five CorsRule elements in the + request. . + + :param cors_rules: The List of CORS rules. You can include up to five + CorsRule elements in the request. + :type cors_rules: list[~azure.mgmt.storage.v2019_04_01.models.CorsRule] + """ + + _attribute_map = { + 'cors_rules': {'key': 'corsRules', 'type': '[CorsRule]'}, + } + + def __init__(self, *, cors_rules=None, **kwargs) -> None: + super(CorsRules, self).__init__(**kwargs) + self.cors_rules = cors_rules diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/custom_domain.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/custom_domain.py new file mode 100644 index 000000000000..d5cc10da36cb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/custom_domain.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomDomain(Model): + """The custom domain assigned to this storage account. This can be set via + Update. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the custom domain name assigned to the + storage account. Name is the CNAME source. + :type name: str + :param use_sub_domain_name: Indicates whether indirect CName validation is + enabled. Default value is false. This should only be set on updates. + :type use_sub_domain_name: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'use_sub_domain_name': {'key': 'useSubDomainName', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(CustomDomain, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.use_sub_domain_name = kwargs.get('use_sub_domain_name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/custom_domain_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/custom_domain_py3.py new file mode 100644 index 000000000000..25dce0b57aee --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/custom_domain_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomDomain(Model): + """The custom domain assigned to this storage account. This can be set via + Update. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the custom domain name assigned to the + storage account. Name is the CNAME source. + :type name: str + :param use_sub_domain_name: Indicates whether indirect CName validation is + enabled. Default value is false. This should only be set on updates. + :type use_sub_domain_name: bool + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'use_sub_domain_name': {'key': 'useSubDomainName', 'type': 'bool'}, + } + + def __init__(self, *, name: str, use_sub_domain_name: bool=None, **kwargs) -> None: + super(CustomDomain, self).__init__(**kwargs) + self.name = name + self.use_sub_domain_name = use_sub_domain_name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_creation.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_creation.py new file mode 100644 index 000000000000..41272568a7a6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_creation.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DateAfterCreation(Model): + """Object to define the number of days after creation. + + All required parameters must be populated in order to send to Azure. + + :param days_after_creation_greater_than: Required. Integer value + indicating the age in days after creation + :type days_after_creation_greater_than: int + """ + + _validation = { + 'days_after_creation_greater_than': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'days_after_creation_greater_than': {'key': 'daysAfterCreationGreaterThan', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DateAfterCreation, self).__init__(**kwargs) + self.days_after_creation_greater_than = kwargs.get('days_after_creation_greater_than', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_creation_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_creation_py3.py new file mode 100644 index 000000000000..ad6001e55a4e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_creation_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DateAfterCreation(Model): + """Object to define the number of days after creation. + + All required parameters must be populated in order to send to Azure. + + :param days_after_creation_greater_than: Required. Integer value + indicating the age in days after creation + :type days_after_creation_greater_than: int + """ + + _validation = { + 'days_after_creation_greater_than': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'days_after_creation_greater_than': {'key': 'daysAfterCreationGreaterThan', 'type': 'int'}, + } + + def __init__(self, *, days_after_creation_greater_than: int, **kwargs) -> None: + super(DateAfterCreation, self).__init__(**kwargs) + self.days_after_creation_greater_than = days_after_creation_greater_than diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_modification.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_modification.py new file mode 100644 index 000000000000..772272ba044a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_modification.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DateAfterModification(Model): + """Object to define the number of days after last modification. + + All required parameters must be populated in order to send to Azure. + + :param days_after_modification_greater_than: Required. Integer value + indicating the age in days after last modification + :type days_after_modification_greater_than: int + """ + + _validation = { + 'days_after_modification_greater_than': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'days_after_modification_greater_than': {'key': 'daysAfterModificationGreaterThan', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DateAfterModification, self).__init__(**kwargs) + self.days_after_modification_greater_than = kwargs.get('days_after_modification_greater_than', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_modification_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_modification_py3.py new file mode 100644 index 000000000000..cd8433ba06fa --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/date_after_modification_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DateAfterModification(Model): + """Object to define the number of days after last modification. + + All required parameters must be populated in order to send to Azure. + + :param days_after_modification_greater_than: Required. Integer value + indicating the age in days after last modification + :type days_after_modification_greater_than: int + """ + + _validation = { + 'days_after_modification_greater_than': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'days_after_modification_greater_than': {'key': 'daysAfterModificationGreaterThan', 'type': 'int'}, + } + + def __init__(self, *, days_after_modification_greater_than: int, **kwargs) -> None: + super(DateAfterModification, self).__init__(**kwargs) + self.days_after_modification_greater_than = days_after_modification_greater_than diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/delete_retention_policy.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/delete_retention_policy.py new file mode 100644 index 000000000000..1edc91c2320a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/delete_retention_policy.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeleteRetentionPolicy(Model): + """The blob service properties for soft delete. + + :param enabled: Indicates whether DeleteRetentionPolicy is enabled for the + Blob service. + :type enabled: bool + :param days: Indicates the number of days that the deleted blob should be + retained. The minimum specified value can be 1 and the maximum value can + be 365. + :type days: int + """ + + _validation = { + 'days': {'maximum': 365, 'minimum': 1}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'days': {'key': 'days', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DeleteRetentionPolicy, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.days = kwargs.get('days', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/delete_retention_policy_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/delete_retention_policy_py3.py new file mode 100644 index 000000000000..9fcc691aadad --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/delete_retention_policy_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeleteRetentionPolicy(Model): + """The blob service properties for soft delete. + + :param enabled: Indicates whether DeleteRetentionPolicy is enabled for the + Blob service. + :type enabled: bool + :param days: Indicates the number of days that the deleted blob should be + retained. The minimum specified value can be 1 and the maximum value can + be 365. + :type days: int + """ + + _validation = { + 'days': {'maximum': 365, 'minimum': 1}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'days': {'key': 'days', 'type': 'int'}, + } + + def __init__(self, *, enabled: bool=None, days: int=None, **kwargs) -> None: + super(DeleteRetentionPolicy, self).__init__(**kwargs) + self.enabled = enabled + self.days = days diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/dimension.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/dimension.py new file mode 100644 index 000000000000..2398aa46e8f6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/dimension.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Dimension(Model): + """Dimension of blobs, possibly be blob type or access tier. + + :param name: Display name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Dimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/dimension_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/dimension_py3.py new file mode 100644 index 000000000000..af5b0aac3d23 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/dimension_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Dimension(Model): + """Dimension of blobs, possibly be blob type or access tier. + + :param name: Display name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(Dimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption.py new file mode 100644 index 000000000000..c21ec9be6297 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Encryption(Model): + """The encryption settings on the storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: List of services which support encryption. + :type services: ~azure.mgmt.storage.v2019_04_01.models.EncryptionServices + :param key_source: Required. The encryption keySource (provider). Possible + values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. + Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. + Default value: "Microsoft.Storage" . + :type key_source: str or ~azure.mgmt.storage.v2019_04_01.models.KeySource + :param key_vault_properties: Properties provided by key vault. + :type key_vault_properties: + ~azure.mgmt.storage.v2019_04_01.models.KeyVaultProperties + """ + + _validation = { + 'key_source': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'services', 'type': 'EncryptionServices'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyvaultproperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, **kwargs): + super(Encryption, self).__init__(**kwargs) + self.services = kwargs.get('services', None) + self.key_source = kwargs.get('key_source', "Microsoft.Storage") + self.key_vault_properties = kwargs.get('key_vault_properties', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_py3.py new file mode 100644 index 000000000000..d0ad9fc70703 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Encryption(Model): + """The encryption settings on the storage account. + + All required parameters must be populated in order to send to Azure. + + :param services: List of services which support encryption. + :type services: ~azure.mgmt.storage.v2019_04_01.models.EncryptionServices + :param key_source: Required. The encryption keySource (provider). Possible + values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. + Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. + Default value: "Microsoft.Storage" . + :type key_source: str or ~azure.mgmt.storage.v2019_04_01.models.KeySource + :param key_vault_properties: Properties provided by key vault. + :type key_vault_properties: + ~azure.mgmt.storage.v2019_04_01.models.KeyVaultProperties + """ + + _validation = { + 'key_source': {'required': True}, + } + + _attribute_map = { + 'services': {'key': 'services', 'type': 'EncryptionServices'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyvaultproperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, *, services=None, key_source="Microsoft.Storage", key_vault_properties=None, **kwargs) -> None: + super(Encryption, self).__init__(**kwargs) + self.services = services + self.key_source = key_source + self.key_vault_properties = key_vault_properties diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_service.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_service.py new file mode 100644 index 000000000000..3a020c468f64 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_service.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionService(Model): + """A service that allows server-side encryption to be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param enabled: A boolean indicating whether or not the service encrypts + the data as it is stored. + :type enabled: bool + :ivar last_enabled_time: Gets a rough estimate of the date/time when the + encryption was last enabled by the user. Only returned when encryption is + enabled. There might be some unencrypted blobs which were written after + this time, as it is just a rough estimate. + :vartype last_enabled_time: datetime + """ + + _validation = { + 'last_enabled_time': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'last_enabled_time': {'key': 'lastEnabledTime', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(EncryptionService, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.last_enabled_time = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_service_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_service_py3.py new file mode 100644 index 000000000000..0566050c6155 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_service_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionService(Model): + """A service that allows server-side encryption to be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param enabled: A boolean indicating whether or not the service encrypts + the data as it is stored. + :type enabled: bool + :ivar last_enabled_time: Gets a rough estimate of the date/time when the + encryption was last enabled by the user. Only returned when encryption is + enabled. There might be some unencrypted blobs which were written after + this time, as it is just a rough estimate. + :vartype last_enabled_time: datetime + """ + + _validation = { + 'last_enabled_time': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'last_enabled_time': {'key': 'lastEnabledTime', 'type': 'iso-8601'}, + } + + def __init__(self, *, enabled: bool=None, **kwargs) -> None: + super(EncryptionService, self).__init__(**kwargs) + self.enabled = enabled + self.last_enabled_time = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_services.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_services.py new file mode 100644 index 000000000000..fb40fccb84c0 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_services.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionServices(Model): + """A list of services that support encryption. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param blob: The encryption function of the blob storage service. + :type blob: ~azure.mgmt.storage.v2019_04_01.models.EncryptionService + :param file: The encryption function of the file storage service. + :type file: ~azure.mgmt.storage.v2019_04_01.models.EncryptionService + :ivar table: The encryption function of the table storage service. + :vartype table: ~azure.mgmt.storage.v2019_04_01.models.EncryptionService + :ivar queue: The encryption function of the queue storage service. + :vartype queue: ~azure.mgmt.storage.v2019_04_01.models.EncryptionService + """ + + _validation = { + 'table': {'readonly': True}, + 'queue': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'EncryptionService'}, + 'file': {'key': 'file', 'type': 'EncryptionService'}, + 'table': {'key': 'table', 'type': 'EncryptionService'}, + 'queue': {'key': 'queue', 'type': 'EncryptionService'}, + } + + def __init__(self, **kwargs): + super(EncryptionServices, self).__init__(**kwargs) + self.blob = kwargs.get('blob', None) + self.file = kwargs.get('file', None) + self.table = None + self.queue = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_services_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_services_py3.py new file mode 100644 index 000000000000..2c2c74940ae7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/encryption_services_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EncryptionServices(Model): + """A list of services that support encryption. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param blob: The encryption function of the blob storage service. + :type blob: ~azure.mgmt.storage.v2019_04_01.models.EncryptionService + :param file: The encryption function of the file storage service. + :type file: ~azure.mgmt.storage.v2019_04_01.models.EncryptionService + :ivar table: The encryption function of the table storage service. + :vartype table: ~azure.mgmt.storage.v2019_04_01.models.EncryptionService + :ivar queue: The encryption function of the queue storage service. + :vartype queue: ~azure.mgmt.storage.v2019_04_01.models.EncryptionService + """ + + _validation = { + 'table': {'readonly': True}, + 'queue': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'EncryptionService'}, + 'file': {'key': 'file', 'type': 'EncryptionService'}, + 'table': {'key': 'table', 'type': 'EncryptionService'}, + 'queue': {'key': 'queue', 'type': 'EncryptionService'}, + } + + def __init__(self, *, blob=None, file=None, **kwargs) -> None: + super(EncryptionServices, self).__init__(**kwargs) + self.blob = blob + self.file = file + self.table = None + self.queue = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/endpoints.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/endpoints.py new file mode 100644 index 000000000000..66b1c3459a5e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/endpoints.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Endpoints(Model): + """The URIs that are used to perform a retrieval of a public blob, queue, + table, web or dfs object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar blob: Gets the blob endpoint. + :vartype blob: str + :ivar queue: Gets the queue endpoint. + :vartype queue: str + :ivar table: Gets the table endpoint. + :vartype table: str + :ivar file: Gets the file endpoint. + :vartype file: str + :ivar web: Gets the web endpoint. + :vartype web: str + :ivar dfs: Gets the dfs endpoint. + :vartype dfs: str + """ + + _validation = { + 'blob': {'readonly': True}, + 'queue': {'readonly': True}, + 'table': {'readonly': True}, + 'file': {'readonly': True}, + 'web': {'readonly': True}, + 'dfs': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'str'}, + 'queue': {'key': 'queue', 'type': 'str'}, + 'table': {'key': 'table', 'type': 'str'}, + 'file': {'key': 'file', 'type': 'str'}, + 'web': {'key': 'web', 'type': 'str'}, + 'dfs': {'key': 'dfs', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Endpoints, self).__init__(**kwargs) + self.blob = None + self.queue = None + self.table = None + self.file = None + self.web = None + self.dfs = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/endpoints_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/endpoints_py3.py new file mode 100644 index 000000000000..ced561acd85b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/endpoints_py3.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Endpoints(Model): + """The URIs that are used to perform a retrieval of a public blob, queue, + table, web or dfs object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar blob: Gets the blob endpoint. + :vartype blob: str + :ivar queue: Gets the queue endpoint. + :vartype queue: str + :ivar table: Gets the table endpoint. + :vartype table: str + :ivar file: Gets the file endpoint. + :vartype file: str + :ivar web: Gets the web endpoint. + :vartype web: str + :ivar dfs: Gets the dfs endpoint. + :vartype dfs: str + """ + + _validation = { + 'blob': {'readonly': True}, + 'queue': {'readonly': True}, + 'table': {'readonly': True}, + 'file': {'readonly': True}, + 'web': {'readonly': True}, + 'dfs': {'readonly': True}, + } + + _attribute_map = { + 'blob': {'key': 'blob', 'type': 'str'}, + 'queue': {'key': 'queue', 'type': 'str'}, + 'table': {'key': 'table', 'type': 'str'}, + 'file': {'key': 'file', 'type': 'str'}, + 'web': {'key': 'web', 'type': 'str'}, + 'dfs': {'key': 'dfs', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Endpoints, self).__init__(**kwargs) + self.blob = None + self.queue = None + self.table = None + self.file = None + self.web = None + self.dfs = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/geo_replication_stats.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/geo_replication_stats.py new file mode 100644 index 000000000000..d83d4f51cc22 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/geo_replication_stats.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GeoReplicationStats(Model): + """Statistics related to replication for storage account's Blob, Table, Queue + and File services. It is only available when geo-redundant replication is + enabled for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The status of the secondary location. Possible values are: - + Live: Indicates that the secondary location is active and operational. - + Bootstrap: Indicates initial synchronization from the primary location to + the secondary location is in progress.This typically occurs when + replication is first enabled. - Unavailable: Indicates that the secondary + location is temporarily unavailable. Possible values include: 'Live', + 'Bootstrap', 'Unavailable' + :vartype status: str or + ~azure.mgmt.storage.v2019_04_01.models.GeoReplicationStatus + :ivar last_sync_time: All primary writes preceding this UTC date/time + value are guaranteed to be available for read operations. Primary writes + following this point in time may or may not be available for reads. + Element may be default value if value of LastSyncTime is not available, + this can happen if secondary is offline or we are in bootstrap. + :vartype last_sync_time: datetime + :ivar can_failover: A boolean flag which indicates whether or not account + failover is supported for the account. + :vartype can_failover: bool + """ + + _validation = { + 'status': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'can_failover': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'last_sync_time': {'key': 'lastSyncTime', 'type': 'iso-8601'}, + 'can_failover': {'key': 'canFailover', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(GeoReplicationStats, self).__init__(**kwargs) + self.status = None + self.last_sync_time = None + self.can_failover = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/geo_replication_stats_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/geo_replication_stats_py3.py new file mode 100644 index 000000000000..21f2de3459dc --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/geo_replication_stats_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GeoReplicationStats(Model): + """Statistics related to replication for storage account's Blob, Table, Queue + and File services. It is only available when geo-redundant replication is + enabled for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The status of the secondary location. Possible values are: - + Live: Indicates that the secondary location is active and operational. - + Bootstrap: Indicates initial synchronization from the primary location to + the secondary location is in progress.This typically occurs when + replication is first enabled. - Unavailable: Indicates that the secondary + location is temporarily unavailable. Possible values include: 'Live', + 'Bootstrap', 'Unavailable' + :vartype status: str or + ~azure.mgmt.storage.v2019_04_01.models.GeoReplicationStatus + :ivar last_sync_time: All primary writes preceding this UTC date/time + value are guaranteed to be available for read operations. Primary writes + following this point in time may or may not be available for reads. + Element may be default value if value of LastSyncTime is not available, + this can happen if secondary is offline or we are in bootstrap. + :vartype last_sync_time: datetime + :ivar can_failover: A boolean flag which indicates whether or not account + failover is supported for the account. + :vartype can_failover: bool + """ + + _validation = { + 'status': {'readonly': True}, + 'last_sync_time': {'readonly': True}, + 'can_failover': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'last_sync_time': {'key': 'lastSyncTime', 'type': 'iso-8601'}, + 'can_failover': {'key': 'canFailover', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(GeoReplicationStats, self).__init__(**kwargs) + self.status = None + self.last_sync_time = None + self.can_failover = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/identity.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/identity.py new file mode 100644 index 000000000000..f526b986fc70 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/identity.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: Required. The identity type. Default value: "SystemAssigned" . + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/identity_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/identity_py3.py new file mode 100644 index 000000000000..22d25fdd85b7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/identity_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :ivar type: Required. The identity type. Default value: "SystemAssigned" . + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__(self, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy.py new file mode 100644 index 000000000000..fe61acd49726 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource import AzureEntityResource + + +class ImmutabilityPolicy(AzureEntityResource): + """The ImmutabilityPolicy property of a blob container, including Id, resource + name, resource type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImmutabilityPolicy, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = kwargs.get('immutability_period_since_creation_in_days', None) + self.state = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy_properties.py new file mode 100644 index 000000000000..85118f0e9a6a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy_properties.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImmutabilityPolicyProperties(Model): + """The properties of an ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyState + :ivar etag: ImmutabilityPolicy Etag. + :vartype etag: str + :ivar update_history: The ImmutabilityPolicy update history of the blob + container. + :vartype update_history: + list[~azure.mgmt.storage.v2019_04_01.models.UpdateHistoryProperty] + """ + + _validation = { + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + 'etag': {'readonly': True}, + 'update_history': {'readonly': True}, + } + + _attribute_map = { + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'update_history': {'key': 'updateHistory', 'type': '[UpdateHistoryProperty]'}, + } + + def __init__(self, **kwargs): + super(ImmutabilityPolicyProperties, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = kwargs.get('immutability_period_since_creation_in_days', None) + self.state = None + self.etag = None + self.update_history = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy_properties_py3.py new file mode 100644 index 000000000000..feb15f507cfd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy_properties_py3.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ImmutabilityPolicyProperties(Model): + """The properties of an ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyState + :ivar etag: ImmutabilityPolicy Etag. + :vartype etag: str + :ivar update_history: The ImmutabilityPolicy update history of the blob + container. + :vartype update_history: + list[~azure.mgmt.storage.v2019_04_01.models.UpdateHistoryProperty] + """ + + _validation = { + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + 'etag': {'readonly': True}, + 'update_history': {'readonly': True}, + } + + _attribute_map = { + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'update_history': {'key': 'updateHistory', 'type': '[UpdateHistoryProperty]'}, + } + + def __init__(self, *, immutability_period_since_creation_in_days: int, **kwargs) -> None: + super(ImmutabilityPolicyProperties, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = immutability_period_since_creation_in_days + self.state = None + self.etag = None + self.update_history = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy_py3.py new file mode 100644 index 000000000000..1a92ce5b3ef4 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/immutability_policy_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource_py3 import AzureEntityResource + + +class ImmutabilityPolicy(AzureEntityResource): + """The ImmutabilityPolicy property of a blob container, including Id, resource + name, resource type, Etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param immutability_period_since_creation_in_days: Required. The + immutability period for the blobs in the container since the policy + creation, in days. + :type immutability_period_since_creation_in_days: int + :ivar state: The ImmutabilityPolicy state of a blob container, possible + values include: Locked and Unlocked. Possible values include: 'Locked', + 'Unlocked' + :vartype state: str or + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'required': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'properties.immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + } + + def __init__(self, *, immutability_period_since_creation_in_days: int, **kwargs) -> None: + super(ImmutabilityPolicy, self).__init__(**kwargs) + self.immutability_period_since_creation_in_days = immutability_period_since_creation_in_days + self.state = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/ip_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/ip_rule.py new file mode 100644 index 000000000000..0cd55ac093b2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/ip_rule.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2019_04_01.models.Action + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + } + + def __init__(self, **kwargs): + super(IPRule, self).__init__(**kwargs) + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) + self.action = kwargs.get('action', "Allow") diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/ip_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/ip_rule_py3.py new file mode 100644 index 000000000000..b3c4b39f4e1f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/ip_rule_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2019_04_01.models.Action + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + } + + def __init__(self, *, ip_address_or_range: str, action="Allow", **kwargs) -> None: + super(IPRule, self).__init__(**kwargs) + self.ip_address_or_range = ip_address_or_range + self.action = action diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/key_vault_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/key_vault_properties.py new file mode 100644 index 000000000000..44eaf379f6f2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/key_vault_properties.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultProperties(Model): + """Properties of key vault. + + :param key_name: The name of KeyVault key. + :type key_name: str + :param key_version: The version of KeyVault key. + :type key_version: str + :param key_vault_uri: The Uri of KeyVault. + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyname', 'type': 'str'}, + 'key_version': {'key': 'keyversion', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + self.key_vault_uri = kwargs.get('key_vault_uri', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/key_vault_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/key_vault_properties_py3.py new file mode 100644 index 000000000000..9e6350eec898 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/key_vault_properties_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KeyVaultProperties(Model): + """Properties of key vault. + + :param key_name: The name of KeyVault key. + :type key_name: str + :param key_version: The version of KeyVault key. + :type key_version: str + :param key_vault_uri: The Uri of KeyVault. + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_name': {'key': 'keyname', 'type': 'str'}, + 'key_version': {'key': 'keyversion', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'}, + } + + def __init__(self, *, key_name: str=None, key_version: str=None, key_vault_uri: str=None, **kwargs) -> None: + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = key_name + self.key_version = key_version + self.key_vault_uri = key_vault_uri diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_request.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_request.py new file mode 100644 index 000000000000..5ea2f5bd8129 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_request.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2019_04_01.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.lease_id = kwargs.get('lease_id', None) + self.break_period = kwargs.get('break_period', None) + self.lease_duration = kwargs.get('lease_duration', None) + self.proposed_lease_id = kwargs.get('proposed_lease_id', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_request_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_request_py3.py new file mode 100644 index 000000000000..95b2c23d6446 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_request_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerRequest(Model): + """Lease Container request schema. + + All required parameters must be populated in order to send to Azure. + + :param action: Required. Specifies the lease action. Can be one of the + available actions. Possible values include: 'Acquire', 'Renew', 'Change', + 'Release', 'Break' + :type action: str or ~azure.mgmt.storage.v2019_04_01.models.enum + :param lease_id: Identifies the lease. Can be specified in any valid GUID + string format. + :type lease_id: str + :param break_period: Optional. For a break action, proposed duration the + lease should continue before it is broken, in seconds, between 0 and 60. + :type break_period: int + :param lease_duration: Required for acquire. Specifies the duration of the + lease, in seconds, or negative one (-1) for a lease that never expires. + :type lease_duration: int + :param proposed_lease_id: Optional for acquire, required for change. + Proposed lease ID, in a GUID string format. + :type proposed_lease_id: str + """ + + _validation = { + 'action': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'break_period': {'key': 'breakPeriod', 'type': 'int'}, + 'lease_duration': {'key': 'leaseDuration', 'type': 'int'}, + 'proposed_lease_id': {'key': 'proposedLeaseId', 'type': 'str'}, + } + + def __init__(self, *, action, lease_id: str=None, break_period: int=None, lease_duration: int=None, proposed_lease_id: str=None, **kwargs) -> None: + super(LeaseContainerRequest, self).__init__(**kwargs) + self.action = action + self.lease_id = lease_id + self.break_period = break_period + self.lease_duration = lease_duration + self.proposed_lease_id = proposed_lease_id diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_response.py new file mode 100644 index 000000000000..666f0e899f1e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = kwargs.get('lease_id', None) + self.lease_time_seconds = kwargs.get('lease_time_seconds', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_response_py3.py new file mode 100644 index 000000000000..fa87d930571d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/lease_container_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LeaseContainerResponse(Model): + """Lease Container response schema. + + :param lease_id: Returned unique lease ID that must be included with any + request to delete the container, or to renew, change, or release the + lease. + :type lease_id: str + :param lease_time_seconds: Approximate time remaining in the lease period, + in seconds. + :type lease_time_seconds: str + """ + + _attribute_map = { + 'lease_id': {'key': 'leaseId', 'type': 'str'}, + 'lease_time_seconds': {'key': 'leaseTimeSeconds', 'type': 'str'}, + } + + def __init__(self, *, lease_id: str=None, lease_time_seconds: str=None, **kwargs) -> None: + super(LeaseContainerResponse, self).__init__(**kwargs) + self.lease_id = lease_id + self.lease_time_seconds = lease_time_seconds diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold.py new file mode 100644 index 000000000000..4eb93df1d9fe --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHold(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: Required. Each tag should be 3 to 23 alphanumeric characters + and is normalized to lower case at SRP. + :type tags: list[str] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(LegalHold, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold_properties.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold_properties.py new file mode 100644 index 000000000000..25c094cf5116 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold_properties.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHoldProperties(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: The list of LegalHold tags of a blob container. + :type tags: list[~azure.mgmt.storage.v2019_04_01.models.TagProperty] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[TagProperty]'}, + } + + def __init__(self, **kwargs): + super(LegalHoldProperties, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold_properties_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold_properties_py3.py new file mode 100644 index 000000000000..fb97a82969c3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold_properties_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHoldProperties(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: The list of LegalHold tags of a blob container. + :type tags: list[~azure.mgmt.storage.v2019_04_01.models.TagProperty] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[TagProperty]'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(LegalHoldProperties, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = tags diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold_py3.py new file mode 100644 index 000000000000..a4bc196cb604 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/legal_hold_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LegalHold(Model): + """The LegalHold property of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :param tags: Required. Each tag should be 3 to 23 alphanumeric characters + and is normalized to lower case at SRP. + :type tags: list[str] + """ + + _validation = { + 'has_legal_hold': {'readonly': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'has_legal_hold': {'key': 'hasLegalHold', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + } + + def __init__(self, *, tags, **kwargs) -> None: + super(LegalHold, self).__init__(**kwargs) + self.has_legal_hold = None + self.tags = tags diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_account_sas_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_account_sas_response.py new file mode 100644 index 000000000000..a56e959a34bd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_account_sas_response.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListAccountSasResponse(Model): + """The List SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_sas_token: List SAS credentials of storage account. + :vartype account_sas_token: str + """ + + _validation = { + 'account_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'account_sas_token': {'key': 'accountSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListAccountSasResponse, self).__init__(**kwargs) + self.account_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_account_sas_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_account_sas_response_py3.py new file mode 100644 index 000000000000..b8b9a314d9f6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_account_sas_response_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListAccountSasResponse(Model): + """The List SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_sas_token: List SAS credentials of storage account. + :vartype account_sas_token: str + """ + + _validation = { + 'account_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'account_sas_token': {'key': 'accountSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListAccountSasResponse, self).__init__(**kwargs) + self.account_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_item.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_item.py new file mode 100644 index 000000000000..08ab8e20bffb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_item.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource import AzureEntityResource + + +class ListContainerItem(AzureEntityResource): + """The blob container properties be listed out. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2019_04_01.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2019_04_01.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ListContainerItem, self).__init__(**kwargs) + self.public_access = kwargs.get('public_access', None) + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = kwargs.get('metadata', None) + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_item_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_item_py3.py new file mode 100644 index 000000000000..9c4864dc7694 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_item_py3.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .azure_entity_resource_py3 import AzureEntityResource + + +class ListContainerItem(AzureEntityResource): + """The blob container properties be listed out. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2019_04_01.models.PublicAccess + :ivar last_modified_time: Returns the date and time the container was last + modified. + :vartype last_modified_time: datetime + :ivar lease_status: The lease status of the container. Possible values + include: 'Locked', 'Unlocked' + :vartype lease_status: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseStatus + :ivar lease_state: Lease state of the container. Possible values include: + 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + :vartype lease_state: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseState + :ivar lease_duration: Specifies whether the lease on a container is of + infinite or fixed duration, only when the container is leased. Possible + values include: 'Infinite', 'Fixed' + :vartype lease_duration: str or + ~azure.mgmt.storage.v2019_04_01.models.LeaseDuration + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :ivar immutability_policy: The ImmutabilityPolicy property of the + container. + :vartype immutability_policy: + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyProperties + :ivar legal_hold: The LegalHold property of the container. + :vartype legal_hold: + ~azure.mgmt.storage.v2019_04_01.models.LegalHoldProperties + :ivar has_legal_hold: The hasLegalHold public property is set to true by + SRP if there are at least one existing tag. The hasLegalHold public + property is set to false by SRP if all existing legal hold tags are + cleared out. There can be a maximum of 1000 blob containers with + hasLegalHold=true for a given account. + :vartype has_legal_hold: bool + :ivar has_immutability_policy: The hasImmutabilityPolicy public property + is set to true by SRP if ImmutabilityPolicy has been created for this + container. The hasImmutabilityPolicy public property is set to false by + SRP if ImmutabilityPolicy has not been created for this container. + :vartype has_immutability_policy: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'lease_status': {'readonly': True}, + 'lease_state': {'readonly': True}, + 'lease_duration': {'readonly': True}, + 'immutability_policy': {'readonly': True}, + 'legal_hold': {'readonly': True}, + 'has_legal_hold': {'readonly': True}, + 'has_immutability_policy': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'}, + 'lease_state': {'key': 'properties.leaseState', 'type': 'str'}, + 'lease_duration': {'key': 'properties.leaseDuration', 'type': 'str'}, + 'metadata': {'key': 'properties.metadata', 'type': '{str}'}, + 'immutability_policy': {'key': 'properties.immutabilityPolicy', 'type': 'ImmutabilityPolicyProperties'}, + 'legal_hold': {'key': 'properties.legalHold', 'type': 'LegalHoldProperties'}, + 'has_legal_hold': {'key': 'properties.hasLegalHold', 'type': 'bool'}, + 'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'}, + } + + def __init__(self, *, public_access=None, metadata=None, **kwargs) -> None: + super(ListContainerItem, self).__init__(**kwargs) + self.public_access = public_access + self.last_modified_time = None + self.lease_status = None + self.lease_state = None + self.lease_duration = None + self.metadata = metadata + self.immutability_policy = None + self.legal_hold = None + self.has_legal_hold = None + self.has_immutability_policy = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_items.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_items.py new file mode 100644 index 000000000000..4e3cf5184ed6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_items.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListContainerItems(Model): + """The list of blob containers. + + :param value: The list of blob containers. + :type value: + list[~azure.mgmt.storage.v2019_04_01.models.ListContainerItem] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ListContainerItem]'}, + } + + def __init__(self, **kwargs): + super(ListContainerItems, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_items_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_items_py3.py new file mode 100644 index 000000000000..50bdde68bf2e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_container_items_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListContainerItems(Model): + """The list of blob containers. + + :param value: The list of blob containers. + :type value: + list[~azure.mgmt.storage.v2019_04_01.models.ListContainerItem] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ListContainerItem]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ListContainerItems, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_service_sas_response.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_service_sas_response.py new file mode 100644 index 000000000000..d4ab160ae364 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_service_sas_response.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListServiceSasResponse(Model): + """The List service SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_sas_token: List service SAS credentials of specific + resource. + :vartype service_sas_token: str + """ + + _validation = { + 'service_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'service_sas_token': {'key': 'serviceSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListServiceSasResponse, self).__init__(**kwargs) + self.service_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_service_sas_response_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_service_sas_response_py3.py new file mode 100644 index 000000000000..7c20617658df --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/list_service_sas_response_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ListServiceSasResponse(Model): + """The List service SAS credentials operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_sas_token: List service SAS credentials of specific + resource. + :vartype service_sas_token: str + """ + + _validation = { + 'service_sas_token': {'readonly': True}, + } + + _attribute_map = { + 'service_sas_token': {'key': 'serviceSasToken', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListServiceSasResponse, self).__init__(**kwargs) + self.service_sas_token = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy.py new file mode 100644 index 000000000000..14467856180b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ManagementPolicy(Resource): + """The Get Storage Account ManagementPolicies operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar last_modified_time: Returns the date and time the ManagementPolicies + was last modified. + :vartype last_modified_time: datetime + :param policy: Required. The Storage Account ManagementPolicy, in JSON + format. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicySchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'policy': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'policy': {'key': 'properties.policy', 'type': 'ManagementPolicySchema'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicy, self).__init__(**kwargs) + self.last_modified_time = None + self.policy = kwargs.get('policy', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_action.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_action.py new file mode 100644 index 000000000000..2f2b7f6f0079 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_action.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyAction(Model): + """Actions are applied to the filtered blobs when the execution condition is + met. + + :param base_blob: The management policy action for base blob + :type base_blob: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyBaseBlob + :param snapshot: The management policy action for snapshot + :type snapshot: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicySnapShot + """ + + _attribute_map = { + 'base_blob': {'key': 'baseBlob', 'type': 'ManagementPolicyBaseBlob'}, + 'snapshot': {'key': 'snapshot', 'type': 'ManagementPolicySnapShot'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicyAction, self).__init__(**kwargs) + self.base_blob = kwargs.get('base_blob', None) + self.snapshot = kwargs.get('snapshot', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_action_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_action_py3.py new file mode 100644 index 000000000000..914dc669ce68 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_action_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyAction(Model): + """Actions are applied to the filtered blobs when the execution condition is + met. + + :param base_blob: The management policy action for base blob + :type base_blob: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyBaseBlob + :param snapshot: The management policy action for snapshot + :type snapshot: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicySnapShot + """ + + _attribute_map = { + 'base_blob': {'key': 'baseBlob', 'type': 'ManagementPolicyBaseBlob'}, + 'snapshot': {'key': 'snapshot', 'type': 'ManagementPolicySnapShot'}, + } + + def __init__(self, *, base_blob=None, snapshot=None, **kwargs) -> None: + super(ManagementPolicyAction, self).__init__(**kwargs) + self.base_blob = base_blob + self.snapshot = snapshot diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_base_blob.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_base_blob.py new file mode 100644 index 000000000000..57f2e67c95d5 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_base_blob.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyBaseBlob(Model): + """Management policy action for base blob. + + :param tier_to_cool: The function to tier blobs to cool storage. Support + blobs currently at Hot tier + :type tier_to_cool: + ~azure.mgmt.storage.v2019_04_01.models.DateAfterModification + :param tier_to_archive: The function to tier blobs to archive storage. + Support blobs currently at Hot or Cool tier + :type tier_to_archive: + ~azure.mgmt.storage.v2019_04_01.models.DateAfterModification + :param delete: The function to delete the blob + :type delete: ~azure.mgmt.storage.v2019_04_01.models.DateAfterModification + """ + + _attribute_map = { + 'tier_to_cool': {'key': 'tierToCool', 'type': 'DateAfterModification'}, + 'tier_to_archive': {'key': 'tierToArchive', 'type': 'DateAfterModification'}, + 'delete': {'key': 'delete', 'type': 'DateAfterModification'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicyBaseBlob, self).__init__(**kwargs) + self.tier_to_cool = kwargs.get('tier_to_cool', None) + self.tier_to_archive = kwargs.get('tier_to_archive', None) + self.delete = kwargs.get('delete', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_base_blob_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_base_blob_py3.py new file mode 100644 index 000000000000..c6ae1278e942 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_base_blob_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyBaseBlob(Model): + """Management policy action for base blob. + + :param tier_to_cool: The function to tier blobs to cool storage. Support + blobs currently at Hot tier + :type tier_to_cool: + ~azure.mgmt.storage.v2019_04_01.models.DateAfterModification + :param tier_to_archive: The function to tier blobs to archive storage. + Support blobs currently at Hot or Cool tier + :type tier_to_archive: + ~azure.mgmt.storage.v2019_04_01.models.DateAfterModification + :param delete: The function to delete the blob + :type delete: ~azure.mgmt.storage.v2019_04_01.models.DateAfterModification + """ + + _attribute_map = { + 'tier_to_cool': {'key': 'tierToCool', 'type': 'DateAfterModification'}, + 'tier_to_archive': {'key': 'tierToArchive', 'type': 'DateAfterModification'}, + 'delete': {'key': 'delete', 'type': 'DateAfterModification'}, + } + + def __init__(self, *, tier_to_cool=None, tier_to_archive=None, delete=None, **kwargs) -> None: + super(ManagementPolicyBaseBlob, self).__init__(**kwargs) + self.tier_to_cool = tier_to_cool + self.tier_to_archive = tier_to_archive + self.delete = delete diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_definition.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_definition.py new file mode 100644 index 000000000000..c544479dde2a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_definition.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyDefinition(Model): + """An object that defines the Lifecycle rule. Each definition is made up with + a filters set and an actions set. + + All required parameters must be populated in order to send to Azure. + + :param actions: Required. An object that defines the action set. + :type actions: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyAction + :param filters: An object that defines the filter set. + :type filters: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyFilter + """ + + _validation = { + 'actions': {'required': True}, + } + + _attribute_map = { + 'actions': {'key': 'actions', 'type': 'ManagementPolicyAction'}, + 'filters': {'key': 'filters', 'type': 'ManagementPolicyFilter'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicyDefinition, self).__init__(**kwargs) + self.actions = kwargs.get('actions', None) + self.filters = kwargs.get('filters', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_definition_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_definition_py3.py new file mode 100644 index 000000000000..5b272d094b83 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_definition_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyDefinition(Model): + """An object that defines the Lifecycle rule. Each definition is made up with + a filters set and an actions set. + + All required parameters must be populated in order to send to Azure. + + :param actions: Required. An object that defines the action set. + :type actions: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyAction + :param filters: An object that defines the filter set. + :type filters: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyFilter + """ + + _validation = { + 'actions': {'required': True}, + } + + _attribute_map = { + 'actions': {'key': 'actions', 'type': 'ManagementPolicyAction'}, + 'filters': {'key': 'filters', 'type': 'ManagementPolicyFilter'}, + } + + def __init__(self, *, actions, filters=None, **kwargs) -> None: + super(ManagementPolicyDefinition, self).__init__(**kwargs) + self.actions = actions + self.filters = filters diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_filter.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_filter.py new file mode 100644 index 000000000000..29a7cadc9444 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_filter.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyFilter(Model): + """Filters limit rule actions to a subset of blobs within the storage account. + If multiple filters are defined, a logical AND is performed on all filters. + . + + All required parameters must be populated in order to send to Azure. + + :param prefix_match: An array of strings for prefixes to be match. + :type prefix_match: list[str] + :param blob_types: Required. An array of predefined enum values. Only + blockBlob is supported. + :type blob_types: list[str] + """ + + _validation = { + 'blob_types': {'required': True}, + } + + _attribute_map = { + 'prefix_match': {'key': 'prefixMatch', 'type': '[str]'}, + 'blob_types': {'key': 'blobTypes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicyFilter, self).__init__(**kwargs) + self.prefix_match = kwargs.get('prefix_match', None) + self.blob_types = kwargs.get('blob_types', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_filter_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_filter_py3.py new file mode 100644 index 000000000000..2bf8d03ca66f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_filter_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyFilter(Model): + """Filters limit rule actions to a subset of blobs within the storage account. + If multiple filters are defined, a logical AND is performed on all filters. + . + + All required parameters must be populated in order to send to Azure. + + :param prefix_match: An array of strings for prefixes to be match. + :type prefix_match: list[str] + :param blob_types: Required. An array of predefined enum values. Only + blockBlob is supported. + :type blob_types: list[str] + """ + + _validation = { + 'blob_types': {'required': True}, + } + + _attribute_map = { + 'prefix_match': {'key': 'prefixMatch', 'type': '[str]'}, + 'blob_types': {'key': 'blobTypes', 'type': '[str]'}, + } + + def __init__(self, *, blob_types, prefix_match=None, **kwargs) -> None: + super(ManagementPolicyFilter, self).__init__(**kwargs) + self.prefix_match = prefix_match + self.blob_types = blob_types diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_py3.py new file mode 100644 index 000000000000..03d52823c735 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ManagementPolicy(Resource): + """The Get Storage Account ManagementPolicies operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar last_modified_time: Returns the date and time the ManagementPolicies + was last modified. + :vartype last_modified_time: datetime + :param policy: Required. The Storage Account ManagementPolicy, in JSON + format. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicySchema + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'last_modified_time': {'readonly': True}, + 'policy': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, + 'policy': {'key': 'properties.policy', 'type': 'ManagementPolicySchema'}, + } + + def __init__(self, *, policy, **kwargs) -> None: + super(ManagementPolicy, self).__init__(**kwargs) + self.last_modified_time = None + self.policy = policy diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_rule.py new file mode 100644 index 000000000000..5398557cd68d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_rule.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyRule(Model): + """An object that wraps the Lifecycle rule. Each rule is uniquely defined by + name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Rule is enabled if set to true. + :type enabled: bool + :param name: Required. A rule name can contain any combination of alpha + numeric characters. Rule name is case-sensitive. It must be unique within + a policy. + :type name: str + :ivar type: Required. The valid value is Lifecycle. Default value: + "Lifecycle" . + :vartype type: str + :param definition: Required. An object that defines the Lifecycle rule. + :type definition: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyDefinition + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + 'definition': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'definition': {'key': 'definition', 'type': 'ManagementPolicyDefinition'}, + } + + type = "Lifecycle" + + def __init__(self, **kwargs): + super(ManagementPolicyRule, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.name = kwargs.get('name', None) + self.definition = kwargs.get('definition', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_rule_py3.py new file mode 100644 index 000000000000..9072352d1563 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_rule_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicyRule(Model): + """An object that wraps the Lifecycle rule. Each rule is uniquely defined by + name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Rule is enabled if set to true. + :type enabled: bool + :param name: Required. A rule name can contain any combination of alpha + numeric characters. Rule name is case-sensitive. It must be unique within + a policy. + :type name: str + :ivar type: Required. The valid value is Lifecycle. Default value: + "Lifecycle" . + :vartype type: str + :param definition: Required. An object that defines the Lifecycle rule. + :type definition: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyDefinition + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + 'definition': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'definition': {'key': 'definition', 'type': 'ManagementPolicyDefinition'}, + } + + type = "Lifecycle" + + def __init__(self, *, name: str, definition, enabled: bool=None, **kwargs) -> None: + super(ManagementPolicyRule, self).__init__(**kwargs) + self.enabled = enabled + self.name = name + self.definition = definition diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_schema.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_schema.py new file mode 100644 index 000000000000..266e8915b5f3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_schema.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicySchema(Model): + """The Storage Account ManagementPolicies Rules. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + + All required parameters must be populated in order to send to Azure. + + :param rules: Required. The Storage Account ManagementPolicies Rules. See + more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type rules: + list[~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyRule] + """ + + _validation = { + 'rules': {'required': True}, + } + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[ManagementPolicyRule]'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicySchema, self).__init__(**kwargs) + self.rules = kwargs.get('rules', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_schema_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_schema_py3.py new file mode 100644 index 000000000000..87022a91e270 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_schema_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicySchema(Model): + """The Storage Account ManagementPolicies Rules. See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + + All required parameters must be populated in order to send to Azure. + + :param rules: Required. The Storage Account ManagementPolicies Rules. See + more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type rules: + list[~azure.mgmt.storage.v2019_04_01.models.ManagementPolicyRule] + """ + + _validation = { + 'rules': {'required': True}, + } + + _attribute_map = { + 'rules': {'key': 'rules', 'type': '[ManagementPolicyRule]'}, + } + + def __init__(self, *, rules, **kwargs) -> None: + super(ManagementPolicySchema, self).__init__(**kwargs) + self.rules = rules diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_snap_shot.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_snap_shot.py new file mode 100644 index 000000000000..aaddccb5f2c7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_snap_shot.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicySnapShot(Model): + """Management policy action for snapshot. + + :param delete: The function to delete the blob snapshot + :type delete: ~azure.mgmt.storage.v2019_04_01.models.DateAfterCreation + """ + + _attribute_map = { + 'delete': {'key': 'delete', 'type': 'DateAfterCreation'}, + } + + def __init__(self, **kwargs): + super(ManagementPolicySnapShot, self).__init__(**kwargs) + self.delete = kwargs.get('delete', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_snap_shot_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_snap_shot_py3.py new file mode 100644 index 000000000000..e953fe148865 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/management_policy_snap_shot_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ManagementPolicySnapShot(Model): + """Management policy action for snapshot. + + :param delete: The function to delete the blob snapshot + :type delete: ~azure.mgmt.storage.v2019_04_01.models.DateAfterCreation + """ + + _attribute_map = { + 'delete': {'key': 'delete', 'type': 'DateAfterCreation'}, + } + + def __init__(self, *, delete=None, **kwargs) -> None: + super(ManagementPolicySnapShot, self).__init__(**kwargs) + self.delete = delete diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/metric_specification.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/metric_specification.py new file mode 100644 index 000000000000..2ae5c9354f35 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/metric_specification.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricSpecification(Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: Unit could be Bytes or Count. + :type unit: str + :param dimensions: Dimensions of blobs, including blob type and access + tier. + :type dimensions: list[~azure.mgmt.storage.v2019_04_01.models.Dimension] + :param aggregation_type: Aggregation type could be Average. + :type aggregation_type: str + :param fill_gap_with_zero: The property to decide fill gap with zero or + not. + :type fill_gap_with_zero: bool + :param category: The category this metric specification belong to, could + be Capacity. + :type category: str + :param resource_id_dimension_name_override: Account Resource Id. + :type resource_id_dimension_name_override: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.dimensions = kwargs.get('dimensions', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.category = kwargs.get('category', None) + self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/metric_specification_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/metric_specification_py3.py new file mode 100644 index 000000000000..345601a824c4 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/metric_specification_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MetricSpecification(Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: Unit could be Bytes or Count. + :type unit: str + :param dimensions: Dimensions of blobs, including blob type and access + tier. + :type dimensions: list[~azure.mgmt.storage.v2019_04_01.models.Dimension] + :param aggregation_type: Aggregation type could be Average. + :type aggregation_type: str + :param fill_gap_with_zero: The property to decide fill gap with zero or + not. + :type fill_gap_with_zero: bool + :param category: The category this metric specification belong to, could + be Capacity. + :type category: str + :param resource_id_dimension_name_override: Account Resource Id. + :type resource_id_dimension_name_override: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, dimensions=None, aggregation_type: str=None, fill_gap_with_zero: bool=None, category: str=None, resource_id_dimension_name_override: str=None, **kwargs) -> None: + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.dimensions = dimensions + self.aggregation_type = aggregation_type + self.fill_gap_with_zero = fill_gap_with_zero + self.category = category + self.resource_id_dimension_name_override = resource_id_dimension_name_override diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/network_rule_set.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/network_rule_set.py new file mode 100644 index 000000000000..c924af1bbf8f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/network_rule_set.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """Network rule set. + + All required parameters must be populated in order to send to Azure. + + :param bypass: Specifies whether traffic is bypassed for + Logging/Metrics/AzureServices. Possible values are any combination of + Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None + to bypass none of those traffics. Possible values include: 'None', + 'Logging', 'Metrics', 'AzureServices'. Default value: "AzureServices" . + :type bypass: str or ~azure.mgmt.storage.v2019_04_01.models.Bypass + :param virtual_network_rules: Sets the virtual network rules + :type virtual_network_rules: + list[~azure.mgmt.storage.v2019_04_01.models.VirtualNetworkRule] + :param ip_rules: Sets the IP ACL rules + :type ip_rules: list[~azure.mgmt.storage.v2019_04_01.models.IPRule] + :param default_action: Required. Specifies the default action of allow or + deny when no other rules match. Possible values include: 'Allow', 'Deny'. + Default value: "Allow" . + :type default_action: str or + ~azure.mgmt.storage.v2019_04_01.models.DefaultAction + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + 'default_action': {'key': 'defaultAction', 'type': 'DefaultAction'}, + } + + def __init__(self, **kwargs): + super(NetworkRuleSet, self).__init__(**kwargs) + self.bypass = kwargs.get('bypass', "AzureServices") + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.ip_rules = kwargs.get('ip_rules', None) + self.default_action = kwargs.get('default_action', "Allow") diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/network_rule_set_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/network_rule_set_py3.py new file mode 100644 index 000000000000..38d573a031f4 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/network_rule_set_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """Network rule set. + + All required parameters must be populated in order to send to Azure. + + :param bypass: Specifies whether traffic is bypassed for + Logging/Metrics/AzureServices. Possible values are any combination of + Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None + to bypass none of those traffics. Possible values include: 'None', + 'Logging', 'Metrics', 'AzureServices'. Default value: "AzureServices" . + :type bypass: str or ~azure.mgmt.storage.v2019_04_01.models.Bypass + :param virtual_network_rules: Sets the virtual network rules + :type virtual_network_rules: + list[~azure.mgmt.storage.v2019_04_01.models.VirtualNetworkRule] + :param ip_rules: Sets the IP ACL rules + :type ip_rules: list[~azure.mgmt.storage.v2019_04_01.models.IPRule] + :param default_action: Required. Specifies the default action of allow or + deny when no other rules match. Possible values include: 'Allow', 'Deny'. + Default value: "Allow" . + :type default_action: str or + ~azure.mgmt.storage.v2019_04_01.models.DefaultAction + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + 'default_action': {'key': 'defaultAction', 'type': 'DefaultAction'}, + } + + def __init__(self, *, bypass="AzureServices", virtual_network_rules=None, ip_rules=None, default_action="Allow", **kwargs) -> None: + super(NetworkRuleSet, self).__init__(**kwargs) + self.bypass = bypass + self.virtual_network_rules = virtual_network_rules + self.ip_rules = ip_rules + self.default_action = default_action diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation.py new file mode 100644 index 000000000000..49bef4318cd6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Storage REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.storage.v2019_04_01.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param service_specification: One property of operation, include metric + specifications. + :type service_specification: + ~azure.mgmt.storage.v2019_04_01.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.service_specification = kwargs.get('service_specification', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_display.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_display.py new file mode 100644 index 000000000000..029cfa2a8304 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_display.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Storage. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_display_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_display_py3.py new file mode 100644 index 000000000000..318ba2236d3e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_display_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Storage. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_paged.py new file mode 100644 index 000000000000..7e327f116faa --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_py3.py new file mode 100644 index 000000000000..9f976d75daa2 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/operation_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Storage REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.storage.v2019_04_01.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param service_specification: One property of operation, include metric + specifications. + :type service_specification: + ~azure.mgmt.storage.v2019_04_01.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, service_specification=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.service_specification = service_specification diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/proxy_resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/proxy_resource.py new file mode 100644 index 000000000000..0de8fb6bd420 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/proxy_resource.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/proxy_resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/proxy_resource_py3.py new file mode 100644 index 000000000000..2e8391f912d6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/proxy_resource_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/resource.py new file mode 100644 index 000000000000..9333a2ac49ef --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/resource.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/resource_py3.py new file mode 100644 index 000000000000..370e6c506581 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/resource_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/restriction.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/restriction.py new file mode 100644 index 000000000000..e40e1c1f94aa --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/restriction.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Restriction(Model): + """The restriction because of which SKU cannot be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. As of now only possible value for + this is location. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :param reason_code: The reason for the restriction. As of now this can be + "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU + has requiredQuotas parameter as the subscription does not belong to that + quota. The "NotAvailableForSubscription" is related to capacity at DC. + Possible values include: 'QuotaId', 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.storage.v2019_04_01.models.ReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Restriction, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = kwargs.get('reason_code', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/restriction_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/restriction_py3.py new file mode 100644 index 000000000000..e0c2d9a67fee --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/restriction_py3.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Restriction(Model): + """The restriction because of which SKU cannot be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. As of now only possible value for + this is location. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :param reason_code: The reason for the restriction. As of now this can be + "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU + has requiredQuotas parameter as the subscription does not belong to that + quota. The "NotAvailableForSubscription" is related to capacity at DC. + Possible values include: 'QuotaId', 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.storage.v2019_04_01.models.ReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, *, reason_code=None, **kwargs) -> None: + super(Restriction, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = reason_code diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_sas_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_sas_parameters.py new file mode 100644 index 000000000000..4cd3899f628c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_sas_parameters.py @@ -0,0 +1,120 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSasParameters(Model): + """The parameters to list service SAS credentials of a specific resource. + + All required parameters must be populated in order to send to Azure. + + :param canonicalized_resource: Required. The canonical path to the signed + resource. + :type canonicalized_resource: str + :param resource: The signed services accessible with the service SAS. + Possible values include: Blob (b), Container (c), File (f), Share (s). + Possible values include: 'b', 'c', 'f', 's' + :type resource: str or + ~azure.mgmt.storage.v2019_04_01.models.SignedResource + :param permissions: The signed permissions for the service SAS. Possible + values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create + (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', + 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2019_04_01.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2019_04_01.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: The time at which the shared access + signature becomes invalid. + :type shared_access_expiry_time: datetime + :param identifier: A unique value up to 64 characters in length that + correlates to an access policy specified for the container, queue, or + table. + :type identifier: str + :param partition_key_start: The start of partition key. + :type partition_key_start: str + :param partition_key_end: The end of partition key. + :type partition_key_end: str + :param row_key_start: The start of row key. + :type row_key_start: str + :param row_key_end: The end of row key. + :type row_key_end: str + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + :param cache_control: The response header override for cache control. + :type cache_control: str + :param content_disposition: The response header override for content + disposition. + :type content_disposition: str + :param content_encoding: The response header override for content + encoding. + :type content_encoding: str + :param content_language: The response header override for content + language. + :type content_language: str + :param content_type: The response header override for content type. + :type content_type: str + """ + + _validation = { + 'canonicalized_resource': {'required': True}, + 'identifier': {'max_length': 64}, + } + + _attribute_map = { + 'canonicalized_resource': {'key': 'canonicalizedResource', 'type': 'str'}, + 'resource': {'key': 'signedResource', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'identifier': {'key': 'signedIdentifier', 'type': 'str'}, + 'partition_key_start': {'key': 'startPk', 'type': 'str'}, + 'partition_key_end': {'key': 'endPk', 'type': 'str'}, + 'row_key_start': {'key': 'startRk', 'type': 'str'}, + 'row_key_end': {'key': 'endRk', 'type': 'str'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + 'cache_control': {'key': 'rscc', 'type': 'str'}, + 'content_disposition': {'key': 'rscd', 'type': 'str'}, + 'content_encoding': {'key': 'rsce', 'type': 'str'}, + 'content_language': {'key': 'rscl', 'type': 'str'}, + 'content_type': {'key': 'rsct', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceSasParameters, self).__init__(**kwargs) + self.canonicalized_resource = kwargs.get('canonicalized_resource', None) + self.resource = kwargs.get('resource', None) + self.permissions = kwargs.get('permissions', None) + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) + self.protocols = kwargs.get('protocols', None) + self.shared_access_start_time = kwargs.get('shared_access_start_time', None) + self.shared_access_expiry_time = kwargs.get('shared_access_expiry_time', None) + self.identifier = kwargs.get('identifier', None) + self.partition_key_start = kwargs.get('partition_key_start', None) + self.partition_key_end = kwargs.get('partition_key_end', None) + self.row_key_start = kwargs.get('row_key_start', None) + self.row_key_end = kwargs.get('row_key_end', None) + self.key_to_sign = kwargs.get('key_to_sign', None) + self.cache_control = kwargs.get('cache_control', None) + self.content_disposition = kwargs.get('content_disposition', None) + self.content_encoding = kwargs.get('content_encoding', None) + self.content_language = kwargs.get('content_language', None) + self.content_type = kwargs.get('content_type', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_sas_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_sas_parameters_py3.py new file mode 100644 index 000000000000..a24081816f62 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_sas_parameters_py3.py @@ -0,0 +1,120 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSasParameters(Model): + """The parameters to list service SAS credentials of a specific resource. + + All required parameters must be populated in order to send to Azure. + + :param canonicalized_resource: Required. The canonical path to the signed + resource. + :type canonicalized_resource: str + :param resource: The signed services accessible with the service SAS. + Possible values include: Blob (b), Container (c), File (f), Share (s). + Possible values include: 'b', 'c', 'f', 's' + :type resource: str or + ~azure.mgmt.storage.v2019_04_01.models.SignedResource + :param permissions: The signed permissions for the service SAS. Possible + values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create + (c), Update (u) and Process (p). Possible values include: 'r', 'd', 'w', + 'l', 'a', 'c', 'u', 'p' + :type permissions: str or + ~azure.mgmt.storage.v2019_04_01.models.Permissions + :param ip_address_or_range: An IP address or a range of IP addresses from + which to accept requests. + :type ip_address_or_range: str + :param protocols: The protocol permitted for a request made with the + account SAS. Possible values include: 'https,http', 'https' + :type protocols: str or + ~azure.mgmt.storage.v2019_04_01.models.HttpProtocol + :param shared_access_start_time: The time at which the SAS becomes valid. + :type shared_access_start_time: datetime + :param shared_access_expiry_time: The time at which the shared access + signature becomes invalid. + :type shared_access_expiry_time: datetime + :param identifier: A unique value up to 64 characters in length that + correlates to an access policy specified for the container, queue, or + table. + :type identifier: str + :param partition_key_start: The start of partition key. + :type partition_key_start: str + :param partition_key_end: The end of partition key. + :type partition_key_end: str + :param row_key_start: The start of row key. + :type row_key_start: str + :param row_key_end: The end of row key. + :type row_key_end: str + :param key_to_sign: The key to sign the account SAS token with. + :type key_to_sign: str + :param cache_control: The response header override for cache control. + :type cache_control: str + :param content_disposition: The response header override for content + disposition. + :type content_disposition: str + :param content_encoding: The response header override for content + encoding. + :type content_encoding: str + :param content_language: The response header override for content + language. + :type content_language: str + :param content_type: The response header override for content type. + :type content_type: str + """ + + _validation = { + 'canonicalized_resource': {'required': True}, + 'identifier': {'max_length': 64}, + } + + _attribute_map = { + 'canonicalized_resource': {'key': 'canonicalizedResource', 'type': 'str'}, + 'resource': {'key': 'signedResource', 'type': 'str'}, + 'permissions': {'key': 'signedPermission', 'type': 'str'}, + 'ip_address_or_range': {'key': 'signedIp', 'type': 'str'}, + 'protocols': {'key': 'signedProtocol', 'type': 'HttpProtocol'}, + 'shared_access_start_time': {'key': 'signedStart', 'type': 'iso-8601'}, + 'shared_access_expiry_time': {'key': 'signedExpiry', 'type': 'iso-8601'}, + 'identifier': {'key': 'signedIdentifier', 'type': 'str'}, + 'partition_key_start': {'key': 'startPk', 'type': 'str'}, + 'partition_key_end': {'key': 'endPk', 'type': 'str'}, + 'row_key_start': {'key': 'startRk', 'type': 'str'}, + 'row_key_end': {'key': 'endRk', 'type': 'str'}, + 'key_to_sign': {'key': 'keyToSign', 'type': 'str'}, + 'cache_control': {'key': 'rscc', 'type': 'str'}, + 'content_disposition': {'key': 'rscd', 'type': 'str'}, + 'content_encoding': {'key': 'rsce', 'type': 'str'}, + 'content_language': {'key': 'rscl', 'type': 'str'}, + 'content_type': {'key': 'rsct', 'type': 'str'}, + } + + def __init__(self, *, canonicalized_resource: str, resource=None, permissions=None, ip_address_or_range: str=None, protocols=None, shared_access_start_time=None, shared_access_expiry_time=None, identifier: str=None, partition_key_start: str=None, partition_key_end: str=None, row_key_start: str=None, row_key_end: str=None, key_to_sign: str=None, cache_control: str=None, content_disposition: str=None, content_encoding: str=None, content_language: str=None, content_type: str=None, **kwargs) -> None: + super(ServiceSasParameters, self).__init__(**kwargs) + self.canonicalized_resource = canonicalized_resource + self.resource = resource + self.permissions = permissions + self.ip_address_or_range = ip_address_or_range + self.protocols = protocols + self.shared_access_start_time = shared_access_start_time + self.shared_access_expiry_time = shared_access_expiry_time + self.identifier = identifier + self.partition_key_start = partition_key_start + self.partition_key_end = partition_key_end + self.row_key_start = row_key_start + self.row_key_end = row_key_end + self.key_to_sign = key_to_sign + self.cache_control = cache_control + self.content_disposition = content_disposition + self.content_encoding = content_encoding + self.content_language = content_language + self.content_type = content_type diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_specification.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_specification.py new file mode 100644 index 000000000000..db089e502063 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_specification.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSpecification(Model): + """One property of operation, include metric specifications. + + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.storage.v2019_04_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_specification_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_specification_py3.py new file mode 100644 index 000000000000..b502df3f482e --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/service_specification_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceSpecification(Model): + """One property of operation, include metric specifications. + + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.storage.v2019_04_01.models.MetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku.py new file mode 100644 index 000000000000..e471912d1bf9 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The SKU of the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the SKU name. Required for account + creation; optional for update. Note that in older versions, SKU name was + called accountType. Possible values include: 'Standard_LRS', + 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', + 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS' + :type name: str or ~azure.mgmt.storage.v2019_04_01.models.SkuName + :ivar tier: Gets the SKU tier. This is based on the SKU name. Possible + values include: 'Standard', 'Premium' + :vartype tier: str or ~azure.mgmt.storage.v2019_04_01.models.SkuTier + :ivar resource_type: The type of the resource, usually it is + 'storageAccounts'. + :vartype resource_type: str + :ivar kind: Indicates the type of storage account. Possible values + include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', + 'BlockBlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2019_04_01.models.Kind + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar capabilities: The capability information in the specified SKU, + including file encryption, network ACLs, change notification, etc. + :vartype capabilities: + list[~azure.mgmt.storage.v2019_04_01.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.storage.v2019_04_01.models.Restriction] + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + self.resource_type = None + self.kind = None + self.locations = None + self.capabilities = None + self.restrictions = kwargs.get('restrictions', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_capability.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_capability.py new file mode 100644 index 000000000000..3f27b5e45feb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_capability.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SKUCapability(Model): + """The capability information in the specified SKU, including file encryption, + network ACLs, change notification, etc. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of capability, The capability information in the + specified SKU, including file encryption, network ACLs, change + notification, etc. + :vartype name: str + :ivar value: A string value to indicate states of given capability. + Possibly 'true' or 'false'. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SKUCapability, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_capability_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_capability_py3.py new file mode 100644 index 000000000000..5bc3628f2173 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_capability_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SKUCapability(Model): + """The capability information in the specified SKU, including file encryption, + network ACLs, change notification, etc. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of capability, The capability information in the + specified SKU, including file encryption, network ACLs, change + notification, etc. + :vartype name: str + :ivar value: A string value to indicate states of given capability. + Possibly 'true' or 'false'. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(SKUCapability, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_paged.py new file mode 100644 index 000000000000..58fa2aef6602 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class SkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`Sku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Sku]'} + } + + def __init__(self, *args, **kwargs): + + super(SkuPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_py3.py new file mode 100644 index 000000000000..bfcde8b058db --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/sku_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The SKU of the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Gets or sets the SKU name. Required for account + creation; optional for update. Note that in older versions, SKU name was + called accountType. Possible values include: 'Standard_LRS', + 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', + 'Premium_ZRS', 'Standard_GZRS', 'Standard_RAGZRS' + :type name: str or ~azure.mgmt.storage.v2019_04_01.models.SkuName + :ivar tier: Gets the SKU tier. This is based on the SKU name. Possible + values include: 'Standard', 'Premium' + :vartype tier: str or ~azure.mgmt.storage.v2019_04_01.models.SkuTier + :ivar resource_type: The type of the resource, usually it is + 'storageAccounts'. + :vartype resource_type: str + :ivar kind: Indicates the type of storage account. Possible values + include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', + 'BlockBlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2019_04_01.models.Kind + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar capabilities: The capability information in the specified SKU, + including file encryption, network ACLs, change notification, etc. + :vartype capabilities: + list[~azure.mgmt.storage.v2019_04_01.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.storage.v2019_04_01.models.Restriction] + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'kind': {'readonly': True}, + 'locations': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, *, name, restrictions=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None + self.resource_type = None + self.kind = None + self.locations = None + self.capabilities = None + self.restrictions = restrictions diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account.py new file mode 100644 index 000000000000..d5edf738fe79 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account.py @@ -0,0 +1,191 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class StorageAccount(TrackedResource): + """The storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :ivar sku: Gets the SKU. + :vartype sku: ~azure.mgmt.storage.v2019_04_01.models.Sku + :ivar kind: Gets the Kind. Possible values include: 'Storage', + 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2019_04_01.models.Kind + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2019_04_01.models.Identity + :ivar provisioning_state: Gets the status of the storage account at the + time the operation was called. Possible values include: 'Creating', + 'ResolvingDNS', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.storage.v2019_04_01.models.ProvisioningState + :ivar primary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object. Note that Standard_ZRS + and Premium_LRS accounts only return the blob endpoint. + :vartype primary_endpoints: + ~azure.mgmt.storage.v2019_04_01.models.Endpoints + :ivar primary_location: Gets the location of the primary data center for + the storage account. + :vartype primary_location: str + :ivar status_of_primary: Gets the status indicating whether the primary + location of the storage account is available or unavailable. Possible + values include: 'available', 'unavailable' + :vartype status_of_primary: str or + ~azure.mgmt.storage.v2019_04_01.models.AccountStatus + :ivar last_geo_failover_time: Gets the timestamp of the most recent + instance of a failover to the secondary location. Only the most recent + timestamp is retained. This element is not returned if there has never + been a failover instance. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype last_geo_failover_time: datetime + :ivar secondary_location: Gets the location of the geo-replicated + secondary for the storage account. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype secondary_location: str + :ivar status_of_secondary: Gets the status indicating whether the + secondary location of the storage account is available or unavailable. + Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible + values include: 'available', 'unavailable' + :vartype status_of_secondary: str or + ~azure.mgmt.storage.v2019_04_01.models.AccountStatus + :ivar creation_time: Gets the creation date and time of the storage + account in UTC. + :vartype creation_time: datetime + :ivar custom_domain: Gets the custom domain the user assigned to this + storage account. + :vartype custom_domain: + ~azure.mgmt.storage.v2019_04_01.models.CustomDomain + :ivar secondary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object from the secondary + location of the storage account. Only available if the SKU name is + Standard_RAGRS. + :vartype secondary_endpoints: + ~azure.mgmt.storage.v2019_04_01.models.Endpoints + :ivar encryption: Gets the encryption settings on the account. If + unspecified, the account is unencrypted. + :vartype encryption: ~azure.mgmt.storage.v2019_04_01.models.Encryption + :ivar access_tier: Required for storage accounts where kind = BlobStorage. + The access tier used for billing. Possible values include: 'Hot', 'Cool' + :vartype access_tier: str or + ~azure.mgmt.storage.v2019_04_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :ivar network_rule_set: Network rule set + :vartype network_rule_set: + ~azure.mgmt.storage.v2019_04_01.models.NetworkRuleSet + :param is_hns_enabled: Account HierarchicalNamespace enabled if sets to + true. + :type is_hns_enabled: bool + :ivar geo_replication_stats: Geo Replication Stats + :vartype geo_replication_stats: + ~azure.mgmt.storage.v2019_04_01.models.GeoReplicationStats + :ivar failover_in_progress: If the failover is in progress, the value will + be true, otherwise, it will be null. + :vartype failover_in_progress: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'readonly': True}, + 'kind': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'primary_endpoints': {'readonly': True}, + 'primary_location': {'readonly': True}, + 'status_of_primary': {'readonly': True}, + 'last_geo_failover_time': {'readonly': True}, + 'secondary_location': {'readonly': True}, + 'status_of_secondary': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'custom_domain': {'readonly': True}, + 'secondary_endpoints': {'readonly': True}, + 'encryption': {'readonly': True}, + 'access_tier': {'readonly': True}, + 'network_rule_set': {'readonly': True}, + 'geo_replication_stats': {'readonly': True}, + 'failover_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'primary_endpoints': {'key': 'properties.primaryEndpoints', 'type': 'Endpoints'}, + 'primary_location': {'key': 'properties.primaryLocation', 'type': 'str'}, + 'status_of_primary': {'key': 'properties.statusOfPrimary', 'type': 'AccountStatus'}, + 'last_geo_failover_time': {'key': 'properties.lastGeoFailoverTime', 'type': 'iso-8601'}, + 'secondary_location': {'key': 'properties.secondaryLocation', 'type': 'str'}, + 'status_of_secondary': {'key': 'properties.statusOfSecondary', 'type': 'AccountStatus'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'secondary_endpoints': {'key': 'properties.secondaryEndpoints', 'type': 'Endpoints'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'is_hns_enabled': {'key': 'properties.isHnsEnabled', 'type': 'bool'}, + 'geo_replication_stats': {'key': 'properties.geoReplicationStats', 'type': 'GeoReplicationStats'}, + 'failover_in_progress': {'key': 'properties.failoverInProgress', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.sku = None + self.kind = None + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.primary_endpoints = None + self.primary_location = None + self.status_of_primary = None + self.last_geo_failover_time = None + self.secondary_location = None + self.status_of_secondary = None + self.creation_time = None + self.custom_domain = None + self.secondary_endpoints = None + self.encryption = None + self.access_tier = None + self.enable_azure_files_aad_integration = kwargs.get('enable_azure_files_aad_integration', None) + self.enable_https_traffic_only = kwargs.get('enable_https_traffic_only', None) + self.network_rule_set = None + self.is_hns_enabled = kwargs.get('is_hns_enabled', None) + self.geo_replication_stats = None + self.failover_in_progress = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_check_name_availability_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_check_name_availability_parameters.py new file mode 100644 index 000000000000..dbe41bb2c6b1 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_check_name_availability_parameters.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCheckNameAvailabilityParameters(Model): + """The parameters used to check the availability of the storage account name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The storage account name. + :type name: str + :ivar type: Required. The type of resource, + Microsoft.Storage/storageAccounts. Default value: + "Microsoft.Storage/storageAccounts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Storage/storageAccounts" + + def __init__(self, **kwargs): + super(StorageAccountCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_check_name_availability_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_check_name_availability_parameters_py3.py new file mode 100644 index 000000000000..8d2b031e2284 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_check_name_availability_parameters_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCheckNameAvailabilityParameters(Model): + """The parameters used to check the availability of the storage account name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The storage account name. + :type name: str + :ivar type: Required. The type of resource, + Microsoft.Storage/storageAccounts. Default value: + "Microsoft.Storage/storageAccounts" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.Storage/storageAccounts" + + def __init__(self, *, name: str, **kwargs) -> None: + super(StorageAccountCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_create_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_create_parameters.py new file mode 100644 index 000000000000..57752259a5eb --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_create_parameters.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCreateParameters(Model): + """The parameters used when creating a storage account. + + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the SKU name. + :type sku: ~azure.mgmt.storage.v2019_04_01.models.Sku + :param kind: Required. Required. Indicates the type of storage account. + Possible values include: 'Storage', 'StorageV2', 'BlobStorage', + 'FileStorage', 'BlockBlobStorage' + :type kind: str or ~azure.mgmt.storage.v2019_04_01.models.Kind + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2019_04_01.models.Identity + :param custom_domain: User domain assigned to the storage account. Name is + the CNAME source. Only one custom domain is supported per storage account + at this time. To clear the existing custom domain, use an empty string for + the custom domain name property. + :type custom_domain: ~azure.mgmt.storage.v2019_04_01.models.CustomDomain + :param encryption: Provides the encryption settings on the account. If + left unspecified the account encryption settings will remain the same. The + default setting is unencrypted. + :type encryption: ~azure.mgmt.storage.v2019_04_01.models.Encryption + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2019_04_01.models.NetworkRuleSet + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2019_04_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :param is_hns_enabled: Account HierarchicalNamespace enabled if sets to + true. + :type is_hns_enabled: bool + """ + + _validation = { + 'sku': {'required': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'is_hns_enabled': {'key': 'properties.isHnsEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(StorageAccountCreateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.kind = kwargs.get('kind', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.custom_domain = kwargs.get('custom_domain', None) + self.encryption = kwargs.get('encryption', None) + self.network_rule_set = kwargs.get('network_rule_set', None) + self.access_tier = kwargs.get('access_tier', None) + self.enable_azure_files_aad_integration = kwargs.get('enable_azure_files_aad_integration', None) + self.enable_https_traffic_only = kwargs.get('enable_https_traffic_only', None) + self.is_hns_enabled = kwargs.get('is_hns_enabled', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_create_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_create_parameters_py3.py new file mode 100644 index 000000000000..628fa15f9f02 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_create_parameters_py3.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountCreateParameters(Model): + """The parameters used when creating a storage account. + + All required parameters must be populated in order to send to Azure. + + :param sku: Required. Required. Gets or sets the SKU name. + :type sku: ~azure.mgmt.storage.v2019_04_01.models.Sku + :param kind: Required. Required. Indicates the type of storage account. + Possible values include: 'Storage', 'StorageV2', 'BlobStorage', + 'FileStorage', 'BlockBlobStorage' + :type kind: str or ~azure.mgmt.storage.v2019_04_01.models.Kind + :param location: Required. Required. Gets or sets the location of the + resource. This will be one of the supported and registered Azure Geo + Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2019_04_01.models.Identity + :param custom_domain: User domain assigned to the storage account. Name is + the CNAME source. Only one custom domain is supported per storage account + at this time. To clear the existing custom domain, use an empty string for + the custom domain name property. + :type custom_domain: ~azure.mgmt.storage.v2019_04_01.models.CustomDomain + :param encryption: Provides the encryption settings on the account. If + left unspecified the account encryption settings will remain the same. The + default setting is unencrypted. + :type encryption: ~azure.mgmt.storage.v2019_04_01.models.Encryption + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2019_04_01.models.NetworkRuleSet + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2019_04_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :param is_hns_enabled: Account HierarchicalNamespace enabled if sets to + true. + :type is_hns_enabled: bool + """ + + _validation = { + 'sku': {'required': True}, + 'kind': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'is_hns_enabled': {'key': 'properties.isHnsEnabled', 'type': 'bool'}, + } + + def __init__(self, *, sku, kind, location: str, tags=None, identity=None, custom_domain=None, encryption=None, network_rule_set=None, access_tier=None, enable_azure_files_aad_integration: bool=None, enable_https_traffic_only: bool=None, is_hns_enabled: bool=None, **kwargs) -> None: + super(StorageAccountCreateParameters, self).__init__(**kwargs) + self.sku = sku + self.kind = kind + self.location = location + self.tags = tags + self.identity = identity + self.custom_domain = custom_domain + self.encryption = encryption + self.network_rule_set = network_rule_set + self.access_tier = access_tier + self.enable_azure_files_aad_integration = enable_azure_files_aad_integration + self.enable_https_traffic_only = enable_https_traffic_only + self.is_hns_enabled = is_hns_enabled diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_key.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_key.py new file mode 100644 index 000000000000..49f9686d1503 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_key.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountKey(Model): + """An access key for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key_name: Name of the key. + :vartype key_name: str + :ivar value: Base 64-encoded value of the key. + :vartype value: str + :ivar permissions: Permissions for the key -- read-only or full + permissions. Possible values include: 'Read', 'Full' + :vartype permissions: str or + ~azure.mgmt.storage.v2019_04_01.models.KeyPermission + """ + + _validation = { + 'key_name': {'readonly': True}, + 'value': {'readonly': True}, + 'permissions': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'KeyPermission'}, + } + + def __init__(self, **kwargs): + super(StorageAccountKey, self).__init__(**kwargs) + self.key_name = None + self.value = None + self.permissions = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_key_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_key_py3.py new file mode 100644 index 000000000000..2921ef20e6f0 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_key_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountKey(Model): + """An access key for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key_name: Name of the key. + :vartype key_name: str + :ivar value: Base 64-encoded value of the key. + :vartype value: str + :ivar permissions: Permissions for the key -- read-only or full + permissions. Possible values include: 'Read', 'Full' + :vartype permissions: str or + ~azure.mgmt.storage.v2019_04_01.models.KeyPermission + """ + + _validation = { + 'key_name': {'readonly': True}, + 'value': {'readonly': True}, + 'permissions': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'KeyPermission'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageAccountKey, self).__init__(**kwargs) + self.key_name = None + self.value = None + self.permissions = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_list_keys_result.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_list_keys_result.py new file mode 100644 index 000000000000..4af86cff5269 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_list_keys_result.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountListKeysResult(Model): + """The response from the ListKeys operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar keys: Gets the list of storage account keys and their properties for + the specified storage account. + :vartype keys: + list[~azure.mgmt.storage.v2019_04_01.models.StorageAccountKey] + """ + + _validation = { + 'keys': {'readonly': True}, + } + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[StorageAccountKey]'}, + } + + def __init__(self, **kwargs): + super(StorageAccountListKeysResult, self).__init__(**kwargs) + self.keys = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_list_keys_result_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_list_keys_result_py3.py new file mode 100644 index 000000000000..cce456a23b00 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_list_keys_result_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountListKeysResult(Model): + """The response from the ListKeys operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar keys: Gets the list of storage account keys and their properties for + the specified storage account. + :vartype keys: + list[~azure.mgmt.storage.v2019_04_01.models.StorageAccountKey] + """ + + _validation = { + 'keys': {'readonly': True}, + } + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[StorageAccountKey]'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageAccountListKeysResult, self).__init__(**kwargs) + self.keys = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_paged.py new file mode 100644 index 000000000000..71b6bf2be9a3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class StorageAccountPaged(Paged): + """ + A paging container for iterating over a list of :class:`StorageAccount ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[StorageAccount]'} + } + + def __init__(self, *args, **kwargs): + + super(StorageAccountPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_py3.py new file mode 100644 index 000000000000..1e714e68e25c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_py3.py @@ -0,0 +1,191 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class StorageAccount(TrackedResource): + """The storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :ivar sku: Gets the SKU. + :vartype sku: ~azure.mgmt.storage.v2019_04_01.models.Sku + :ivar kind: Gets the Kind. Possible values include: 'Storage', + 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + :vartype kind: str or ~azure.mgmt.storage.v2019_04_01.models.Kind + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2019_04_01.models.Identity + :ivar provisioning_state: Gets the status of the storage account at the + time the operation was called. Possible values include: 'Creating', + 'ResolvingDNS', 'Succeeded' + :vartype provisioning_state: str or + ~azure.mgmt.storage.v2019_04_01.models.ProvisioningState + :ivar primary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object. Note that Standard_ZRS + and Premium_LRS accounts only return the blob endpoint. + :vartype primary_endpoints: + ~azure.mgmt.storage.v2019_04_01.models.Endpoints + :ivar primary_location: Gets the location of the primary data center for + the storage account. + :vartype primary_location: str + :ivar status_of_primary: Gets the status indicating whether the primary + location of the storage account is available or unavailable. Possible + values include: 'available', 'unavailable' + :vartype status_of_primary: str or + ~azure.mgmt.storage.v2019_04_01.models.AccountStatus + :ivar last_geo_failover_time: Gets the timestamp of the most recent + instance of a failover to the secondary location. Only the most recent + timestamp is retained. This element is not returned if there has never + been a failover instance. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype last_geo_failover_time: datetime + :ivar secondary_location: Gets the location of the geo-replicated + secondary for the storage account. Only available if the accountType is + Standard_GRS or Standard_RAGRS. + :vartype secondary_location: str + :ivar status_of_secondary: Gets the status indicating whether the + secondary location of the storage account is available or unavailable. + Only available if the SKU name is Standard_GRS or Standard_RAGRS. Possible + values include: 'available', 'unavailable' + :vartype status_of_secondary: str or + ~azure.mgmt.storage.v2019_04_01.models.AccountStatus + :ivar creation_time: Gets the creation date and time of the storage + account in UTC. + :vartype creation_time: datetime + :ivar custom_domain: Gets the custom domain the user assigned to this + storage account. + :vartype custom_domain: + ~azure.mgmt.storage.v2019_04_01.models.CustomDomain + :ivar secondary_endpoints: Gets the URLs that are used to perform a + retrieval of a public blob, queue, or table object from the secondary + location of the storage account. Only available if the SKU name is + Standard_RAGRS. + :vartype secondary_endpoints: + ~azure.mgmt.storage.v2019_04_01.models.Endpoints + :ivar encryption: Gets the encryption settings on the account. If + unspecified, the account is unencrypted. + :vartype encryption: ~azure.mgmt.storage.v2019_04_01.models.Encryption + :ivar access_tier: Required for storage accounts where kind = BlobStorage. + The access tier used for billing. Possible values include: 'Hot', 'Cool' + :vartype access_tier: str or + ~azure.mgmt.storage.v2019_04_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :ivar network_rule_set: Network rule set + :vartype network_rule_set: + ~azure.mgmt.storage.v2019_04_01.models.NetworkRuleSet + :param is_hns_enabled: Account HierarchicalNamespace enabled if sets to + true. + :type is_hns_enabled: bool + :ivar geo_replication_stats: Geo Replication Stats + :vartype geo_replication_stats: + ~azure.mgmt.storage.v2019_04_01.models.GeoReplicationStats + :ivar failover_in_progress: If the failover is in progress, the value will + be true, otherwise, it will be null. + :vartype failover_in_progress: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'readonly': True}, + 'kind': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'primary_endpoints': {'readonly': True}, + 'primary_location': {'readonly': True}, + 'status_of_primary': {'readonly': True}, + 'last_geo_failover_time': {'readonly': True}, + 'secondary_location': {'readonly': True}, + 'status_of_secondary': {'readonly': True}, + 'creation_time': {'readonly': True}, + 'custom_domain': {'readonly': True}, + 'secondary_endpoints': {'readonly': True}, + 'encryption': {'readonly': True}, + 'access_tier': {'readonly': True}, + 'network_rule_set': {'readonly': True}, + 'geo_replication_stats': {'readonly': True}, + 'failover_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'primary_endpoints': {'key': 'properties.primaryEndpoints', 'type': 'Endpoints'}, + 'primary_location': {'key': 'properties.primaryLocation', 'type': 'str'}, + 'status_of_primary': {'key': 'properties.statusOfPrimary', 'type': 'AccountStatus'}, + 'last_geo_failover_time': {'key': 'properties.lastGeoFailoverTime', 'type': 'iso-8601'}, + 'secondary_location': {'key': 'properties.secondaryLocation', 'type': 'str'}, + 'status_of_secondary': {'key': 'properties.statusOfSecondary', 'type': 'AccountStatus'}, + 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'secondary_endpoints': {'key': 'properties.secondaryEndpoints', 'type': 'Endpoints'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'is_hns_enabled': {'key': 'properties.isHnsEnabled', 'type': 'bool'}, + 'geo_replication_stats': {'key': 'properties.geoReplicationStats', 'type': 'GeoReplicationStats'}, + 'failover_in_progress': {'key': 'properties.failoverInProgress', 'type': 'bool'}, + } + + def __init__(self, *, location: str, tags=None, identity=None, enable_azure_files_aad_integration: bool=None, enable_https_traffic_only: bool=None, is_hns_enabled: bool=None, **kwargs) -> None: + super(StorageAccount, self).__init__(tags=tags, location=location, **kwargs) + self.sku = None + self.kind = None + self.identity = identity + self.provisioning_state = None + self.primary_endpoints = None + self.primary_location = None + self.status_of_primary = None + self.last_geo_failover_time = None + self.secondary_location = None + self.status_of_secondary = None + self.creation_time = None + self.custom_domain = None + self.secondary_endpoints = None + self.encryption = None + self.access_tier = None + self.enable_azure_files_aad_integration = enable_azure_files_aad_integration + self.enable_https_traffic_only = enable_https_traffic_only + self.network_rule_set = None + self.is_hns_enabled = is_hns_enabled + self.geo_replication_stats = None + self.failover_in_progress = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_regenerate_key_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_regenerate_key_parameters.py new file mode 100644 index 000000000000..6dba2135fdc7 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_regenerate_key_parameters.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountRegenerateKeyParameters(Model): + """The parameters used to regenerate the storage account key. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of storage keys that want to be + regenerated, possible values are key1, key2. + :type key_name: str + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_regenerate_key_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_regenerate_key_parameters_py3.py new file mode 100644 index 000000000000..6e06a071eba3 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_regenerate_key_parameters_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountRegenerateKeyParameters(Model): + """The parameters used to regenerate the storage account key. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. The name of storage keys that want to be + regenerated, possible values are key1, key2. + :type key_name: str + """ + + _validation = { + 'key_name': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__(self, *, key_name: str, **kwargs) -> None: + super(StorageAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_name = key_name diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_update_parameters.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_update_parameters.py new file mode 100644 index 000000000000..f42593e50e7c --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_update_parameters.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountUpdateParameters(Model): + """The parameters that can be provided when updating the storage account + properties. + + :param sku: Gets or sets the SKU name. Note that the SKU name cannot be + updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of + those SKU names be updated to any other value. + :type sku: ~azure.mgmt.storage.v2019_04_01.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater in length than 128 + characters and a value no greater in length than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2019_04_01.models.Identity + :param custom_domain: Custom domain assigned to the storage account by the + user. Name is the CNAME source. Only one custom domain is supported per + storage account at this time. To clear the existing custom domain, use an + empty string for the custom domain name property. + :type custom_domain: ~azure.mgmt.storage.v2019_04_01.models.CustomDomain + :param encryption: Provides the encryption settings on the account. The + default setting is unencrypted. + :type encryption: ~azure.mgmt.storage.v2019_04_01.models.Encryption + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2019_04_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2019_04_01.models.NetworkRuleSet + :param kind: Optional. Indicates the type of storage account. Currently + only StorageV2 value supported by server. Possible values include: + 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + :type kind: str or ~azure.mgmt.storage.v2019_04_01.models.Kind + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccountUpdateParameters, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.custom_domain = kwargs.get('custom_domain', None) + self.encryption = kwargs.get('encryption', None) + self.access_tier = kwargs.get('access_tier', None) + self.enable_azure_files_aad_integration = kwargs.get('enable_azure_files_aad_integration', None) + self.enable_https_traffic_only = kwargs.get('enable_https_traffic_only', None) + self.network_rule_set = kwargs.get('network_rule_set', None) + self.kind = kwargs.get('kind', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_update_parameters_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_update_parameters_py3.py new file mode 100644 index 000000000000..95e7e3b0c723 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_account_update_parameters_py3.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccountUpdateParameters(Model): + """The parameters that can be provided when updating the storage account + properties. + + :param sku: Gets or sets the SKU name. Note that the SKU name cannot be + updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of + those SKU names be updated to any other value. + :type sku: ~azure.mgmt.storage.v2019_04_01.models.Sku + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater in length than 128 + characters and a value no greater in length than 256 characters. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.storage.v2019_04_01.models.Identity + :param custom_domain: Custom domain assigned to the storage account by the + user. Name is the CNAME source. Only one custom domain is supported per + storage account at this time. To clear the existing custom domain, use an + empty string for the custom domain name property. + :type custom_domain: ~azure.mgmt.storage.v2019_04_01.models.CustomDomain + :param encryption: Provides the encryption settings on the account. The + default setting is unencrypted. + :type encryption: ~azure.mgmt.storage.v2019_04_01.models.Encryption + :param access_tier: Required for storage accounts where kind = + BlobStorage. The access tier used for billing. Possible values include: + 'Hot', 'Cool' + :type access_tier: str or + ~azure.mgmt.storage.v2019_04_01.models.AccessTier + :param enable_azure_files_aad_integration: Enables Azure Files AAD + Integration for SMB if sets to true. + :type enable_azure_files_aad_integration: bool + :param enable_https_traffic_only: Allows https traffic only to storage + service if sets to true. + :type enable_https_traffic_only: bool + :param network_rule_set: Network rule set + :type network_rule_set: + ~azure.mgmt.storage.v2019_04_01.models.NetworkRuleSet + :param kind: Optional. Indicates the type of storage account. Currently + only StorageV2 value supported by server. Possible values include: + 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + :type kind: str or ~azure.mgmt.storage.v2019_04_01.models.Kind + """ + + _attribute_map = { + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'custom_domain': {'key': 'properties.customDomain', 'type': 'CustomDomain'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'access_tier': {'key': 'properties.accessTier', 'type': 'AccessTier'}, + 'enable_azure_files_aad_integration': {'key': 'properties.azureFilesAadIntegration', 'type': 'bool'}, + 'enable_https_traffic_only': {'key': 'properties.supportsHttpsTrafficOnly', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkAcls', 'type': 'NetworkRuleSet'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, sku=None, tags=None, identity=None, custom_domain=None, encryption=None, access_tier=None, enable_azure_files_aad_integration: bool=None, enable_https_traffic_only: bool=None, network_rule_set=None, kind=None, **kwargs) -> None: + super(StorageAccountUpdateParameters, self).__init__(**kwargs) + self.sku = sku + self.tags = tags + self.identity = identity + self.custom_domain = custom_domain + self.encryption = encryption + self.access_tier = access_tier + self.enable_azure_files_aad_integration = enable_azure_files_aad_integration + self.enable_https_traffic_only = enable_https_traffic_only + self.network_rule_set = network_rule_set + self.kind = kind diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_management_client_enums.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_management_client_enums.py new file mode 100644 index 000000000000..91863e771145 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/storage_management_client_enums.py @@ -0,0 +1,214 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ReasonCode(str, Enum): + + quota_id = "QuotaId" + not_available_for_subscription = "NotAvailableForSubscription" + + +class SkuName(str, Enum): + + standard_lrs = "Standard_LRS" + standard_grs = "Standard_GRS" + standard_ragrs = "Standard_RAGRS" + standard_zrs = "Standard_ZRS" + premium_lrs = "Premium_LRS" + premium_zrs = "Premium_ZRS" + standard_gzrs = "Standard_GZRS" + standard_ragzrs = "Standard_RAGZRS" + + +class SkuTier(str, Enum): + + standard = "Standard" + premium = "Premium" + + +class Kind(str, Enum): + + storage = "Storage" + storage_v2 = "StorageV2" + blob_storage = "BlobStorage" + file_storage = "FileStorage" + block_blob_storage = "BlockBlobStorage" + + +class Reason(str, Enum): + + account_name_invalid = "AccountNameInvalid" + already_exists = "AlreadyExists" + + +class KeySource(str, Enum): + + microsoft_storage = "Microsoft.Storage" + microsoft_keyvault = "Microsoft.Keyvault" + + +class Action(str, Enum): + + allow = "Allow" + + +class State(str, Enum): + + provisioning = "provisioning" + deprovisioning = "deprovisioning" + succeeded = "succeeded" + failed = "failed" + network_source_deleted = "networkSourceDeleted" + + +class Bypass(str, Enum): + + none = "None" + logging = "Logging" + metrics = "Metrics" + azure_services = "AzureServices" + + +class DefaultAction(str, Enum): + + allow = "Allow" + deny = "Deny" + + +class AccessTier(str, Enum): + + hot = "Hot" + cool = "Cool" + + +class GeoReplicationStatus(str, Enum): + + live = "Live" + bootstrap = "Bootstrap" + unavailable = "Unavailable" + + +class ProvisioningState(str, Enum): + + creating = "Creating" + resolving_dns = "ResolvingDNS" + succeeded = "Succeeded" + + +class AccountStatus(str, Enum): + + available = "available" + unavailable = "unavailable" + + +class KeyPermission(str, Enum): + + read = "Read" + full = "Full" + + +class UsageUnit(str, Enum): + + count = "Count" + bytes = "Bytes" + seconds = "Seconds" + percent = "Percent" + counts_per_second = "CountsPerSecond" + bytes_per_second = "BytesPerSecond" + + +class Services(str, Enum): + + b = "b" + q = "q" + t = "t" + f = "f" + + +class SignedResourceTypes(str, Enum): + + s = "s" + c = "c" + o = "o" + + +class Permissions(str, Enum): + + r = "r" + d = "d" + w = "w" + l = "l" + a = "a" + c = "c" + u = "u" + p = "p" + + +class HttpProtocol(str, Enum): + + httpshttp = "https,http" + https = "https" + + +class SignedResource(str, Enum): + + b = "b" + c = "c" + f = "f" + s = "s" + + +class PublicAccess(str, Enum): + + container = "Container" + blob = "Blob" + none = "None" + + +class LeaseStatus(str, Enum): + + locked = "Locked" + unlocked = "Unlocked" + + +class LeaseState(str, Enum): + + available = "Available" + leased = "Leased" + expired = "Expired" + breaking = "Breaking" + broken = "Broken" + + +class LeaseDuration(str, Enum): + + infinite = "Infinite" + fixed = "Fixed" + + +class ImmutabilityPolicyState(str, Enum): + + locked = "Locked" + unlocked = "Unlocked" + + +class ImmutabilityPolicyUpdateType(str, Enum): + + put = "put" + lock = "lock" + extend = "extend" + + +class StorageAccountExpand(str, Enum): + + geo_replication_stats = "geoReplicationStats" diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tag_property.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tag_property.py new file mode 100644 index 000000000000..3b879061fd2b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tag_property.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagProperty(Model): + """A tag of the LegalHold of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tag: The tag value. + :vartype tag: str + :ivar timestamp: Returns the date and time the tag was added. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who added the + tag. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who added the tag. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who added the tag. + :vartype upn: str + """ + + _validation = { + 'tag': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'tag': {'key': 'tag', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TagProperty, self).__init__(**kwargs) + self.tag = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tag_property_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tag_property_py3.py new file mode 100644 index 000000000000..22aaf6cb82ba --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tag_property_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagProperty(Model): + """A tag of the LegalHold of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tag: The tag value. + :vartype tag: str + :ivar timestamp: Returns the date and time the tag was added. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who added the + tag. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who added the tag. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who added the tag. + :vartype upn: str + """ + + _validation = { + 'tag': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'tag': {'key': 'tag', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(TagProperty, self).__init__(**kwargs) + self.tag = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tracked_resource.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tracked_resource.py new file mode 100644 index 000000000000..27ab94c7a8dd --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tracked_resource.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tracked_resource_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tracked_resource_py3.py new file mode 100644 index 000000000000..b28cc1859448 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/tracked_resource_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/update_history_property.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/update_history_property.py new file mode 100644 index 000000000000..b118e50b6ef0 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/update_history_property.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateHistoryProperty(Model): + """An update history of the ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar update: The ImmutabilityPolicy update type of a blob container, + possible values include: put, lock and extend. Possible values include: + 'put', 'lock', 'extend' + :vartype update: str or + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyUpdateType + :ivar immutability_period_since_creation_in_days: The immutability period + for the blobs in the container since the policy creation, in days. + :vartype immutability_period_since_creation_in_days: int + :ivar timestamp: Returns the date and time the ImmutabilityPolicy was + updated. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who updated the + ImmutabilityPolicy. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who updated the ImmutabilityPolicy. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who updated the + ImmutabilityPolicy. + :vartype upn: str + """ + + _validation = { + 'update': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'update': {'key': 'update', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpdateHistoryProperty, self).__init__(**kwargs) + self.update = None + self.immutability_period_since_creation_in_days = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/update_history_property_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/update_history_property_py3.py new file mode 100644 index 000000000000..ee38de98973d --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/update_history_property_py3.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UpdateHistoryProperty(Model): + """An update history of the ImmutabilityPolicy of a blob container. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar update: The ImmutabilityPolicy update type of a blob container, + possible values include: put, lock and extend. Possible values include: + 'put', 'lock', 'extend' + :vartype update: str or + ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicyUpdateType + :ivar immutability_period_since_creation_in_days: The immutability period + for the blobs in the container since the policy creation, in days. + :vartype immutability_period_since_creation_in_days: int + :ivar timestamp: Returns the date and time the ImmutabilityPolicy was + updated. + :vartype timestamp: datetime + :ivar object_identifier: Returns the Object ID of the user who updated the + ImmutabilityPolicy. + :vartype object_identifier: str + :ivar tenant_id: Returns the Tenant ID that issued the token for the user + who updated the ImmutabilityPolicy. + :vartype tenant_id: str + :ivar upn: Returns the User Principal Name of the user who updated the + ImmutabilityPolicy. + :vartype upn: str + """ + + _validation = { + 'update': {'readonly': True}, + 'immutability_period_since_creation_in_days': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'object_identifier': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'upn': {'readonly': True}, + } + + _attribute_map = { + 'update': {'key': 'update', 'type': 'str'}, + 'immutability_period_since_creation_in_days': {'key': 'immutabilityPeriodSinceCreationInDays', 'type': 'int'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'object_identifier': {'key': 'objectIdentifier', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'upn': {'key': 'upn', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateHistoryProperty, self).__init__(**kwargs) + self.update = None + self.immutability_period_since_creation_in_days = None + self.timestamp = None + self.object_identifier = None + self.tenant_id = None + self.upn = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage.py new file mode 100644 index 000000000000..0dfcde28431a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """Describes Storage Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: Gets the unit of measurement. Possible values include: + 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', + 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.storage.v2019_04_01.models.UsageUnit + :ivar current_value: Gets the current count of the allocated resources in + the subscription. + :vartype current_value: int + :ivar limit: Gets the maximum count of the resources that can be allocated + in the subscription. + :vartype limit: int + :ivar name: Gets the name of the type of usage. + :vartype name: ~azure.mgmt.storage.v2019_04_01.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'UsageUnit'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_name.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_name.py new file mode 100644 index 000000000000..e4082bf52384 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_name.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsageName(Model): + """The usage names that can be used; currently limited to StorageAccount. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets a string describing the resource name. + :vartype value: str + :ivar localized_value: Gets a localized string describing the resource + name. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_name_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_name_py3.py new file mode 100644 index 000000000000..f519bb5072b1 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_name_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsageName(Model): + """The usage names that can be used; currently limited to StorageAccount. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: Gets a string describing the resource name. + :vartype value: str + :ivar localized_value: Gets a localized string describing the resource + name. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UsageName, self).__init__(**kwargs) + self.value = None + self.localized_value = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_paged.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_paged.py new file mode 100644 index 000000000000..e45bf8914d6a --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class UsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`Usage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Usage]'} + } + + def __init__(self, *args, **kwargs): + + super(UsagePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_py3.py new file mode 100644 index 000000000000..aa75e481427b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/usage_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """Describes Storage Resource Usage. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar unit: Gets the unit of measurement. Possible values include: + 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', + 'BytesPerSecond' + :vartype unit: str or ~azure.mgmt.storage.v2019_04_01.models.UsageUnit + :ivar current_value: Gets the current count of the allocated resources in + the subscription. + :vartype current_value: int + :ivar limit: Gets the maximum count of the resources that can be allocated + in the subscription. + :vartype limit: int + :ivar name: Gets the name of the type of usage. + :vartype name: ~azure.mgmt.storage.v2019_04_01.models.UsageName + """ + + _validation = { + 'unit': {'readonly': True}, + 'current_value': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + } + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'UsageUnit'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__(self, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.unit = None + self.current_value = None + self.limit = None + self.name = None diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/virtual_network_rule.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/virtual_network_rule.py new file mode 100644 index 000000000000..717d50be9317 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/virtual_network_rule.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """Virtual Network rule. + + All required parameters must be populated in order to send to Azure. + + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: + /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type virtual_network_resource_id: str + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2019_04_01.models.Action + :param state: Gets the state of virtual network rule. Possible values + include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', + 'networkSourceDeleted' + :type state: str or ~azure.mgmt.storage.v2019_04_01.models.State + """ + + _validation = { + 'virtual_network_resource_id': {'required': True}, + } + + _attribute_map = { + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + 'state': {'key': 'state', 'type': 'State'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_resource_id = kwargs.get('virtual_network_resource_id', None) + self.action = kwargs.get('action', "Allow") + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/virtual_network_rule_py3.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..4bbc306c0a53 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/virtual_network_rule_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """Virtual Network rule. + + All required parameters must be populated in order to send to Azure. + + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: + /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type virtual_network_resource_id: str + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or ~azure.mgmt.storage.v2019_04_01.models.Action + :param state: Gets the state of virtual network rule. Possible values + include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', + 'networkSourceDeleted' + :type state: str or ~azure.mgmt.storage.v2019_04_01.models.State + """ + + _validation = { + 'virtual_network_resource_id': {'required': True}, + } + + _attribute_map = { + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'Action'}, + 'state': {'key': 'state', 'type': 'State'}, + } + + def __init__(self, *, virtual_network_resource_id: str, action="Allow", state=None, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.virtual_network_resource_id = virtual_network_resource_id + self.action = action + self.state = state diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/__init__.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/__init__.py new file mode 100644 index 000000000000..2e0271d17068 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/__init__.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .operations import Operations +from .skus_operations import SkusOperations +from .storage_accounts_operations import StorageAccountsOperations +from .usages_operations import UsagesOperations +from .management_policies_operations import ManagementPoliciesOperations +from .blob_services_operations import BlobServicesOperations +from .blob_containers_operations import BlobContainersOperations + +__all__ = [ + 'Operations', + 'SkusOperations', + 'StorageAccountsOperations', + 'UsagesOperations', + 'ManagementPoliciesOperations', + 'BlobServicesOperations', + 'BlobContainersOperations', +] diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/blob_containers_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/blob_containers_operations.py new file mode 100644 index 000000000000..b9dbfebe1ce4 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/blob_containers_operations.py @@ -0,0 +1,1130 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class BlobContainersOperations(object): + """BlobContainersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-04-01". + :ivar immutability_policy_name: The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-04-01" + self.immutability_policy_name = "default" + + self.config = config + + def list( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists all containers and does not support a prefix like data plane. + Also SRP today does not return continuation token. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListContainerItems or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ListContainerItems or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListContainerItems', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers'} + + def create( + self, resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config): + """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. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2019_04_01.models.PublicAccess + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.BlobContainer or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + blob_container = models.BlobContainer(public_access=public_access, metadata=metadata) + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(blob_container, 'BlobContainer') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobContainer', response) + if response.status_code == 201: + deserialized = self._deserialize('BlobContainer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def update( + self, resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config): + """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. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param public_access: Specifies whether data in the container may be + accessed publicly and the level of access. Possible values include: + 'Container', 'Blob', 'None' + :type public_access: str or + ~azure.mgmt.storage.v2019_04_01.models.PublicAccess + :param metadata: A name-value pair to associate with the container as + metadata. + :type metadata: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.BlobContainer or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + blob_container = models.BlobContainer(public_access=public_access, metadata=metadata) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(blob_container, 'BlobContainer') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobContainer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def get( + self, resource_group_name, account_name, container_name, custom_headers=None, raw=False, **operation_config): + """Gets properties of a specified container. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.BlobContainer or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobContainer', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def delete( + self, resource_group_name, account_name, container_name, custom_headers=None, raw=False, **operation_config): + """Deletes specified container under its account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'} + + def set_legal_hold( + self, resource_group_name, account_name, container_name, tags, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param tags: Each tag should be 3 to 23 alphanumeric characters and is + normalized to lower case at SRP. + :type tags: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LegalHold or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.LegalHold or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + legal_hold = models.LegalHold(tags=tags) + + # Construct URL + url = self.set_legal_hold.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(legal_hold, 'LegalHold') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LegalHold', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + set_legal_hold.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold'} + + def clear_legal_hold( + self, resource_group_name, account_name, container_name, tags, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param tags: Each tag should be 3 to 23 alphanumeric characters and is + normalized to lower case at SRP. + :type tags: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LegalHold or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.LegalHold or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + legal_hold = models.LegalHold(tags=tags) + + # Construct URL + url = self.clear_legal_hold.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(legal_hold, 'LegalHold') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LegalHold', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + clear_legal_hold.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold'} + + def create_or_update_immutability_policy( + self, resource_group_name, account_name, container_name, immutability_period_since_creation_in_days, if_match=None, custom_headers=None, raw=False, **operation_config): + """Creates or updates an unlocked immutability policy. ETag in If-Match is + honored if given but not required for this operation. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param immutability_period_since_creation_in_days: The immutability + period for the blobs in the container since the policy creation, in + days. + :type immutability_period_since_creation_in_days: int + :param if_match: 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. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + if immutability_period_since_creation_in_days is not None: + parameters = models.ImmutabilityPolicy(immutability_period_since_creation_in_days=immutability_period_since_creation_in_days) + + # Construct URL + url = self.create_or_update_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'immutabilityPolicyName': self._serialize.url("self.immutability_policy_name", self.immutability_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'ImmutabilityPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + create_or_update_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'} + + def get_immutability_policy( + self, resource_group_name, account_name, container_name, if_match=None, custom_headers=None, raw=False, **operation_config): + """Gets the existing immutability policy along with the corresponding ETag + in response headers and body. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param if_match: 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. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'immutabilityPolicyName': self._serialize.url("self.immutability_policy_name", self.immutability_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + get_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'} + + def delete_immutability_policy( + self, resource_group_name, account_name, container_name, if_match, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param if_match: 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. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'immutabilityPolicyName': self._serialize.url("self.immutability_policy_name", self.immutability_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + delete_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'} + + def lock_immutability_policy( + self, resource_group_name, account_name, container_name, if_match, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param if_match: 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. + :type if_match: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.lock_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + lock_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock'} + + def extend_immutability_policy( + self, resource_group_name, account_name, container_name, if_match, immutability_period_since_creation_in_days, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param if_match: 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. + :type if_match: str + :param immutability_period_since_creation_in_days: The immutability + period for the blobs in the container since the policy creation, in + days. + :type immutability_period_since_creation_in_days: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ImmutabilityPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ImmutabilityPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = None + if immutability_period_since_creation_in_days is not None: + parameters = models.ImmutabilityPolicy(immutability_period_since_creation_in_days=immutability_period_since_creation_in_days) + + # Construct URL + url = self.extend_immutability_policy.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'ImmutabilityPolicy') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ImmutabilityPolicy', response) + header_dict = { + 'ETag': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + extend_immutability_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend'} + + def lease( + self, resource_group_name, account_name, container_name, parameters=None, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param container_name: 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. + :type container_name: str + :param parameters: Lease Container request body. + :type parameters: + ~azure.mgmt.storage.v2019_04_01.models.LeaseContainerRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LeaseContainerResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.LeaseContainerResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.lease.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'containerName': self._serialize.url("container_name", container_name, 'str', max_length=63, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'LeaseContainerRequest') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LeaseContainerResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + lease.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/blob_services_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/blob_services_operations.py new file mode 100644 index 000000000000..f55eca4800d6 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/blob_services_operations.py @@ -0,0 +1,185 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class BlobServicesOperations(object): + """BlobServicesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-04-01". + :ivar blob_services_name: The name of the blob Service within the specified storage account. Blob Service Name must be 'default'. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-04-01" + self.blob_services_name = "default" + + self.config = config + + def set_service_properties( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """Sets the properties of a storage account’s Blob service, including + properties for Storage Analytics and CORS (Cross-Origin Resource + Sharing) rules. . + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The properties of a storage account’s Blob service, + including properties for Storage Analytics and CORS (Cross-Origin + Resource Sharing) rules. + :type parameters: + ~azure.mgmt.storage.v2019_04_01.models.BlobServiceProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.BlobServiceProperties + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.set_service_properties.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'BlobServicesName': self._serialize.url("self.blob_services_name", self.blob_services_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'BlobServiceProperties') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + set_service_properties.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}'} + + def get_service_properties( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets the properties of a storage account’s Blob service, including + properties for Storage Analytics and CORS (Cross-Origin Resource + Sharing) rules. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: BlobServiceProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.BlobServiceProperties + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_service_properties.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'BlobServicesName': self._serialize.url("self.blob_services_name", self.blob_services_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('BlobServiceProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_service_properties.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/management_policies_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/management_policies_operations.py new file mode 100644 index 000000000000..667a1b660958 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/management_policies_operations.py @@ -0,0 +1,242 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ManagementPoliciesOperations(object): + """ManagementPoliciesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-04-01". + :ivar management_policy_name: The name of the Storage Account Management Policy. It should always be 'default'. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-04-01" + self.management_policy_name = "default" + + self.config = config + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets the managementpolicy associated with the specified storage + account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagementPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'managementPolicyName': self._serialize.url("self.management_policy_name", self.management_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagementPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}'} + + def create_or_update( + self, resource_group_name, account_name, policy, custom_headers=None, raw=False, **operation_config): + """Sets the managementpolicy to the specified storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param policy: The Storage Account ManagementPolicy, in JSON format. + See more details in: + https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + :type policy: + ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicySchema + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ManagementPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ManagementPolicy or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + properties = models.ManagementPolicy(policy=policy) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'managementPolicyName': self._serialize.url("self.management_policy_name", self.management_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(properties, 'ManagementPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ManagementPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}'} + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes the managementpolicy associated with the specified storage + account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'managementPolicyName': self._serialize.url("self.management_policy_name", self.management_policy_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/operations.py new file mode 100644 index 000000000000..6ec629032033 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/operations.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Storage Rest API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.storage.v2019_04_01.models.OperationPaged[~azure.mgmt.storage.v2019_04_01.models.Operation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Storage/operations'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/skus_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/skus_operations.py new file mode 100644 index 000000000000..f33d57c8c62b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/skus_operations.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SkusOperations(object): + """SkusOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists the available SKUs supported by Microsoft.Storage for given + subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Sku + :rtype: + ~azure.mgmt.storage.v2019_04_01.models.SkuPaged[~azure.mgmt.storage.v2019_04_01.models.Sku] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.SkuPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/storage_accounts_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/storage_accounts_operations.py new file mode 100644 index 000000000000..3230db0a8b2b --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/storage_accounts_operations.py @@ -0,0 +1,991 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class StorageAccountsOperations(object): + """StorageAccountsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-04-01" + + self.config = config + + def check_name_availability( + self, name, custom_headers=None, raw=False, **operation_config): + """Checks that the storage account name is valid and is not already in + use. + + :param name: The storage account name. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CheckNameAvailabilityResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2019_04_01.models.CheckNameAvailabilityResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + account_name = models.StorageAccountCheckNameAvailabilityParameters(name=name) + + # Construct URL + url = self.check_name_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(account_name, 'StorageAccountCheckNameAvailabilityParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CheckNameAvailabilityResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability'} + + + def _create_initial( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The parameters to provide for the created account. + :type parameters: + ~azure.mgmt.storage.v2019_04_01.models.StorageAccountCreateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns StorageAccount or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.storage.v2019_04_01.models.StorageAccount] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storage.v2019_04_01.models.StorageAccount]] + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Deletes a storage account in Microsoft Azure. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def get_properties( + self, resource_group_name, account_name, expand=None, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param expand: 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' + :type expand: str or + ~azure.mgmt.storage.v2019_04_01.models.StorageAccountExpand + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.StorageAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_properties.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'StorageAccountExpand') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_properties.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def update( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The parameters to provide for the updated account. + :type parameters: + ~azure.mgmt.storage.v2019_04_01.models.StorageAccountUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.StorageAccount or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the storage accounts available under the subscription. Note + that storage keys are not returned; use the ListKeys operation for + this. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StorageAccount + :rtype: + ~azure.mgmt.storage.v2019_04_01.models.StorageAccountPaged[~azure.mgmt.storage.v2019_04_01.models.StorageAccount] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists all the storage accounts available under the given resource + group. Note that storage keys are not returned; use the ListKeys + operation for this. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of StorageAccount + :rtype: + ~azure.mgmt.storage.v2019_04_01.models.StorageAccountPaged[~azure.mgmt.storage.v2019_04_01.models.StorageAccount] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.StorageAccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts'} + + def list_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Lists the access keys for the specified storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccountListKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2019_04_01.models.StorageAccountListKeysResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys'} + + def regenerate_key( + self, resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config): + """Regenerates one of the access keys for the specified storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param key_name: The name of storage keys that want to be regenerated, + possible values are key1, key2. + :type key_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: StorageAccountListKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.storage.v2019_04_01.models.StorageAccountListKeysResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + regenerate_key1 = models.StorageAccountRegenerateKeyParameters(key_name=key_name) + + # Construct URL + url = self.regenerate_key.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(regenerate_key1, 'StorageAccountRegenerateKeyParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageAccountListKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey'} + + def list_account_sas( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """List SAS credentials of a storage account. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The parameters to provide to list SAS credentials + for the storage account. + :type parameters: + ~azure.mgmt.storage.v2019_04_01.models.AccountSasParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListAccountSasResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ListAccountSasResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_account_sas.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'AccountSasParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListAccountSasResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_account_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas'} + + def list_service_sas( + self, resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config): + """List service SAS credentials of a specific resource. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param parameters: The parameters to provide to list service SAS + credentials. + :type parameters: + ~azure.mgmt.storage.v2019_04_01.models.ServiceSasParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListServiceSasResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storage.v2019_04_01.models.ListServiceSasResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_service_sas.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServiceSasParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ListServiceSasResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_service_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas'} + + + def _failover_initial( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.failover.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def failover( + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): + """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. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._failover_initial( + resource_group_name=resource_group_name, + account_name=account_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + failover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover'} + + def revoke_user_delegation_keys( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Revoke user delegation keys. + + :param resource_group_name: The name of the resource group within the + user's subscription. The name is case insensitive. + :type resource_group_name: str + :param account_name: 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. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.revoke_user_delegation_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + revoke_user_delegation_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/usages_operations.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/usages_operations.py new file mode 100644 index 000000000000..ce8e27976551 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/operations/usages_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsagesOperations(object): + """UsagesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-04-01" + + self.config = config + + def list_by_location( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets the current usage count and the limit for the resources of the + location under the subscription. + + :param location: The location of the Azure Storage resource. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.storage.v2019_04_01.models.UsagePaged[~azure.mgmt.storage.v2019_04_01.models.Usage] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_location.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.UsagePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.UsagePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages'} diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/storage_management_client.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/storage_management_client.py new file mode 100644 index 000000000000..5832795dd281 --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/storage_management_client.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.operations import Operations +from .operations.skus_operations import SkusOperations +from .operations.storage_accounts_operations import StorageAccountsOperations +from .operations.usages_operations import UsagesOperations +from .operations.management_policies_operations import ManagementPoliciesOperations +from .operations.blob_services_operations import BlobServicesOperations +from .operations.blob_containers_operations import BlobContainersOperations +from . import models + + +class StorageManagementClientConfiguration(AzureConfiguration): + """Configuration for StorageManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(StorageManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-storage/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class StorageManagementClient(SDKClient): + """The Azure Storage Management API. + + :ivar config: Configuration for client. + :vartype config: StorageManagementClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.storage.v2019_04_01.operations.Operations + :ivar skus: Skus operations + :vartype skus: azure.mgmt.storage.v2019_04_01.operations.SkusOperations + :ivar storage_accounts: StorageAccounts operations + :vartype storage_accounts: azure.mgmt.storage.v2019_04_01.operations.StorageAccountsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.storage.v2019_04_01.operations.UsagesOperations + :ivar management_policies: ManagementPolicies operations + :vartype management_policies: azure.mgmt.storage.v2019_04_01.operations.ManagementPoliciesOperations + :ivar blob_services: BlobServices operations + :vartype blob_services: azure.mgmt.storage.v2019_04_01.operations.BlobServicesOperations + :ivar blob_containers: BlobContainers operations + :vartype blob_containers: azure.mgmt.storage.v2019_04_01.operations.BlobContainersOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = StorageManagementClientConfiguration(credentials, subscription_id, base_url) + super(StorageManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-04-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.skus = SkusOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_accounts = StorageAccountsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.management_policies = ManagementPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.blob_services = BlobServicesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.blob_containers = BlobContainersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/version.py b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/version.py new file mode 100644 index 000000000000..fe4b0545122f --- /dev/null +++ b/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2019-04-01" + diff --git a/azure-mgmt-storage/azure/mgmt/storage/version.py b/azure-mgmt-storage/azure/mgmt/storage/version.py index 58cb6285777a..c3bf8a0d56e4 100644 --- a/azure-mgmt-storage/azure/mgmt/storage/version.py +++ b/azure-mgmt-storage/azure/mgmt/storage/version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "3.1.1" +VERSION = "3.3.0" diff --git a/azure-mgmt-storage/setup.py b/azure-mgmt-storage/setup.py index 09b444b48d6c..8bef269c261e 100644 --- a/azure-mgmt-storage/setup.py +++ b/azure-mgmt-storage/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', diff --git a/azure-mgmt-storage/tests/recordings/test_mgmt_storage.test_storage_accounts.yaml b/azure-mgmt-storage/tests/recordings/test_mgmt_storage.test_storage_accounts.yaml index d23975b1b652..ff22dd40d86e 100644 --- a/azure-mgmt-storage/tests/recordings/test_mgmt_storage.test_storage_accounts.yaml +++ b/azure-mgmt-storage/tests/recordings/test_mgmt_storage.test_storage_accounts.yaml @@ -7,18 +7,18 @@ interactions: Connection: [keep-alive] Content-Length: ['77'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/checkNameAvailability?api-version=2019-04-01 response: body: {string: '{"nameAvailable":true}'} headers: cache-control: [no-cache] content-length: ['22'] content-type: [application/json] - date: ['Thu, 27 Sep 2018 18:10:57 GMT'] + date: ['Thu, 25 Apr 2019 02:09:36 GMT'] expires: ['-1'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 @@ -29,28 +29,27 @@ interactions: x-content-type-options: [nosniff] status: {code: 200, message: OK} - request: - body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus", - "properties": {"supportsHttpsTrafficOnly": false, "isHnsEnabled": false}}' + body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['148'] + Content-Length: ['74'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a?api-version=2019-04-01 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] content-type: [text/plain; charset=utf-8] - date: ['Thu, 27 Sep 2018 18:10:58 GMT'] + date: ['Thu, 25 Apr 2019 02:09:38 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/2df9768b-c3b4-48ed-9da8-c6a8715212b7?monitor=true&api-version=2018-07-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/af2f1d10-c9a9-45c2-b045-84234c326dd4?monitor=true&api-version=2019-04-01'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0'] @@ -64,67 +63,17 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/2df9768b-c3b4-48ed-9da8-c6a8715212b7?monitor=true&api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/af2f1d10-c9a9-45c2-b045-84234c326dd4?monitor=true&api-version=2019-04-01 response: - body: {string: ''} - headers: - cache-control: [no-cache] - content-length: ['0'] - content-type: [text/plain; charset=utf-8] - date: ['Thu, 27 Sep 2018 18:11:15 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/2df9768b-c3b4-48ed-9da8-c6a8715212b7?monitor=true&api-version=2018-07-01'] - pragma: [no-cache] - server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 - Microsoft-HTTPAPI/2.0'] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/2df9768b-c3b4-48ed-9da8-c6a8715212b7?monitor=true&api-version=2018-07-01 - response: - body: {string: ''} - headers: - cache-control: [no-cache] - content-length: ['0'] - content-type: [text/plain; charset=utf-8] - date: ['Thu, 27 Sep 2018 18:11:18 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/2df9768b-c3b4-48ed-9da8-c6a8715212b7?monitor=true&api-version=2018-07-01'] - pragma: [no-cache] - server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 - Microsoft-HTTPAPI/2.0'] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/2df9768b-c3b4-48ed-9da8-c6a8715212b7?monitor=true&api-version=2018-07-01 - response: - body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-09-27T18:10:58.3451412Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'} + body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-25T02:09:38.1254127Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'} headers: cache-control: [no-cache] - content-length: ['1200'] + content-length: ['1117'] content-type: [application/json] - date: ['Thu, 27 Sep 2018 18:11:22 GMT'] + date: ['Thu, 25 Apr 2019 02:09:55 GMT'] expires: ['-1'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 @@ -140,18 +89,18 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a?api-version=2019-04-01 response: - body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-09-27T18:10:58.3451412Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'} + body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-25T02:09:38.1254127Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'} headers: cache-control: [no-cache] - content-length: ['1200'] + content-length: ['1117'] content-type: [application/json] - date: ['Thu, 27 Sep 2018 18:11:22 GMT'] + date: ['Thu, 25 Apr 2019 02:10:05 GMT'] expires: ['-1'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 @@ -168,18 +117,18 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['0'] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a/listKeys?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a/listKeys?api-version=2019-04-01 response: - body: {string: '{"keys":[{"keyName":"key1","value":"hGeduuyFkXOYTR5kAmxUgzbr2oYC1CJVhS9iwk1thfcEI5jSIabYAsgJ9aQvRrTWXcKWURHDLM3qfWFNj3xhJA==","permissions":"FULL"},{"keyName":"key2","value":"y4i6h3CpPIoMMEodfuyhaz7us0XuUaukNcBzI6lEGiLSZr2zLRGpQfnpKYBiEcixu4AUpzHUQSmIVdgA9JFl0w==","permissions":"FULL"}]}'} + body: {string: '{"keys":[{"keyName":"key1","value":"0W2ol2NmZ2g7aL+Vhr4yTf0D/B1w7sjHrnWFQ36KYiaElH0E6xqhgohPSA60/QC25L2eU81vsRdgsTOYUjeJJA==","permissions":"FULL"},{"keyName":"key2","value":"3HeEMUnyv/HouF5Hgjjc9OvA+FK7aNXSVgHJfRAshVjvsA5bHAz9dvr1GbuwKH4yxqghGKZfTo5taDeUqqA61w==","permissions":"FULL"}]}'} headers: cache-control: [no-cache] content-length: ['288'] content-type: [application/json] - date: ['Thu, 27 Sep 2018 18:11:23 GMT'] + date: ['Thu, 25 Apr 2019 02:09:57 GMT'] expires: ['-1'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 @@ -198,18 +147,18 @@ interactions: Connection: [keep-alive] Content-Length: ['19'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a/regenerateKey?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a/regenerateKey?api-version=2019-04-01 response: - body: {string: '{"keys":[{"keyName":"key1","value":"a30TfeA3LJIb2/gz0uTMtoJ+aJNGEjYWA3FjcsRy2NAlZXzxwhJMo4YYHxriGkTUvl/VEj5eltlksgFx3jpc8w==","permissions":"FULL"},{"keyName":"key2","value":"y4i6h3CpPIoMMEodfuyhaz7us0XuUaukNcBzI6lEGiLSZr2zLRGpQfnpKYBiEcixu4AUpzHUQSmIVdgA9JFl0w==","permissions":"FULL"}]}'} + body: {string: '{"keys":[{"keyName":"key1","value":"5c/G+I6o3lsAbrdl/9IA+luPSaf1SS+lUacu+0nscjZC9sy/cU6sAUCiqt5x2iL01VNWi/fwwrxsy82alws6jQ==","permissions":"FULL"},{"keyName":"key2","value":"3HeEMUnyv/HouF5Hgjjc9OvA+FK7aNXSVgHJfRAshVjvsA5bHAz9dvr1GbuwKH4yxqghGKZfTo5taDeUqqA61w==","permissions":"FULL"}]}'} headers: cache-control: [no-cache] content-length: ['288'] content-type: [application/json] - date: ['Thu, 27 Sep 2018 18:11:23 GMT'] + date: ['Thu, 25 Apr 2019 02:10:03 GMT'] expires: ['-1'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 @@ -226,18 +175,18 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts?api-version=2019-04-01 response: - body: {string: '{"value":[{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-09-27T18:10:58.3451412Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}]}'} + body: {string: '{"value":[{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-25T02:09:38.1254127Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}]}'} headers: cache-control: [no-cache] - content-length: ['1212'] + content-length: ['1129'] content-type: [application/json] - date: ['Thu, 27 Sep 2018 18:11:23 GMT'] + date: ['Thu, 25 Apr 2019 02:09:58 GMT'] expires: ['-1'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 @@ -253,48 +202,47 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts?api-version=2019-04-01 response: - body: {string: '{"value":[{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amar/providers/Microsoft.Storage/storageAccounts/amardiag596","name":"amardiag596","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-08T16:10:29.0593763Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-08T16:10:29.0593763Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-08-08T16:10:28.8562508Z","primaryEndpoints":{"blob":"https://amardiag596.blob.core.windows.net/","queue":"https://amardiag596.queue.core.windows.net/","table":"https://amardiag596.table.core.windows.net/","file":"https://amardiag596.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/amar/providers/Microsoft.Storage/storageAccounts/nodetest12","name":"nodetest12","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-06-11T22:34:54.8545695Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-06-11T22:34:54.8545695Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-06-11T22:34:54.6358258Z","primaryEndpoints":{"dfs":"https://nodetest12.dfs.core.windows.net/","web":"https://nodetest12.z13.web.core.windows.net/","blob":"https://nodetest12.blob.core.windows.net/","queue":"https://nodetest12.queue.core.windows.net/","table":"https://nodetest12.table.core.windows.net/","file":"https://nodetest12.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgvazkuv27uljwvz2tmnmecw5nuqramhayk7uqkl67gjxfsjfpxhfyxg45cxg2lqz6u/providers/Microsoft.Storage/storageAccounts/clistoragevi5fudbnsq","name":"clistoragevi5fudbnsq","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-14T21:27:33.4336328Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-14T21:27:33.4336328Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-14T21:27:33.3241912Z","primaryEndpoints":{"web":"https://clistoragevi5fudbnsq.z22.web.core.windows.net/","blob":"https://clistoragevi5fudbnsq.blob.core.windows.net/","queue":"https://clistoragevi5fudbnsq.queue.core.windows.net/","table":"https://clistoragevi5fudbnsq.table.core.windows.net/","file":"https://clistoragevi5fudbnsq.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistoragevi5fudbnsq-secondary.z22.web.core.windows.net/","blob":"https://clistoragevi5fudbnsq-secondary.blob.core.windows.net/","queue":"https://clistoragevi5fudbnsq-secondary.queue.core.windows.net/","table":"https://clistoragevi5fudbnsq-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgelvypcebie75casshjcdfo3gxybms7xn6zp46gdvihhxdcqaqcrmdtbx2ldm7e7l2/providers/Microsoft.Storage/storageAccounts/clistorageqnmno3yrja","name":"clistorageqnmno3yrja","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-22T17:36:54.9267813Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-22T17:36:54.9267813Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-22T17:36:54.7702516Z","primaryEndpoints":{"web":"https://clistorageqnmno3yrja.z22.web.core.windows.net/","blob":"https://clistorageqnmno3yrja.blob.core.windows.net/","queue":"https://clistorageqnmno3yrja.queue.core.windows.net/","table":"https://clistorageqnmno3yrja.table.core.windows.net/","file":"https://clistorageqnmno3yrja.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistorageqnmno3yrja-secondary.z22.web.core.windows.net/","blob":"https://clistorageqnmno3yrja-secondary.blob.core.windows.net/","queue":"https://clistorageqnmno3yrja-secondary.queue.core.windows.net/","table":"https://clistorageqnmno3yrja-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-09-27T18:10:58.3451412Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg6lcblrcfuy56nybdtlwez5kpklvczltjbt5u6yqiamvlkisyw53gbzepfvipm6opr/providers/Microsoft.Storage/storageAccounts/clistoragenwbh6jsk37","name":"clistoragenwbh6jsk37","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-16T00:11:59.1916112Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-16T00:11:59.1916112Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-16T00:11:59.0978516Z","primaryEndpoints":{"web":"https://clistoragenwbh6jsk37.z22.web.core.windows.net/","blob":"https://clistoragenwbh6jsk37.blob.core.windows.net/","queue":"https://clistoragenwbh6jsk37.queue.core.windows.net/","table":"https://clistoragenwbh6jsk37.table.core.windows.net/","file":"https://clistoragenwbh6jsk37.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistoragenwbh6jsk37-secondary.z22.web.core.windows.net/","blob":"https://clistoragenwbh6jsk37-secondary.blob.core.windows.net/","queue":"https://clistoragenwbh6jsk37-secondary.queue.core.windows.net/","table":"https://clistoragenwbh6jsk37-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxjfd2y6zx7tea3hqe3tqomekc5vxp3tgo6gpuoledm6wo3a2ugtowyy4waukv5rjy/providers/Microsoft.Storage/storageAccounts/clistoragevkmaf7jdkq","name":"clistoragevkmaf7jdkq","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-14T01:00:09.5288450Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-14T01:00:09.5288450Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-14T01:00:09.4192315Z","primaryEndpoints":{"web":"https://clistoragevkmaf7jdkq.z22.web.core.windows.net/","blob":"https://clistoragevkmaf7jdkq.blob.core.windows.net/","queue":"https://clistoragevkmaf7jdkq.queue.core.windows.net/","table":"https://clistoragevkmaf7jdkq.table.core.windows.net/","file":"https://clistoragevkmaf7jdkq.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistoragevkmaf7jdkq-secondary.z22.web.core.windows.net/","blob":"https://clistoragevkmaf7jdkq-secondary.blob.core.windows.net/","queue":"https://clistoragevkmaf7jdkq-secondary.queue.core.windows.net/","table":"https://clistoragevkmaf7jdkq-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgck524lxhki2ki4rxnew5gl7cjisgc3nch5mdttubhuzu6qbdipbf2uhoe73wtyzhn/providers/Microsoft.Storage/storageAccounts/clistoragehda7raqo3s","name":"clistoragehda7raqo3s","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-16T17:49:00.7139157Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-16T17:49:00.7139157Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-16T17:49:00.4482840Z","primaryEndpoints":{"web":"https://clistoragehda7raqo3s.z22.web.core.windows.net/","blob":"https://clistoragehda7raqo3s.blob.core.windows.net/","queue":"https://clistoragehda7raqo3s.queue.core.windows.net/","table":"https://clistoragehda7raqo3s.table.core.windows.net/","file":"https://clistoragehda7raqo3s.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistoragehda7raqo3s-secondary.z22.web.core.windows.net/","blob":"https://clistoragehda7raqo3s-secondary.blob.core.windows.net/","queue":"https://clistoragehda7raqo3s-secondary.queue.core.windows.net/","table":"https://clistoragehda7raqo3s-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmtgeyhv55fxzhqjkb3ynjqw5ljlhjp3btqdavs7hcmx33z7vu6ytan6ere7n5c4x5/providers/Microsoft.Storage/storageAccounts/clistoragejqhqxuct23","name":"clistoragejqhqxuct23","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-10T22:36:17.3820701Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-10T22:36:17.3820701Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-10T22:36:17.2883235Z","primaryEndpoints":{"web":"https://clistoragejqhqxuct23.z22.web.core.windows.net/","blob":"https://clistoragejqhqxuct23.blob.core.windows.net/","queue":"https://clistoragejqhqxuct23.queue.core.windows.net/","table":"https://clistoragejqhqxuct23.table.core.windows.net/","file":"https://clistoragejqhqxuct23.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistoragejqhqxuct23-secondary.z22.web.core.windows.net/","blob":"https://clistoragejqhqxuct23-secondary.blob.core.windows.net/","queue":"https://clistoragejqhqxuct23-secondary.queue.core.windows.net/","table":"https://clistoragejqhqxuct23-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgpamvtezmteh7zp2bdt3y4idc7mmbzvf6sdzjynqmht26jisd4amljydqqa32zckbx/providers/Microsoft.Storage/storageAccounts/clistoragewr2qjfjhzb","name":"clistoragewr2qjfjhzb","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-16T00:13:04.0707837Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-16T00:13:04.0707837Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-16T00:13:03.9614281Z","primaryEndpoints":{"web":"https://clistoragewr2qjfjhzb.z22.web.core.windows.net/","blob":"https://clistoragewr2qjfjhzb.blob.core.windows.net/","queue":"https://clistoragewr2qjfjhzb.queue.core.windows.net/","table":"https://clistoragewr2qjfjhzb.table.core.windows.net/","file":"https://clistoragewr2qjfjhzb.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistoragewr2qjfjhzb-secondary.z22.web.core.windows.net/","blob":"https://clistoragewr2qjfjhzb-secondary.blob.core.windows.net/","queue":"https://clistoragewr2qjfjhzb-secondary.queue.core.windows.net/","table":"https://clistoragewr2qjfjhzb-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgooetcw3locipbmar4742ebvhztivldtfcwdo5kmhnouyr44vufpxzhgplrrvk56gs/providers/Microsoft.Storage/storageAccounts/clistorage5uh2sd5di6","name":"clistorage5uh2sd5di6","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-10T21:53:58.5156654Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-10T21:53:58.5156654Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-10T21:53:58.4219023Z","primaryEndpoints":{"web":"https://clistorage5uh2sd5di6.z22.web.core.windows.net/","blob":"https://clistorage5uh2sd5di6.blob.core.windows.net/","queue":"https://clistorage5uh2sd5di6.queue.core.windows.net/","table":"https://clistorage5uh2sd5di6.table.core.windows.net/","file":"https://clistorage5uh2sd5di6.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistorage5uh2sd5di6-secondary.z22.web.core.windows.net/","blob":"https://clistorage5uh2sd5di6-secondary.blob.core.windows.net/","queue":"https://clistorage5uh2sd5di6-secondary.queue.core.windows.net/","table":"https://clistorage5uh2sd5di6-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtg6bh4bbk6ihd7m24ktzhvdb5oqztkv4zx63r7xqkiggambffyitl2m2yx2fssywe/providers/Microsoft.Storage/storageAccounts/clistorage7jvvytqmtd","name":"clistorage7jvvytqmtd","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-09-11T23:59:47.3696626Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-09-11T23:59:47.3696626Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-09-11T23:59:46.6511608Z","primaryEndpoints":{"web":"https://clistorage7jvvytqmtd.z22.web.core.windows.net/","blob":"https://clistorage7jvvytqmtd.blob.core.windows.net/","queue":"https://clistorage7jvvytqmtd.queue.core.windows.net/","table":"https://clistorage7jvvytqmtd.table.core.windows.net/","file":"https://clistorage7jvvytqmtd.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistorage7jvvytqmtd-secondary.z22.web.core.windows.net/","blob":"https://clistorage7jvvytqmtd-secondary.blob.core.windows.net/","queue":"https://clistorage7jvvytqmtd-secondary.queue.core.windows.net/","table":"https://clistorage7jvvytqmtd-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgypr6blmisj5pyxrjphnwbifkmsdyk3igstozydzondjnuhgq2e5zirlvz5rl3n6gk/providers/Microsoft.Storage/storageAccounts/clistorage7de3dm4xlr","name":"clistorage7de3dm4xlr","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-14T20:49:50.7380783Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-14T20:49:50.7380783Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-14T20:49:50.6443644Z","primaryEndpoints":{"web":"https://clistorage7de3dm4xlr.z22.web.core.windows.net/","blob":"https://clistorage7de3dm4xlr.blob.core.windows.net/","queue":"https://clistorage7de3dm4xlr.queue.core.windows.net/","table":"https://clistorage7de3dm4xlr.table.core.windows.net/","file":"https://clistorage7de3dm4xlr.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistorage7de3dm4xlr-secondary.z22.web.core.windows.net/","blob":"https://clistorage7de3dm4xlr-secondary.blob.core.windows.net/","queue":"https://clistorage7de3dm4xlr-secondary.queue.core.windows.net/","table":"https://clistorage7de3dm4xlr-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgi2biwne2krt426d7syiwaouiedbqykuhgys7oag2c3twjzz4c7pup26vc226txaua/providers/Microsoft.Storage/storageAccounts/clistorageayl5jkq6ty","name":"clistorageayl5jkq6ty","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-14T16:54:41.5707757Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-14T16:54:41.5707757Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-08-14T16:54:41.4614062Z","primaryEndpoints":{"web":"https://clistorageayl5jkq6ty.z22.web.core.windows.net/","blob":"https://clistorageayl5jkq6ty.blob.core.windows.net/","queue":"https://clistorageayl5jkq6ty.queue.core.windows.net/","table":"https://clistorageayl5jkq6ty.table.core.windows.net/","file":"https://clistorageayl5jkq6ty.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistorageayl5jkq6ty-secondary.z22.web.core.windows.net/","blob":"https://clistorageayl5jkq6ty-secondary.blob.core.windows.net/","queue":"https://clistorageayl5jkq6ty-secondary.queue.core.windows.net/","table":"https://clistorageayl5jkq6ty-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilxtest/providers/Microsoft.Storage/storageAccounts/wilxtesting","name":"wilxtesting","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-28T17:41:10.2771663Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-28T17:41:10.2771663Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-08-28T17:41:10.1061835Z","primaryEndpoints":{"blob":"https://wilxtesting.blob.core.windows.net/","queue":"https://wilxtesting.queue.core.windows.net/","table":"https://wilxtesting.table.core.windows.net/","file":"https://wilxtesting.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"blob":"https://wilxtesting-secondary.blob.core.windows.net/","queue":"https://wilxtesting-secondary.queue.core.windows.net/","table":"https://wilxtesting-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rglwtxxxotabpblyephsiknmarmfjl325ixoojyprquq6ehxx5b2wokoysglc4meehl/providers/Microsoft.Storage/storageAccounts/clistorage2jbmemj6cj","name":"clistorage2jbmemj6cj","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-09-12T19:25:59.1461511Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-09-12T19:25:59.1461511Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-09-12T19:25:58.8961261Z","primaryEndpoints":{"web":"https://clistorage2jbmemj6cj.z22.web.core.windows.net/","blob":"https://clistorage2jbmemj6cj.blob.core.windows.net/","queue":"https://clistorage2jbmemj6cj.queue.core.windows.net/","table":"https://clistorage2jbmemj6cj.table.core.windows.net/","file":"https://clistorage2jbmemj6cj.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistorage2jbmemj6cj-secondary.z22.web.core.windows.net/","blob":"https://clistorage2jbmemj6cj-secondary.blob.core.windows.net/","queue":"https://clistorage2jbmemj6cj-secondary.queue.core.windows.net/","table":"https://clistorage2jbmemj6cj-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwrwfwfeym72qee3nah2tasiw4z3ccr3lo6xnpbdlmiuzm4hs574o7lgzayesgwffv/providers/Microsoft.Storage/storageAccounts/clistoragehhbuuxg3tu","name":"clistoragehhbuuxg3tu","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-06-27T00:17:56.8422453Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-06-27T00:17:56.8422453Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-06-27T00:17:56.7015542Z","primaryEndpoints":{"web":"https://clistoragehhbuuxg3tu.z22.web.core.windows.net/","blob":"https://clistoragehhbuuxg3tu.blob.core.windows.net/","queue":"https://clistoragehhbuuxg3tu.queue.core.windows.net/","table":"https://clistoragehhbuuxg3tu.table.core.windows.net/","file":"https://clistoragehhbuuxg3tu.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://clistoragehhbuuxg3tu-secondary.z22.web.core.windows.net/","blob":"https://clistoragehhbuuxg3tu-secondary.blob.core.windows.net/","queue":"https://clistoragehhbuuxg3tu-secondary.queue.core.windows.net/","table":"https://clistoragehhbuuxg3tu-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestlab1/providers/Microsoft.Storage/storageAccounts/acliautomationlab8902","name":"acliautomationlab8902","type":"Microsoft.Storage/storageAccounts","location":"southcentralus","tags":{"hidden-DevTestLabs-LabUId":"ca9ec547-32c5-422d-b3d2-25906ed71959"},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T16:51:47.2662871Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T16:51:47.2662871Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T16:51:47.2194106Z","primaryEndpoints":{"blob":"https://acliautomationlab8902.blob.core.windows.net/","queue":"https://acliautomationlab8902.queue.core.windows.net/","table":"https://acliautomationlab8902.table.core.windows.net/","file":"https://acliautomationlab8902.file.core.windows.net/"},"primaryLocation":"southcentralus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel-eventgridtesting/providers/Microsoft.Storage/storageAccounts/eventgridtestin9c1e","name":"eventgridtestin9c1e","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-05-30T22:57:11.1008680Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-05-30T22:57:11.1008680Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-05-30T22:57:10.9915110Z","primaryEndpoints":{"blob":"https://eventgridtestin9c1e.blob.core.windows.net/","queue":"https://eventgridtestin9c1e.queue.core.windows.net/","table":"https://eventgridtestin9c1e.table.core.windows.net/","file":"https://eventgridtestin9c1e.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available"}},{"sku":{"name":"Premium_LRS","tier":"Premium"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel-testcapture/providers/Microsoft.Storage/storageAccounts/lmazueltestcapture451","name":"lmazueltestcapture451","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-06-06T16:46:02.5308824Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-06-06T16:46:02.5308824Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-06-06T16:46:02.4527298Z","primaryEndpoints":{"blob":"https://lmazueltestcapture451.blob.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilxgroup2/providers/Microsoft.Storage/storageAccounts/wilxstorage0","name":"wilxstorage0","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-13T01:05:28.4648959Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-13T01:05:28.4648959Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-04-13T01:05:28.4023820Z","primaryEndpoints":{"dfs":"https://wilxstorage0.dfs.core.windows.net/","web":"https://wilxstorage0.z5.web.core.windows.net/","blob":"https://wilxstorage0.blob.core.windows.net/","queue":"https://wilxstorage0.queue.core.windows.net/","table":"https://wilxstorage0.table.core.windows.net/","file":"https://wilxstorage0.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilxgroup3/providers/Microsoft.Storage/storageAccounts/wilxstorageworm","name":"wilxstorageworm","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-13T22:36:53.1534839Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-13T22:36:53.1534839Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-04-13T22:36:53.0909769Z","primaryEndpoints":{"web":"https://wilxstorageworm.z3.web.core.windows.net/","blob":"https://wilxstorageworm.blob.core.windows.net/","queue":"https://wilxstorageworm.queue.core.windows.net/","table":"https://wilxstorageworm.table.core.windows.net/","file":"https://wilxstorageworm.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available","secondaryLocation":"centraluseuap","statusOfSecondary":"available","secondaryEndpoints":{"web":"https://wilxstorageworm-secondary.z3.web.core.windows.net/","blob":"https://wilxstorageworm-secondary.blob.core.windows.net/","queue":"https://wilxstorageworm-secondary.queue.core.windows.net/","table":"https://wilxstorageworm-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjzhnckmw5ftoqmm2b5gezwgslvfm2dqg7ldpwvuukicy7ca4unquohsptfrbddr2a/providers/Microsoft.Storage/storageAccounts/clitestvjlqxa4ctzkwwpg4b","name":"clitestvjlqxa4ctzkwwpg4b","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-05-29T19:38:19.5634738Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-05-29T19:38:19.5634738Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-05-29T19:38:19.5165939Z","primaryEndpoints":{"blob":"https://clitestvjlqxa4ctzkwwpg4b.blob.core.windows.net/","queue":"https://clitestvjlqxa4ctzkwwpg4b.queue.core.windows.net/","table":"https://clitestvjlqxa4ctzkwwpg4b.table.core.windows.net/","file":"https://clitestvjlqxa4ctzkwwpg4b.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg326oxnqqn33y3n42vz6x5xol5rvvw3z4o6tladwwtkmcntnsxhhxxtddtrxwm2edj/providers/Microsoft.Storage/storageAccounts/clitestjwzkdsfuou3niutbd","name":"clitestjwzkdsfuou3niutbd","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T20:07:33.1021018Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T20:07:33.1021018Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T20:07:33.0552270Z","primaryEndpoints":{"blob":"https://clitestjwzkdsfuou3niutbd.blob.core.windows.net/","queue":"https://clitestjwzkdsfuou3niutbd.queue.core.windows.net/","table":"https://clitestjwzkdsfuou3niutbd.table.core.windows.net/","file":"https://clitestjwzkdsfuou3niutbd.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgf3er5m4irbxsxhyil42jxq3t5ehzphmdzn2gortdlrzyw4i6tlgswx2xrcgldp6oh/providers/Microsoft.Storage/storageAccounts/clitestpabilv4yd6qxvguml","name":"clitestpabilv4yd6qxvguml","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T19:20:22.2758006Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T19:20:22.2758006Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T19:20:22.2445526Z","primaryEndpoints":{"blob":"https://clitestpabilv4yd6qxvguml.blob.core.windows.net/","queue":"https://clitestpabilv4yd6qxvguml.queue.core.windows.net/","table":"https://clitestpabilv4yd6qxvguml.table.core.windows.net/","file":"https://clitestpabilv4yd6qxvguml.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmr6jo34yofyafj3n6gjbhrgmrd6pwgguthc2u235qfle6y6ztyzrlkuqn544s7cop/providers/Microsoft.Storage/storageAccounts/clitestnlmd52jlcmr4ce7b4","name":"clitestnlmd52jlcmr4ce7b4","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T20:14:07.3500611Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T20:14:07.3500611Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T20:14:07.3188286Z","primaryEndpoints":{"blob":"https://clitestnlmd52jlcmr4ce7b4.blob.core.windows.net/","queue":"https://clitestnlmd52jlcmr4ce7b4.queue.core.windows.net/","table":"https://clitestnlmd52jlcmr4ce7b4.table.core.windows.net/","file":"https://clitestnlmd52jlcmr4ce7b4.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgeyg7p46zydk24opv23uowejjybhvp2nqcyqpnmknbs7o3w5c3tocuuygkogbvxz5f/providers/Microsoft.Storage/storageAccounts/clitestcrdofae6jvibomf2w","name":"clitestcrdofae6jvibomf2w","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-20T01:19:55.8214506Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-20T01:19:55.8214506Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-20T01:19:55.7120798Z","primaryEndpoints":{"blob":"https://clitestcrdofae6jvibomf2w.blob.core.windows.net/","queue":"https://clitestcrdofae6jvibomf2w.queue.core.windows.net/","table":"https://clitestcrdofae6jvibomf2w.table.core.windows.net/","file":"https://clitestcrdofae6jvibomf2w.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgldagdmcl4pklmwzmr3wftx2kidhw7johz6d7tl6m7raetzzfhpqhrfffu5vwqtfxo/providers/Microsoft.Storage/storageAccounts/clitestt6pqb7xneswrh2sp6","name":"clitestt6pqb7xneswrh2sp6","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T17:51:14.8730435Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T17:51:14.8730435Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T17:51:14.8105336Z","primaryEndpoints":{"blob":"https://clitestt6pqb7xneswrh2sp6.blob.core.windows.net/","queue":"https://clitestt6pqb7xneswrh2sp6.queue.core.windows.net/","table":"https://clitestt6pqb7xneswrh2sp6.table.core.windows.net/","file":"https://clitestt6pqb7xneswrh2sp6.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgd5ygu6mbq43qw57ncgznekmhwaqlrowjc6dggyk2h6cfwioigvtt3bg7ayqckcwvk/providers/Microsoft.Storage/storageAccounts/clitestixsogcl5p5af5w2p3","name":"clitestixsogcl5p5af5w2p3","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T18:00:02.2397791Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T18:00:02.2397791Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T18:00:02.2087326Z","primaryEndpoints":{"blob":"https://clitestixsogcl5p5af5w2p3.blob.core.windows.net/","queue":"https://clitestixsogcl5p5af5w2p3.queue.core.windows.net/","table":"https://clitestixsogcl5p5af5w2p3.table.core.windows.net/","file":"https://clitestixsogcl5p5af5w2p3.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgv6extdlzddtno2qf5o37e5g2n2d2x5ah4gq2olmpqezmxibj4h36focak4y6dose7/providers/Microsoft.Storage/storageAccounts/clitestcushmpfbtkste2a2a","name":"clitestcushmpfbtkste2a2a","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-05-25T01:20:25.1414518Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-05-25T01:20:25.1414518Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-05-25T01:20:25.0780033Z","primaryEndpoints":{"blob":"https://clitestcushmpfbtkste2a2a.blob.core.windows.net/","queue":"https://clitestcushmpfbtkste2a2a.queue.core.windows.net/","table":"https://clitestcushmpfbtkste2a2a.table.core.windows.net/","file":"https://clitestcushmpfbtkste2a2a.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg6xf4idvnxclgamrcp2ezv54qhk3doyffriwiegbm7ouxjbfmd2cj7izni3bhdv4wf/providers/Microsoft.Storage/storageAccounts/clitestoj23vdhimampujgji","name":"clitestoj23vdhimampujgji","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-05-15T02:09:49.4622185Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-05-15T02:09:49.4622185Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-05-15T02:09:49.3684695Z","primaryEndpoints":{"blob":"https://clitestoj23vdhimampujgji.blob.core.windows.net/","queue":"https://clitestoj23vdhimampujgji.queue.core.windows.net/","table":"https://clitestoj23vdhimampujgji.table.core.windows.net/","file":"https://clitestoj23vdhimampujgji.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoo2qxqtbb56w7uujqzhodrozdh7fxg5wxscql4ndybxkardgqzqvheltadic2zoxf/providers/Microsoft.Storage/storageAccounts/clitestfyixx74gs3loj3isf","name":"clitestfyixx74gs3loj3isf","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T20:34:26.6293927Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T20:34:26.6293927Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T20:34:26.5668681Z","primaryEndpoints":{"blob":"https://clitestfyixx74gs3loj3isf.blob.core.windows.net/","queue":"https://clitestfyixx74gs3loj3isf.queue.core.windows.net/","table":"https://clitestfyixx74gs3loj3isf.table.core.windows.net/","file":"https://clitestfyixx74gs3loj3isf.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgpfhep77mmcmcn3afvnvskjk3g27ybc7gq6kh5c6vu7ugy7e3ykawkib6u7st25kbi/providers/Microsoft.Storage/storageAccounts/clitest5o5upfigqe5aenkc3","name":"clitest5o5upfigqe5aenkc3","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-05-25T01:22:12.5013507Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-05-25T01:22:12.5013507Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-05-25T01:22:12.4388487Z","primaryEndpoints":{"blob":"https://clitest5o5upfigqe5aenkc3.blob.core.windows.net/","queue":"https://clitest5o5upfigqe5aenkc3.queue.core.windows.net/","table":"https://clitest5o5upfigqe5aenkc3.table.core.windows.net/","file":"https://clitest5o5upfigqe5aenkc3.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgeblmtd6pv6car44ga6qwvicwjyuxydhhkaharam4nad6uekgqgm2uiisw7v4a3czx/providers/Microsoft.Storage/storageAccounts/clitestcdx4bwlcvgviotc2p","name":"clitestcdx4bwlcvgviotc2p","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T22:26:49.0369320Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T22:26:49.0369320Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T22:26:48.9744081Z","primaryEndpoints":{"blob":"https://clitestcdx4bwlcvgviotc2p.blob.core.windows.net/","queue":"https://clitestcdx4bwlcvgviotc2p.queue.core.windows.net/","table":"https://clitestcdx4bwlcvgviotc2p.table.core.windows.net/","file":"https://clitestcdx4bwlcvgviotc2p.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwxiadyatfxsixayqfinia7ybjwo5cfoyw65qpuna3alx3x2diwukx4tkcpwir2mbq/providers/Microsoft.Storage/storageAccounts/clitesta2lvllqz23rgasyf7","name":"clitesta2lvllqz23rgasyf7","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T17:57:25.6818153Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T17:57:25.6818153Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T17:57:25.6193002Z","primaryEndpoints":{"blob":"https://clitesta2lvllqz23rgasyf7.blob.core.windows.net/","queue":"https://clitesta2lvllqz23rgasyf7.queue.core.windows.net/","table":"https://clitesta2lvllqz23rgasyf7.table.core.windows.net/","file":"https://clitesta2lvllqz23rgasyf7.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnipcxreywyorqhptpg4lmvsb6sqsef3mezozbrenqq6ufmd3hrh7plmdnorjt5y5x/providers/Microsoft.Storage/storageAccounts/clitestshv4qcdkeictveped","name":"clitestshv4qcdkeictveped","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-05-14T19:04:11.4311113Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-05-14T19:04:11.4311113Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-05-14T19:04:11.3686065Z","primaryEndpoints":{"blob":"https://clitestshv4qcdkeictveped.blob.core.windows.net/","queue":"https://clitestshv4qcdkeictveped.queue.core.windows.net/","table":"https://clitestshv4qcdkeictveped.table.core.windows.net/","file":"https://clitestshv4qcdkeictveped.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}}]}'} + body: {string: '{"value":[{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggcbozcaoqcvyxyhsax7bevei6phf6m6yk2u4m3m2wjn7qqhph2c5dqyz2vrar2fz6/providers/Microsoft.Storage/storageAccounts/clistoragetif6h64z3n","name":"clistoragetif6h64z3n","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-10-16T00:22:59.7063780Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-10-16T00:22:59.7063780Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-10-16T00:22:59.6125763Z","primaryEndpoints":{"dfs":"https://clistoragetif6h64z3n.dfs.core.windows.net/","web":"https://clistoragetif6h64z3n.z22.web.core.windows.net/","blob":"https://clistoragetif6h64z3n.blob.core.windows.net/","queue":"https://clistoragetif6h64z3n.queue.core.windows.net/","table":"https://clistoragetif6h64z3n.table.core.windows.net/","file":"https://clistoragetif6h64z3n.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://clistoragetif6h64z3n-secondary.dfs.core.windows.net/","web":"https://clistoragetif6h64z3n-secondary.z22.web.core.windows.net/","blob":"https://clistoragetif6h64z3n-secondary.blob.core.windows.net/","queue":"https://clistoragetif6h64z3n-secondary.queue.core.windows.net/","table":"https://clistoragetif6h64z3n-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg7f5jjgz2vniqujmnobv3ud4j3fhjsoao7bcimizgbjspg5nwlr72qugdtfgo7ovn6/providers/Microsoft.Storage/storageAccounts/clistorageqjqpu42bh7","name":"clistorageqjqpu42bh7","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-10-16T17:18:13.9931194Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-10-16T17:18:13.9931194Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-10-16T17:18:13.8993652Z","primaryEndpoints":{"dfs":"https://clistorageqjqpu42bh7.dfs.core.windows.net/","web":"https://clistorageqjqpu42bh7.z22.web.core.windows.net/","blob":"https://clistorageqjqpu42bh7.blob.core.windows.net/","queue":"https://clistorageqjqpu42bh7.queue.core.windows.net/","table":"https://clistorageqjqpu42bh7.table.core.windows.net/","file":"https://clistorageqjqpu42bh7.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://clistorageqjqpu42bh7-secondary.dfs.core.windows.net/","web":"https://clistorageqjqpu42bh7-secondary.z22.web.core.windows.net/","blob":"https://clistorageqjqpu42bh7-secondary.blob.core.windows.net/","queue":"https://clistorageqjqpu42bh7-secondary.queue.core.windows.net/","table":"https://clistorageqjqpu42bh7-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IT_aibmdi_tmpl_02/providers/Microsoft.Storage/storageAccounts/8dd5abe797a98ed4639d1b86","name":"8dd5abe797a98ed4639d1b86","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-24T07:24:14.2868026Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-24T07:24:14.2868026Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-24T07:24:14.1930932Z","primaryEndpoints":{"blob":"https://8dd5abe797a98ed4639d1b86.blob.core.windows.net/","queue":"https://8dd5abe797a98ed4639d1b86.queue.core.windows.net/","table":"https://8dd5abe797a98ed4639d1b86.table.core.windows.net/","file":"https://8dd5abe797a98ed4639d1b86.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_devtestlabs_test_devtestlabs34410fc3/providers/Microsoft.Storage/storageAccounts/apylab34410fc39961","name":"apylab34410fc39961","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{"hidden-DevTestLabs-LabUId":"66d57a8f-4302-4ee9-96b0-2876a7ef2f93"},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-02-07T22:34:06.6993369Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-02-07T22:34:06.6993369Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-07T22:34:06.5899644Z","primaryEndpoints":{"dfs":"https://apylab34410fc39961.dfs.core.windows.net/","web":"https://apylab34410fc39961.z22.web.core.windows.net/","blob":"https://apylab34410fc39961.blob.core.windows.net/","queue":"https://apylab34410fc39961.queue.core.windows.net/","table":"https://apylab34410fc39961.table.core.windows.net/","file":"https://apylab34410fc39961.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgneuacqttufmkpgch7zg7xge3ci3pvsexkawxdv4xcjzuw5bwjjlz6uplznillxgwb/providers/Microsoft.Storage/storageAccounts/clistorageuxtcmjfo3r","name":"clistorageuxtcmjfo3r","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-10-16T00:30:43.8588701Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-10-16T00:30:43.8588701Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-10-16T00:30:43.7488876Z","primaryEndpoints":{"dfs":"https://clistorageuxtcmjfo3r.dfs.core.windows.net/","web":"https://clistorageuxtcmjfo3r.z22.web.core.windows.net/","blob":"https://clistorageuxtcmjfo3r.blob.core.windows.net/","queue":"https://clistorageuxtcmjfo3r.queue.core.windows.net/","table":"https://clistorageuxtcmjfo3r.table.core.windows.net/","file":"https://clistorageuxtcmjfo3r.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://clistorageuxtcmjfo3r-secondary.dfs.core.windows.net/","web":"https://clistorageuxtcmjfo3r-secondary.z22.web.core.windows.net/","blob":"https://clistorageuxtcmjfo3r-secondary.blob.core.windows.net/","queue":"https://clistorageuxtcmjfo3r-secondary.queue.core.windows.net/","table":"https://clistorageuxtcmjfo3r-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IT_aibmdi_template_from_sig_2/providers/Microsoft.Storage/storageAccounts/e52af9dae594471c822a01b7","name":"e52af9dae594471c822a01b7","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-24T22:35:46.8884885Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-24T22:35:46.8884885Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-24T22:35:46.7791164Z","primaryEndpoints":{"blob":"https://e52af9dae594471c822a01b7.blob.core.windows.net/","queue":"https://e52af9dae594471c822a01b7.queue.core.windows.net/","table":"https://e52af9dae594471c822a01b7.table.core.windows.net/","file":"https://e52af9dae594471c822a01b7.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-25T02:09:38.1254127Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwrwfwfeym72qee3nah2tasiw4z3ccr3lo6xnpbdlmiuzm4hs574o7lgzayesgwffv/providers/Microsoft.Storage/storageAccounts/clistoragehhbuuxg3tu","name":"clistoragehhbuuxg3tu","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-06-27T00:17:56.8422453Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-06-27T00:17:56.8422453Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-06-27T00:17:56.7015542Z","primaryEndpoints":{"dfs":"https://clistoragehhbuuxg3tu.dfs.core.windows.net/","web":"https://clistoragehhbuuxg3tu.z22.web.core.windows.net/","blob":"https://clistoragehhbuuxg3tu.blob.core.windows.net/","queue":"https://clistoragehhbuuxg3tu.queue.core.windows.net/","table":"https://clistoragehhbuuxg3tu.table.core.windows.net/","file":"https://clistoragehhbuuxg3tu.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://clistoragehhbuuxg3tu-secondary.dfs.core.windows.net/","web":"https://clistoragehhbuuxg3tu-secondary.z22.web.core.windows.net/","blob":"https://clistoragehhbuuxg3tu-secondary.blob.core.windows.net/","queue":"https://clistoragehhbuuxg3tu-secondary.queue.core.windows.net/","table":"https://clistoragehhbuuxg3tu-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IT_aibmdi_template_from_win/providers/Microsoft.Storage/storageAccounts/1ba189dbd49120032fd4960a","name":"1ba189dbd49120032fd4960a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-24T23:45:23.8421962Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-24T23:45:23.8421962Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-24T23:45:23.7328558Z","primaryEndpoints":{"blob":"https://1ba189dbd49120032fd4960a.blob.core.windows.net/","queue":"https://1ba189dbd49120032fd4960a.queue.core.windows.net/","table":"https://1ba189dbd49120032fd4960a.table.core.windows.net/","file":"https://1ba189dbd49120032fd4960a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IT_aibmdi_template_from_sig_3/providers/Microsoft.Storage/storageAccounts/8af0201334a980808afe5dd0","name":"8af0201334a980808afe5dd0","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-24T22:37:19.2431571Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-24T22:37:19.2431571Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-24T22:37:19.0399914Z","primaryEndpoints":{"blob":"https://8af0201334a980808afe5dd0.blob.core.windows.net/","queue":"https://8af0201334a980808afe5dd0.queue.core.windows.net/","table":"https://8af0201334a980808afe5dd0.table.core.windows.net/","file":"https://8af0201334a980808afe5dd0.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IT_aibmdi_tmpl_01/providers/Microsoft.Storage/storageAccounts/0740aebdba457277d6ec6fc7","name":"0740aebdba457277d6ec6fc7","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-24T07:08:03.7166755Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-24T07:08:03.7166755Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-24T07:08:03.6072938Z","primaryEndpoints":{"blob":"https://0740aebdba457277d6ec6fc7.blob.core.windows.net/","queue":"https://0740aebdba457277d6ec6fc7.queue.core.windows.net/","table":"https://0740aebdba457277d6ec6fc7.table.core.windows.net/","file":"https://0740aebdba457277d6ec6fc7.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgpngxmiq5kjet77dbpu5suzlrqcawlrej5mjnfhwjl4fmi7irwxh7lv4ihzcsvld4m/providers/Microsoft.Storage/storageAccounts/clistorage66w3pc3dsj","name":"clistorage66w3pc3dsj","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-11-16T21:44:38.1144767Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-11-16T21:44:38.1144767Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-11-16T21:44:38.0206977Z","primaryEndpoints":{"dfs":"https://clistorage66w3pc3dsj.dfs.core.windows.net/","web":"https://clistorage66w3pc3dsj.z22.web.core.windows.net/","blob":"https://clistorage66w3pc3dsj.blob.core.windows.net/","queue":"https://clistorage66w3pc3dsj.queue.core.windows.net/","table":"https://clistorage66w3pc3dsj.table.core.windows.net/","file":"https://clistorage66w3pc3dsj.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://clistorage66w3pc3dsj-secondary.dfs.core.windows.net/","web":"https://clistorage66w3pc3dsj-secondary.z22.web.core.windows.net/","blob":"https://clistorage66w3pc3dsj-secondary.blob.core.windows.net/","queue":"https://clistorage66w3pc3dsj-secondary.queue.core.windows.net/","table":"https://clistorage66w3pc3dsj-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgdxgqgossxjqvg3knc4po4nhpezscthslqj554n5aufqy6llzobd35ex333rpwom4p/providers/Microsoft.Storage/storageAccounts/clistoragevfnamwpyxm","name":"clistoragevfnamwpyxm","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-10-17T04:55:26.0551771Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-10-17T04:55:26.0551771Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-10-17T04:55:25.9609573Z","primaryEndpoints":{"dfs":"https://clistoragevfnamwpyxm.dfs.core.windows.net/","web":"https://clistoragevfnamwpyxm.z22.web.core.windows.net/","blob":"https://clistoragevfnamwpyxm.blob.core.windows.net/","queue":"https://clistoragevfnamwpyxm.queue.core.windows.net/","table":"https://clistoragevfnamwpyxm.table.core.windows.net/","file":"https://clistoragevfnamwpyxm.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://clistoragevfnamwpyxm-secondary.dfs.core.windows.net/","web":"https://clistoragevfnamwpyxm-secondary.z22.web.core.windows.net/","blob":"https://clistoragevfnamwpyxm-secondary.blob.core.windows.net/","queue":"https://clistoragevfnamwpyxm-secondary.queue.core.windows.net/","table":"https://clistoragevfnamwpyxm-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rglwtxxxotabpblyephsiknmarmfjl325ixoojyprquq6ehxx5b2wokoysglc4meehl/providers/Microsoft.Storage/storageAccounts/clistorage2jbmemj6cj","name":"clistorage2jbmemj6cj","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-09-12T19:25:59.1461511Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-09-12T19:25:59.1461511Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-09-12T19:25:58.8961261Z","primaryEndpoints":{"dfs":"https://clistorage2jbmemj6cj.dfs.core.windows.net/","web":"https://clistorage2jbmemj6cj.z22.web.core.windows.net/","blob":"https://clistorage2jbmemj6cj.blob.core.windows.net/","queue":"https://clistorage2jbmemj6cj.queue.core.windows.net/","table":"https://clistorage2jbmemj6cj.table.core.windows.net/","file":"https://clistorage2jbmemj6cj.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://clistorage2jbmemj6cj-secondary.dfs.core.windows.net/","web":"https://clistorage2jbmemj6cj-secondary.z22.web.core.windows.net/","blob":"https://clistorage2jbmemj6cj-secondary.blob.core.windows.net/","queue":"https://clistorage2jbmemj6cj-secondary.queue.core.windows.net/","table":"https://clistorage2jbmemj6cj-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestlab1/providers/Microsoft.Storage/storageAccounts/acliautomationlab8902","name":"acliautomationlab8902","type":"Microsoft.Storage/storageAccounts","location":"southcentralus","tags":{"hidden-DevTestLabs-LabUId":"ca9ec547-32c5-422d-b3d2-25906ed71959"},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T16:51:47.2662871Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T16:51:47.2662871Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T16:51:47.2194106Z","primaryEndpoints":{"blob":"https://acliautomationlab8902.blob.core.windows.net/","queue":"https://acliautomationlab8902.queue.core.windows.net/","table":"https://acliautomationlab8902.table.core.windows.net/","file":"https://acliautomationlab8902.file.core.windows.net/"},"primaryLocation":"southcentralus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel-eventgridtesting/providers/Microsoft.Storage/storageAccounts/eventgridtestin9c1e","name":"eventgridtestin9c1e","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-05-30T22:57:11.1008680Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-05-30T22:57:11.1008680Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-05-30T22:57:10.9915110Z","primaryEndpoints":{"blob":"https://eventgridtestin9c1e.blob.core.windows.net/","queue":"https://eventgridtestin9c1e.queue.core.windows.net/","table":"https://eventgridtestin9c1e.table.core.windows.net/","file":"https://eventgridtestin9c1e.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available"}},{"sku":{"name":"Premium_LRS","tier":"Premium"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lmazuel-testcapture/providers/Microsoft.Storage/storageAccounts/lmazueltestcapture451","name":"lmazueltestcapture451","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-06-06T16:46:02.5308824Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-06-06T16:46:02.5308824Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-06-06T16:46:02.4527298Z","primaryEndpoints":{"blob":"https://lmazueltestcapture451.blob.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg326oxnqqn33y3n42vz6x5xol5rvvw3z4o6tladwwtkmcntnsxhhxxtddtrxwm2edj/providers/Microsoft.Storage/storageAccounts/clitestjwzkdsfuou3niutbd","name":"clitestjwzkdsfuou3niutbd","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T20:07:33.1021018Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T20:07:33.1021018Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T20:07:33.0552270Z","primaryEndpoints":{"blob":"https://clitestjwzkdsfuou3niutbd.blob.core.windows.net/","queue":"https://clitestjwzkdsfuou3niutbd.queue.core.windows.net/","table":"https://clitestjwzkdsfuou3niutbd.table.core.windows.net/","file":"https://clitestjwzkdsfuou3niutbd.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/wilxgroup3/providers/Microsoft.Storage/storageAccounts/wilxstorageworm","name":"wilxstorageworm","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-13T22:36:53.1534839Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-13T22:36:53.1534839Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2018-04-13T22:36:53.0909769Z","primaryEndpoints":{"dfs":"https://wilxstorageworm.dfs.core.windows.net/","web":"https://wilxstorageworm.z3.web.core.windows.net/","blob":"https://wilxstorageworm.blob.core.windows.net/","queue":"https://wilxstorageworm.queue.core.windows.net/","table":"https://wilxstorageworm.table.core.windows.net/","file":"https://wilxstorageworm.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available","secondaryLocation":"centraluseuap","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://wilxstorageworm-secondary.dfs.core.windows.net/","web":"https://wilxstorageworm-secondary.z3.web.core.windows.net/","blob":"https://wilxstorageworm-secondary.blob.core.windows.net/","queue":"https://wilxstorageworm-secondary.queue.core.windows.net/","table":"https://wilxstorageworm-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmr6jo34yofyafj3n6gjbhrgmrd6pwgguthc2u235qfle6y6ztyzrlkuqn544s7cop/providers/Microsoft.Storage/storageAccounts/clitestnlmd52jlcmr4ce7b4","name":"clitestnlmd52jlcmr4ce7b4","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-04-19T20:14:07.3500611Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-04-19T20:14:07.3500611Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-04-19T20:14:07.3188286Z","primaryEndpoints":{"blob":"https://clitestnlmd52jlcmr4ce7b4.blob.core.windows.net/","queue":"https://clitestnlmd52jlcmr4ce7b4.queue.core.windows.net/","table":"https://clitestnlmd52jlcmr4ce7b4.table.core.windows.net/","file":"https://clitestnlmd52jlcmr4ce7b4.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}}]}'} headers: cache-control: [no-cache] - content-length: ['50407'] + content-length: ['27341'] content-type: [application/json; charset=utf-8] - date: ['Thu, 27 Sep 2018 18:11:24 GMT'] + date: ['Thu, 25 Apr 2019 02:09:58 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] vary: [Accept-Encoding] x-content-type-options: [nosniff] - x-ms-original-request-ids: [6a23af80-2786-434f-b83d-73bb57fc1d2c, 5db7bb3c-b831-4eb1-b3f1-555fc86cb57c, - 23d7d277-274b-4f36-bad7-0c15dc927d2c, 4e2e6687-3d80-4615-a720-715ba0ef13f0, - a74c38da-b68d-45eb-bdcc-8abd531ad5a5, f59b0fd4-038f-4662-84c1-772d64f3ddc1] + x-ms-original-request-ids: [e817a0c9-dc59-462b-a093-9cfa70f7c458, d67b9531-3222-4972-afbb-55c9e67bdecb, + baa51a16-36b9-4701-a3f2-fda591dfaeba, aa4a242d-b8dc-448f-b1a4-596a2a3a66e5, + ef9b6a30-6cf6-4f21-89b2-323c42adf5ff] status: {code: 200, message: OK} - request: - body: '{"sku": {"name": "Standard_GRS"}, "properties": {"supportsHttpsTrafficOnly": - false}}' + body: '{"sku": {"name": "Standard_GRS"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['84'] + Content-Length: ['33'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a?api-version=2019-04-01 response: - body: {string: '{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-09-27T18:10:58.4390222Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-09-27T18:10:58.3451412Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available"}}'} + body: {string: '{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a","name":"pyarmstorage43b8102a","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"},"blob":{"enabled":true,"lastEnabledTime":"2019-04-25T02:09:38.2343563Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-04-25T02:09:38.1254127Z","primaryEndpoints":{"blob":"https://pyarmstorage43b8102a.blob.core.windows.net/","queue":"https://pyarmstorage43b8102a.queue.core.windows.net/","table":"https://pyarmstorage43b8102a.table.core.windows.net/","file":"https://pyarmstorage43b8102a.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available"}}'} headers: cache-control: [no-cache] - content-length: ['1261'] + content-length: ['1178'] content-type: [application/json] - date: ['Thu, 27 Sep 2018 18:11:24 GMT'] + date: ['Thu, 25 Apr 2019 02:10:00 GMT'] expires: ['-1'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 @@ -312,18 +260,18 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['0'] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_storage_test_storage_accounts43b8102a/providers/Microsoft.Storage/storageAccounts/pyarmstorage43b8102a?api-version=2019-04-01 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] content-type: [text/plain; charset=utf-8] - date: ['Thu, 27 Sep 2018 18:11:26 GMT'] + date: ['Thu, 25 Apr 2019 02:10:01 GMT'] expires: ['-1'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 diff --git a/azure-mgmt-storage/tests/recordings/test_mgmt_storage.test_storage_usage.yaml b/azure-mgmt-storage/tests/recordings/test_mgmt_storage.test_storage_usage.yaml index d78b091c119c..3655b011ee42 100644 --- a/azure-mgmt-storage/tests/recordings/test_mgmt_storage.test_storage_usage.yaml +++ b/azure-mgmt-storage/tests/recordings/test_mgmt_storage.test_storage_usage.yaml @@ -5,19 +5,19 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.4 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.7.0 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-storage/3.3.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/usages?api-version=2018-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/usages?api-version=2019-04-01 response: - body: {string: '{"value":[{"unit":"Count","currentValue":2,"limit":250,"name":{"value":"StorageAccounts","localizedValue":"Storage + body: {string: '{"value":[{"unit":"Count","currentValue":0,"limit":250,"name":{"value":"StorageAccounts","localizedValue":"Storage Accounts"}}]}'} headers: cache-control: [no-cache] content-length: ['128'] content-type: [application/json] - date: ['Thu, 27 Sep 2018 18:11:28 GMT'] + date: ['Thu, 25 Apr 2019 02:10:05 GMT'] expires: ['-1'] pragma: [no-cache] server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0