Skip to content

Commit 37a57b5

Browse files
author
SDK Automation
committed
Generated from f31b3094d636cd11b16647f38137faef5fff7524
Really fix prettier errors.
1 parent 4ac98b1 commit 37a57b5

File tree

3 files changed

+86
-24
lines changed

3 files changed

+86
-24
lines changed

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/models/_models.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ class BlobContainer(AzureEntityResource):
250250
:vartype type: str
251251
:ivar etag: Resource Etag.
252252
:vartype etag: str
253+
:param default_encryption_scope: Default the container to use specified
254+
encryption scope for all writes.
255+
:type default_encryption_scope: str
256+
:param deny_encryption_scope_override: Block override of encryption scope
257+
from the container default.
258+
:type deny_encryption_scope_override: bool
253259
:param public_access: Specifies whether data in the container may be
254260
accessed publicly and the level of access. Possible values include:
255261
'Container', 'Blob', 'None'
@@ -314,6 +320,8 @@ class BlobContainer(AzureEntityResource):
314320
'name': {'key': 'name', 'type': 'str'},
315321
'type': {'key': 'type', 'type': 'str'},
316322
'etag': {'key': 'etag', 'type': 'str'},
323+
'default_encryption_scope': {'key': 'properties.defaultEncryptionScope', 'type': 'str'},
324+
'deny_encryption_scope_override': {'key': 'properties.denyEncryptionScopeOverride', 'type': 'bool'},
317325
'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'},
318326
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
319327
'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'},
@@ -328,6 +336,8 @@ class BlobContainer(AzureEntityResource):
328336

329337
def __init__(self, **kwargs):
330338
super(BlobContainer, self).__init__(**kwargs)
339+
self.default_encryption_scope = kwargs.get('default_encryption_scope', None)
340+
self.deny_encryption_scope_override = kwargs.get('deny_encryption_scope_override', None)
331341
self.public_access = kwargs.get('public_access', None)
332342
self.last_modified_time = None
333343
self.lease_status = None
@@ -1509,25 +1519,43 @@ def __init__(self, **kwargs):
15091519
class KeyVaultProperties(Model):
15101520
"""Properties of key vault.
15111521
1522+
Variables are only populated by the server, and will be ignored when
1523+
sending a request.
1524+
15121525
:param key_name: The name of KeyVault key.
15131526
:type key_name: str
15141527
:param key_version: The version of KeyVault key.
15151528
:type key_version: str
15161529
:param key_vault_uri: The Uri of KeyVault.
15171530
:type key_vault_uri: str
1531+
:ivar current_versioned_key_identifier: The object identifier of the
1532+
current versioned Key Vault Key in use.
1533+
:vartype current_versioned_key_identifier: str
1534+
:ivar last_key_rotation_timestamp: Timestamp of last rotation of the Key
1535+
Vault Key.
1536+
:vartype last_key_rotation_timestamp: datetime
15181537
"""
15191538

1539+
_validation = {
1540+
'current_versioned_key_identifier': {'readonly': True},
1541+
'last_key_rotation_timestamp': {'readonly': True},
1542+
}
1543+
15201544
_attribute_map = {
15211545
'key_name': {'key': 'keyname', 'type': 'str'},
15221546
'key_version': {'key': 'keyversion', 'type': 'str'},
15231547
'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'},
1548+
'current_versioned_key_identifier': {'key': 'currentVersionedKeyIdentifier', 'type': 'str'},
1549+
'last_key_rotation_timestamp': {'key': 'lastKeyRotationTimestamp', 'type': 'iso-8601'},
15241550
}
15251551

15261552
def __init__(self, **kwargs):
15271553
super(KeyVaultProperties, self).__init__(**kwargs)
15281554
self.key_name = kwargs.get('key_name', None)
15291555
self.key_version = kwargs.get('key_version', None)
15301556
self.key_vault_uri = kwargs.get('key_vault_uri', None)
1557+
self.current_versioned_key_identifier = None
1558+
self.last_key_rotation_timestamp = None
15311559

15321560

15331561
class LeaseContainerRequest(Model):
@@ -1702,6 +1730,12 @@ class ListContainerItem(AzureEntityResource):
17021730
:vartype type: str
17031731
:ivar etag: Resource Etag.
17041732
:vartype etag: str
1733+
:param default_encryption_scope: Default the container to use specified
1734+
encryption scope for all writes.
1735+
:type default_encryption_scope: str
1736+
:param deny_encryption_scope_override: Block override of encryption scope
1737+
from the container default.
1738+
:type deny_encryption_scope_override: bool
17051739
:param public_access: Specifies whether data in the container may be
17061740
accessed publicly and the level of access. Possible values include:
17071741
'Container', 'Blob', 'None'
@@ -1766,6 +1800,8 @@ class ListContainerItem(AzureEntityResource):
17661800
'name': {'key': 'name', 'type': 'str'},
17671801
'type': {'key': 'type', 'type': 'str'},
17681802
'etag': {'key': 'etag', 'type': 'str'},
1803+
'default_encryption_scope': {'key': 'properties.defaultEncryptionScope', 'type': 'str'},
1804+
'deny_encryption_scope_override': {'key': 'properties.denyEncryptionScopeOverride', 'type': 'bool'},
17691805
'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'},
17701806
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
17711807
'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'},
@@ -1780,6 +1816,8 @@ class ListContainerItem(AzureEntityResource):
17801816

17811817
def __init__(self, **kwargs):
17821818
super(ListContainerItem, self).__init__(**kwargs)
1819+
self.default_encryption_scope = kwargs.get('default_encryption_scope', None)
1820+
self.deny_encryption_scope_override = kwargs.get('deny_encryption_scope_override', None)
17831821
self.public_access = kwargs.get('public_access', None)
17841822
self.last_modified_time = None
17851823
self.lease_status = None

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/models/_models_py3.py

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ class BlobContainer(AzureEntityResource):
250250
:vartype type: str
251251
:ivar etag: Resource Etag.
252252
:vartype etag: str
253+
:param default_encryption_scope: Default the container to use specified
254+
encryption scope for all writes.
255+
:type default_encryption_scope: str
256+
:param deny_encryption_scope_override: Block override of encryption scope
257+
from the container default.
258+
:type deny_encryption_scope_override: bool
253259
:param public_access: Specifies whether data in the container may be
254260
accessed publicly and the level of access. Possible values include:
255261
'Container', 'Blob', 'None'
@@ -314,6 +320,8 @@ class BlobContainer(AzureEntityResource):
314320
'name': {'key': 'name', 'type': 'str'},
315321
'type': {'key': 'type', 'type': 'str'},
316322
'etag': {'key': 'etag', 'type': 'str'},
323+
'default_encryption_scope': {'key': 'properties.defaultEncryptionScope', 'type': 'str'},
324+
'deny_encryption_scope_override': {'key': 'properties.denyEncryptionScopeOverride', 'type': 'bool'},
317325
'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'},
318326
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
319327
'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'},
@@ -326,8 +334,10 @@ class BlobContainer(AzureEntityResource):
326334
'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'},
327335
}
328336

329-
def __init__(self, *, public_access=None, metadata=None, **kwargs) -> None:
337+
def __init__(self, *, default_encryption_scope: str=None, deny_encryption_scope_override: bool=None, public_access=None, metadata=None, **kwargs) -> None:
330338
super(BlobContainer, self).__init__(**kwargs)
339+
self.default_encryption_scope = default_encryption_scope
340+
self.deny_encryption_scope_override = deny_encryption_scope_override
331341
self.public_access = public_access
332342
self.last_modified_time = None
333343
self.lease_status = None
@@ -1509,25 +1519,43 @@ def __init__(self, *, ip_address_or_range: str, action="Allow", **kwargs) -> Non
15091519
class KeyVaultProperties(Model):
15101520
"""Properties of key vault.
15111521
1522+
Variables are only populated by the server, and will be ignored when
1523+
sending a request.
1524+
15121525
:param key_name: The name of KeyVault key.
15131526
:type key_name: str
15141527
:param key_version: The version of KeyVault key.
15151528
:type key_version: str
15161529
:param key_vault_uri: The Uri of KeyVault.
15171530
:type key_vault_uri: str
1531+
:ivar current_versioned_key_identifier: The object identifier of the
1532+
current versioned Key Vault Key in use.
1533+
:vartype current_versioned_key_identifier: str
1534+
:ivar last_key_rotation_timestamp: Timestamp of last rotation of the Key
1535+
Vault Key.
1536+
:vartype last_key_rotation_timestamp: datetime
15181537
"""
15191538

1539+
_validation = {
1540+
'current_versioned_key_identifier': {'readonly': True},
1541+
'last_key_rotation_timestamp': {'readonly': True},
1542+
}
1543+
15201544
_attribute_map = {
15211545
'key_name': {'key': 'keyname', 'type': 'str'},
15221546
'key_version': {'key': 'keyversion', 'type': 'str'},
15231547
'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'},
1548+
'current_versioned_key_identifier': {'key': 'currentVersionedKeyIdentifier', 'type': 'str'},
1549+
'last_key_rotation_timestamp': {'key': 'lastKeyRotationTimestamp', 'type': 'iso-8601'},
15241550
}
15251551

15261552
def __init__(self, *, key_name: str=None, key_version: str=None, key_vault_uri: str=None, **kwargs) -> None:
15271553
super(KeyVaultProperties, self).__init__(**kwargs)
15281554
self.key_name = key_name
15291555
self.key_version = key_version
15301556
self.key_vault_uri = key_vault_uri
1557+
self.current_versioned_key_identifier = None
1558+
self.last_key_rotation_timestamp = None
15311559

15321560

15331561
class LeaseContainerRequest(Model):
@@ -1702,6 +1730,12 @@ class ListContainerItem(AzureEntityResource):
17021730
:vartype type: str
17031731
:ivar etag: Resource Etag.
17041732
:vartype etag: str
1733+
:param default_encryption_scope: Default the container to use specified
1734+
encryption scope for all writes.
1735+
:type default_encryption_scope: str
1736+
:param deny_encryption_scope_override: Block override of encryption scope
1737+
from the container default.
1738+
:type deny_encryption_scope_override: bool
17051739
:param public_access: Specifies whether data in the container may be
17061740
accessed publicly and the level of access. Possible values include:
17071741
'Container', 'Blob', 'None'
@@ -1766,6 +1800,8 @@ class ListContainerItem(AzureEntityResource):
17661800
'name': {'key': 'name', 'type': 'str'},
17671801
'type': {'key': 'type', 'type': 'str'},
17681802
'etag': {'key': 'etag', 'type': 'str'},
1803+
'default_encryption_scope': {'key': 'properties.defaultEncryptionScope', 'type': 'str'},
1804+
'deny_encryption_scope_override': {'key': 'properties.denyEncryptionScopeOverride', 'type': 'bool'},
17691805
'public_access': {'key': 'properties.publicAccess', 'type': 'PublicAccess'},
17701806
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
17711807
'lease_status': {'key': 'properties.leaseStatus', 'type': 'str'},
@@ -1778,8 +1814,10 @@ class ListContainerItem(AzureEntityResource):
17781814
'has_immutability_policy': {'key': 'properties.hasImmutabilityPolicy', 'type': 'bool'},
17791815
}
17801816

1781-
def __init__(self, *, public_access=None, metadata=None, **kwargs) -> None:
1817+
def __init__(self, *, default_encryption_scope: str=None, deny_encryption_scope_override: bool=None, public_access=None, metadata=None, **kwargs) -> None:
17821818
super(ListContainerItem, self).__init__(**kwargs)
1819+
self.default_encryption_scope = default_encryption_scope
1820+
self.deny_encryption_scope_override = deny_encryption_scope_override
17831821
self.public_access = public_access
17841822
self.last_modified_time = None
17851823
self.lease_status = None

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_06_01/operations/_blob_containers_operations.py

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def internal_paging(next_link=None):
128128
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers'}
129129

130130
def create(
131-
self, resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config):
131+
self, resource_group_name, account_name, container_name, blob_container, custom_headers=None, raw=False, **operation_config):
132132
"""Creates a new container under the specified account as described by
133133
request body. The container resource includes metadata and properties
134134
for that container. It does not include a list of the blobs contained
@@ -147,14 +147,9 @@ def create(
147147
(-) only. Every dash (-) character must be immediately preceded and
148148
followed by a letter or number.
149149
:type container_name: str
150-
:param public_access: Specifies whether data in the container may be
151-
accessed publicly and the level of access. Possible values include:
152-
'Container', 'Blob', 'None'
153-
:type public_access: str or
154-
~azure.mgmt.storage.v2019_06_01.models.PublicAccess
155-
:param metadata: A name-value pair to associate with the container as
156-
metadata.
157-
:type metadata: dict[str, str]
150+
:param blob_container: Properties of the blob container to create.
151+
:type blob_container:
152+
~azure.mgmt.storage.v2019_06_01.models.BlobContainer
158153
:param dict custom_headers: headers that will be added to the request
159154
:param bool raw: returns the direct response alongside the
160155
deserialized response
@@ -165,8 +160,6 @@ def create(
165160
~msrest.pipeline.ClientRawResponse
166161
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
167162
"""
168-
blob_container = models.BlobContainer(public_access=public_access, metadata=metadata)
169-
170163
# Construct URL
171164
url = self.create.metadata['url']
172165
path_format_arguments = {
@@ -218,7 +211,7 @@ def create(
218211
create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'}
219212

220213
def update(
221-
self, resource_group_name, account_name, container_name, public_access=None, metadata=None, custom_headers=None, raw=False, **operation_config):
214+
self, resource_group_name, account_name, container_name, blob_container, custom_headers=None, raw=False, **operation_config):
222215
"""Updates container properties as specified in request body. Properties
223216
not mentioned in the request will be unchanged. Update fails if the
224217
specified container doesn't already exist. .
@@ -236,14 +229,9 @@ def update(
236229
(-) only. Every dash (-) character must be immediately preceded and
237230
followed by a letter or number.
238231
:type container_name: str
239-
:param public_access: Specifies whether data in the container may be
240-
accessed publicly and the level of access. Possible values include:
241-
'Container', 'Blob', 'None'
242-
:type public_access: str or
243-
~azure.mgmt.storage.v2019_06_01.models.PublicAccess
244-
:param metadata: A name-value pair to associate with the container as
245-
metadata.
246-
:type metadata: dict[str, str]
232+
:param blob_container: Properties to update for the blob container.
233+
:type blob_container:
234+
~azure.mgmt.storage.v2019_06_01.models.BlobContainer
247235
:param dict custom_headers: headers that will be added to the request
248236
:param bool raw: returns the direct response alongside the
249237
deserialized response
@@ -254,8 +242,6 @@ def update(
254242
~msrest.pipeline.ClientRawResponse
255243
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
256244
"""
257-
blob_container = models.BlobContainer(public_access=public_access, metadata=metadata)
258-
259245
# Construct URL
260246
url = self.update.metadata['url']
261247
path_format_arguments = {

0 commit comments

Comments
 (0)