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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions azure-mgmt-storage/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
++++++++++++++++++

Expand Down
1 change: 1 addition & 0 deletions azure-mgmt-storage/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
19 changes: 0 additions & 19 deletions azure-mgmt-storage/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/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
=====

Expand Down
2 changes: 1 addition & 1 deletion azure-mgmt-storage/azure/mgmt/storage/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
from .v2019_04_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -116,6 +116,8 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2018-02-01: :mod:`v2018_02_01.models<azure.mgmt.storage.v2018_02_01.models>`
* 2018-03-01-preview: :mod:`v2018_03_01_preview.models<azure.mgmt.storage.v2018_03_01_preview.models>`
* 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>`
"""
if api_version == '2015-06-15':
from .v2015_06_15 import models
Expand All @@ -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
Expand All @@ -150,6 +158,8 @@ def blob_containers(self):
* 2018-02-01: :class:`BlobContainersOperations<azure.mgmt.storage.v2018_02_01.operations.BlobContainersOperations>`
* 2018-03-01-preview: :class:`BlobContainersOperations<azure.mgmt.storage.v2018_03_01_preview.operations.BlobContainersOperations>`
* 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>`
"""
api_version = self._get_api_version('blob_containers')
if api_version == '2018-02-01':
Expand All @@ -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)))
Expand All @@ -167,10 +181,16 @@ def blob_services(self):
"""Instance depends on the API version:

* 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>`
"""
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)))
Expand All @@ -180,10 +200,16 @@ def management_policies(self):
"""Instance depends on the API version:

* 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>`
"""
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)))
Expand All @@ -197,6 +223,8 @@ def operations(self):
* 2018-02-01: :class:`Operations<azure.mgmt.storage.v2018_02_01.operations.Operations>`
* 2018-03-01-preview: :class:`Operations<azure.mgmt.storage.v2018_03_01_preview.operations.Operations>`
* 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>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-06-01':
Expand All @@ -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)))
Expand All @@ -222,6 +254,8 @@ def skus(self):
* 2018-02-01: :class:`SkusOperations<azure.mgmt.storage.v2018_02_01.operations.SkusOperations>`
* 2018-03-01-preview: :class:`SkusOperations<azure.mgmt.storage.v2018_03_01_preview.operations.SkusOperations>`
* 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>`
"""
api_version = self._get_api_version('skus')
if api_version == '2017-06-01':
Expand All @@ -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)))
Expand All @@ -250,6 +288,8 @@ def storage_accounts(self):
* 2018-02-01: :class:`StorageAccountsOperations<azure.mgmt.storage.v2018_02_01.operations.StorageAccountsOperations>`
* 2018-03-01-preview: :class:`StorageAccountsOperations<azure.mgmt.storage.v2018_03_01_preview.operations.StorageAccountsOperations>`
* 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>`
"""
api_version = self._get_api_version('storage_accounts')
if api_version == '2015-06-15':
Expand All @@ -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)))
Expand Down Expand Up @@ -306,12 +350,18 @@ def usages(self):

* 2018-03-01-preview: :class:`UsagesOperations<azure.mgmt.storage.v2018_03_01_preview.operations.UsagesOperations>`
* 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>`
"""
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)))
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -180,6 +184,8 @@
'LegalHold',
'ListContainerItem',
'ListContainerItems',
'LeaseContainerRequest',
'LeaseContainerResponse',
'OperationPaged',
'SkuPaged',
'StorageAccountPaged',
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Loading