Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class StorageManagementClient(MultiApiClientMixin, SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2019-04-01'
DEFAULT_API_VERSION = '2019-06-01'
_PROFILE_TAG = "azure.mgmt.storage.StorageManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand Down Expand Up @@ -83,6 +83,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2018-07-01: :mod:`v2018_07_01.models<azure.mgmt.storage.v2018_07_01.models>`
* 2018-11-01: :mod:`v2018_11_01.models<azure.mgmt.storage.v2018_11_01.models>`
* 2019-04-01: :mod:`v2019_04_01.models<azure.mgmt.storage.v2019_04_01.models>`
* 2019-06-01: :mod:`v2019_06_01.models<azure.mgmt.storage.v2019_06_01.models>`
"""
if api_version == '2015-06-15':
from .v2015_06_15 import models
Expand Down Expand Up @@ -114,6 +115,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-04-01':
from .v2019_04_01 import models
return models
elif api_version == '2019-06-01':
from .v2019_06_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand All @@ -125,6 +129,7 @@ def blob_containers(self):
* 2018-07-01: :class:`BlobContainersOperations<azure.mgmt.storage.v2018_07_01.operations.BlobContainersOperations>`
* 2018-11-01: :class:`BlobContainersOperations<azure.mgmt.storage.v2018_11_01.operations.BlobContainersOperations>`
* 2019-04-01: :class:`BlobContainersOperations<azure.mgmt.storage.v2019_04_01.operations.BlobContainersOperations>`
* 2019-06-01: :class:`BlobContainersOperations<azure.mgmt.storage.v2019_06_01.operations.BlobContainersOperations>`
"""
api_version = self._get_api_version('blob_containers')
if api_version == '2018-02-01':
Expand All @@ -137,6 +142,8 @@ def blob_containers(self):
from .v2018_11_01.operations import BlobContainersOperations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_01.operations import BlobContainersOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_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)))
Expand All @@ -148,6 +155,7 @@ def blob_services(self):
* 2018-07-01: :class:`BlobServicesOperations<azure.mgmt.storage.v2018_07_01.operations.BlobServicesOperations>`
* 2018-11-01: :class:`BlobServicesOperations<azure.mgmt.storage.v2018_11_01.operations.BlobServicesOperations>`
* 2019-04-01: :class:`BlobServicesOperations<azure.mgmt.storage.v2019_04_01.operations.BlobServicesOperations>`
* 2019-06-01: :class:`BlobServicesOperations<azure.mgmt.storage.v2019_06_01.operations.BlobServicesOperations>`
"""
api_version = self._get_api_version('blob_services')
if api_version == '2018-07-01':
Expand All @@ -156,6 +164,8 @@ def blob_services(self):
from .v2018_11_01.operations import BlobServicesOperations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_01.operations import BlobServicesOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_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)))
Expand All @@ -165,10 +175,13 @@ def file_services(self):
"""Instance depends on the API version:

* 2019-04-01: :class:`FileServicesOperations<azure.mgmt.storage.v2019_04_01.operations.FileServicesOperations>`
* 2019-06-01: :class:`FileServicesOperations<azure.mgmt.storage.v2019_06_01.operations.FileServicesOperations>`
"""
api_version = self._get_api_version('file_services')
if api_version == '2019-04-01':
from .v2019_04_01.operations import FileServicesOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_01.operations import FileServicesOperations 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)))
Expand All @@ -178,10 +191,13 @@ def file_shares(self):
"""Instance depends on the API version:

* 2019-04-01: :class:`FileSharesOperations<azure.mgmt.storage.v2019_04_01.operations.FileSharesOperations>`
* 2019-06-01: :class:`FileSharesOperations<azure.mgmt.storage.v2019_06_01.operations.FileSharesOperations>`
"""
api_version = self._get_api_version('file_shares')
if api_version == '2019-04-01':
from .v2019_04_01.operations import FileSharesOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_01.operations import FileSharesOperations 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)))
Expand All @@ -193,6 +209,7 @@ def management_policies(self):
* 2018-07-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2018_07_01.operations.ManagementPoliciesOperations>`
* 2018-11-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2018_11_01.operations.ManagementPoliciesOperations>`
* 2019-04-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2019_04_01.operations.ManagementPoliciesOperations>`
* 2019-06-01: :class:`ManagementPoliciesOperations<azure.mgmt.storage.v2019_06_01.operations.ManagementPoliciesOperations>`
"""
api_version = self._get_api_version('management_policies')
if api_version == '2018-07-01':
Expand All @@ -201,6 +218,8 @@ def management_policies(self):
from .v2018_11_01.operations import ManagementPoliciesOperations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_01.operations import ManagementPoliciesOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_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)))
Expand All @@ -216,6 +235,7 @@ def operations(self):
* 2018-07-01: :class:`Operations<azure.mgmt.storage.v2018_07_01.operations.Operations>`
* 2018-11-01: :class:`Operations<azure.mgmt.storage.v2018_11_01.operations.Operations>`
* 2019-04-01: :class:`Operations<azure.mgmt.storage.v2019_04_01.operations.Operations>`
* 2019-06-01: :class:`Operations<azure.mgmt.storage.v2019_06_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-06-01':
Expand All @@ -232,6 +252,34 @@ def operations(self):
from .v2018_11_01.operations import Operations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_01.operations import Operations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_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)))

@property
def private_endpoint_connections(self):
"""Instance depends on the API version:

* 2019-06-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.storage.v2019_06_01.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2019-06-01':
from .v2019_06_01.operations import PrivateEndpointConnectionsOperations 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)))

@property
def private_link_resources(self):
"""Instance depends on the API version:

* 2019-06-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.storage.v2019_06_01.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2019-06-01':
from .v2019_06_01.operations import PrivateLinkResourcesOperations 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)))
Expand All @@ -247,6 +295,7 @@ def skus(self):
* 2018-07-01: :class:`SkusOperations<azure.mgmt.storage.v2018_07_01.operations.SkusOperations>`
* 2018-11-01: :class:`SkusOperations<azure.mgmt.storage.v2018_11_01.operations.SkusOperations>`
* 2019-04-01: :class:`SkusOperations<azure.mgmt.storage.v2019_04_01.operations.SkusOperations>`
* 2019-06-01: :class:`SkusOperations<azure.mgmt.storage.v2019_06_01.operations.SkusOperations>`
"""
api_version = self._get_api_version('skus')
if api_version == '2017-06-01':
Expand All @@ -263,6 +312,8 @@ def skus(self):
from .v2018_11_01.operations import SkusOperations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_01.operations import SkusOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_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)))
Expand All @@ -281,6 +332,7 @@ def storage_accounts(self):
* 2018-07-01: :class:`StorageAccountsOperations<azure.mgmt.storage.v2018_07_01.operations.StorageAccountsOperations>`
* 2018-11-01: :class:`StorageAccountsOperations<azure.mgmt.storage.v2018_11_01.operations.StorageAccountsOperations>`
* 2019-04-01: :class:`StorageAccountsOperations<azure.mgmt.storage.v2019_04_01.operations.StorageAccountsOperations>`
* 2019-06-01: :class:`StorageAccountsOperations<azure.mgmt.storage.v2019_06_01.operations.StorageAccountsOperations>`
"""
api_version = self._get_api_version('storage_accounts')
if api_version == '2015-06-15':
Expand All @@ -303,6 +355,8 @@ def storage_accounts(self):
from .v2018_11_01.operations import StorageAccountsOperations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_01.operations import StorageAccountsOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_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)))
Expand Down Expand Up @@ -343,6 +397,7 @@ def usages(self):
* 2018-07-01: :class:`UsagesOperations<azure.mgmt.storage.v2018_07_01.operations.UsagesOperations>`
* 2018-11-01: :class:`UsagesOperations<azure.mgmt.storage.v2018_11_01.operations.UsagesOperations>`
* 2019-04-01: :class:`UsagesOperations<azure.mgmt.storage.v2019_04_01.operations.UsagesOperations>`
* 2019-06-01: :class:`UsagesOperations<azure.mgmt.storage.v2019_06_01.operations.UsagesOperations>`
"""
api_version = self._get_api_version('usages')
if api_version == '2018-03-01-preview':
Expand All @@ -353,6 +408,8 @@ def usages(self):
from .v2018_11_01.operations import UsagesOperations as OperationClass
elif api_version == '2019-04-01':
from .v2019_04_01.operations import UsagesOperations as OperationClass
elif api_version == '2019-06-01':
from .v2019_06_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)))
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------
from .v2018_02_01.models import *
from .v2019_04_01.models import *
from .v2019_06_01.models import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from ._configuration import StorageManagementClientConfiguration
from ._storage_management_client import StorageManagementClient
__all__ = ['StorageManagementClient', 'StorageManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -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 msrestazure import AzureConfiguration

from .version import VERSION


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<msrestazure.azure_active_directory>`
: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)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

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
Loading