Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Generated from 1929243cc853b5f21c5e6cef8a2867fb4d26b4dc
updating description - clarify encryption enabled by default
  • Loading branch information
AutorestCI committed Aug 2, 2019
commit df2e7e741435647c5815699145fbf2d6b476729b
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
from ._models import Usage
from ._models import UsageName
from ._models import VirtualNetworkRule
from ._paged_models import BlobServicePropertiesPaged
from ._paged_models import ListContainerItemPaged
from ._paged_models import OperationPaged
from ._paged_models import SkuPaged
Expand Down Expand Up @@ -239,6 +240,7 @@
'SkuPaged',
'StorageAccountPaged',
'UsagePaged',
'BlobServicePropertiesPaged',
'ListContainerItemPaged',
'ReasonCode',
'SkuName',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,17 +488,17 @@ class DateAfterCreation(Model):

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
:param days_after_creation_greater_than: Required. Value indicating the
age in days after creation
:type days_after_creation_greater_than: float
"""

_validation = {
'days_after_creation_greater_than': {'required': True, 'minimum': 0},
'days_after_creation_greater_than': {'required': True, 'minimum': 0, 'multiple': 1},
}

_attribute_map = {
'days_after_creation_greater_than': {'key': 'daysAfterCreationGreaterThan', 'type': 'int'},
'days_after_creation_greater_than': {'key': 'daysAfterCreationGreaterThan', 'type': 'float'},
}

def __init__(self, **kwargs):
Expand All @@ -511,17 +511,17 @@ class DateAfterModification(Model):

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
:param days_after_modification_greater_than: Required. Value indicating
the age in days after last modification
:type days_after_modification_greater_than: float
"""

_validation = {
'days_after_modification_greater_than': {'required': True, 'minimum': 0},
'days_after_modification_greater_than': {'required': True, 'minimum': 0, 'multiple': 1},
}

_attribute_map = {
'days_after_modification_greater_than': {'key': 'daysAfterModificationGreaterThan', 'type': 'int'},
'days_after_modification_greater_than': {'key': 'daysAfterModificationGreaterThan', 'type': 'float'},
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,20 +488,20 @@ class DateAfterCreation(Model):

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
:param days_after_creation_greater_than: Required. Value indicating the
age in days after creation
:type days_after_creation_greater_than: float
"""

_validation = {
'days_after_creation_greater_than': {'required': True, 'minimum': 0},
'days_after_creation_greater_than': {'required': True, 'minimum': 0, 'multiple': 1},
}

_attribute_map = {
'days_after_creation_greater_than': {'key': 'daysAfterCreationGreaterThan', 'type': 'int'},
'days_after_creation_greater_than': {'key': 'daysAfterCreationGreaterThan', 'type': 'float'},
}

def __init__(self, *, days_after_creation_greater_than: int, **kwargs) -> None:
def __init__(self, *, days_after_creation_greater_than: float, **kwargs) -> None:
super(DateAfterCreation, self).__init__(**kwargs)
self.days_after_creation_greater_than = days_after_creation_greater_than

Expand All @@ -511,20 +511,20 @@ class DateAfterModification(Model):

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
:param days_after_modification_greater_than: Required. Value indicating
the age in days after last modification
:type days_after_modification_greater_than: float
"""

_validation = {
'days_after_modification_greater_than': {'required': True, 'minimum': 0},
'days_after_modification_greater_than': {'required': True, 'minimum': 0, 'multiple': 1},
}

_attribute_map = {
'days_after_modification_greater_than': {'key': 'daysAfterModificationGreaterThan', 'type': 'int'},
'days_after_modification_greater_than': {'key': 'daysAfterModificationGreaterThan', 'type': 'float'},
}

def __init__(self, *, days_after_modification_greater_than: int, **kwargs) -> None:
def __init__(self, *, days_after_modification_greater_than: float, **kwargs) -> None:
super(DateAfterModification, self).__init__(**kwargs)
self.days_after_modification_greater_than = days_after_modification_greater_than

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ class UsagePaged(Paged):
def __init__(self, *args, **kwargs):

super(UsagePaged, self).__init__(*args, **kwargs)
class BlobServicePropertiesPaged(Paged):
"""
A paging container for iterating over a list of :class:`BlobServiceProperties <azure.mgmt.storage.v2019_04_01.models.BlobServiceProperties>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[BlobServiceProperties]'}
}

def __init__(self, *args, **kwargs):

super(BlobServicePropertiesPaged, self).__init__(*args, **kwargs)
class ListContainerItemPaged(Paged):
"""
A paging container for iterating over a list of :class:`ListContainerItem <azure.mgmt.storage.v2019_04_01.models.ListContainerItem>` object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,82 @@ def __init__(self, client, config, serializer, deserializer):

self.config = config

def list(
self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config):
"""List blob services of storage account. It returns a collection of one
object named default.

: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<msrest:optionsforoperations>`.
:return: An iterator like instance of BlobServiceProperties
:rtype:
~azure.mgmt.storage.v2019_04_01.models.BlobServicePropertiesPaged[~azure.mgmt.storage.v2019_04_01.models.BlobServiceProperties]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
def prepare_request(next_link=None):
if not next_link:
# 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)

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)
return request

def internal_paging(next_link=None):
request = prepare_request(next_link)

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
header_dict = None
if raw:
header_dict = {}
deserialized = models.BlobServicePropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict)

return deserialized
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices'}

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
Expand Down