Skip to content

Commit

Permalink
Generated from ec2e4144b42fa2a546ba98a753a4064b9519c651
Browse files Browse the repository at this point in the history
Address CI failures #3.
  • Loading branch information
SDK Automation committed Feb 13, 2020
1 parent 1bb75ee commit e70c2b4
Show file tree
Hide file tree
Showing 9 changed files with 588 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,19 @@ def blob_services(self):
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 encryption_scopes(self):
"""Instance depends on the API version:
* 2019-06-01: :class:`EncryptionScopesOperations<azure.mgmt.storage.v2019_06_01.operations.EncryptionScopesOperations>`
"""
api_version = self._get_api_version('encryption_scopes')
if api_version == '2019-06-01':
from .v2019_06_01.operations import EncryptionScopesOperations 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 file_services(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from .operations import ManagementPoliciesOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import PrivateLinkResourcesOperations
from .operations import EncryptionScopesOperations
from .operations import BlobServicesOperations
from .operations import BlobContainersOperations
from .operations import FileServicesOperations
Expand Down Expand Up @@ -47,6 +48,8 @@ class StorageManagementClient(SDKClient):
:vartype private_endpoint_connections: azure.mgmt.storage.v2019_06_01.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResources operations
:vartype private_link_resources: azure.mgmt.storage.v2019_06_01.operations.PrivateLinkResourcesOperations
:ivar encryption_scopes: EncryptionScopes operations
:vartype encryption_scopes: azure.mgmt.storage.v2019_06_01.operations.EncryptionScopesOperations
:ivar blob_services: BlobServices operations
:vartype blob_services: azure.mgmt.storage.v2019_06_01.operations.BlobServicesOperations
:ivar blob_containers: BlobContainers operations
Expand Down Expand Up @@ -89,6 +92,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.encryption_scopes = EncryptionScopesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.blob_services = BlobServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.blob_containers = BlobContainersOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
from ._models_py3 import DeleteRetentionPolicy
from ._models_py3 import Dimension
from ._models_py3 import Encryption
from ._models_py3 import EncryptionScope
from ._models_py3 import EncryptionScopeKeyVaultProperties
from ._models_py3 import EncryptionService
from ._models_py3 import EncryptionServices
from ._models_py3 import Endpoints
Expand Down Expand Up @@ -112,6 +114,8 @@
from ._models import DeleteRetentionPolicy
from ._models import Dimension
from ._models import Encryption
from ._models import EncryptionScope
from ._models import EncryptionScopeKeyVaultProperties
from ._models import EncryptionService
from ._models import EncryptionServices
from ._models import Endpoints
Expand Down Expand Up @@ -176,6 +180,7 @@
from ._models import UsageName
from ._models import VirtualNetworkRule
from ._paged_models import BlobServicePropertiesPaged
from ._paged_models import EncryptionScopePaged
from ._paged_models import FileShareItemPaged
from ._paged_models import ListContainerItemPaged
from ._paged_models import OperationPaged
Expand Down Expand Up @@ -211,6 +216,8 @@
Permissions,
HttpProtocol,
SignedResource,
EncryptionScopeSource,
EncryptionScopeState,
PublicAccess,
LeaseStatus,
LeaseState,
Expand Down Expand Up @@ -241,6 +248,8 @@
'DeleteRetentionPolicy',
'Dimension',
'Encryption',
'EncryptionScope',
'EncryptionScopeKeyVaultProperties',
'EncryptionService',
'EncryptionServices',
'Endpoints',
Expand Down Expand Up @@ -308,6 +317,7 @@
'SkuInformationPaged',
'StorageAccountPaged',
'UsagePaged',
'EncryptionScopePaged',
'BlobServicePropertiesPaged',
'ListContainerItemPaged',
'FileShareItemPaged',
Expand Down Expand Up @@ -339,6 +349,8 @@
'Permissions',
'HttpProtocol',
'SignedResource',
'EncryptionScopeSource',
'EncryptionScopeState',
'PublicAccess',
'LeaseStatus',
'LeaseState',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,10 @@ class BlobServiceProperties(Resource):
delete.
:type delete_retention_policy:
~azure.mgmt.storage.v2019_06_01.models.DeleteRetentionPolicy
:param automatic_snapshot_policy_enabled: Automatic Snapshot is enabled if
set to true.
:param is_versioning_enabled: Versioning is enabled if set to true.
:type is_versioning_enabled: bool
:param automatic_snapshot_policy_enabled: Deprecated in favor of
isVersioningEnabled property.
:type automatic_snapshot_policy_enabled: bool
:param change_feed: The blob service properties for change feed events.
:type change_feed: ~azure.mgmt.storage.v2019_06_01.models.ChangeFeed
Expand All @@ -494,6 +496,7 @@ class BlobServiceProperties(Resource):
'cors': {'key': 'properties.cors', 'type': 'CorsRules'},
'default_service_version': {'key': 'properties.defaultServiceVersion', 'type': 'str'},
'delete_retention_policy': {'key': 'properties.deleteRetentionPolicy', 'type': 'DeleteRetentionPolicy'},
'is_versioning_enabled': {'key': 'properties.isVersioningEnabled', 'type': 'bool'},
'automatic_snapshot_policy_enabled': {'key': 'properties.automaticSnapshotPolicyEnabled', 'type': 'bool'},
'change_feed': {'key': 'properties.changeFeed', 'type': 'ChangeFeed'},
'restore_policy': {'key': 'properties.restorePolicy', 'type': 'RestorePolicyProperties'},
Expand All @@ -505,6 +508,7 @@ def __init__(self, **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.is_versioning_enabled = kwargs.get('is_versioning_enabled', None)
self.automatic_snapshot_policy_enabled = kwargs.get('automatic_snapshot_policy_enabled', None)
self.change_feed = kwargs.get('change_feed', None)
self.restore_policy = kwargs.get('restore_policy', None)
Expand Down Expand Up @@ -847,6 +851,91 @@ def __init__(self, **kwargs):
self.key_vault_properties = kwargs.get('key_vault_properties', None)


class EncryptionScope(Resource):
"""The Encryption Scope 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
:param source: The provider for the encryption scope. Possible values
(case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible
values include: 'Microsoft.Storage', 'Microsoft.KeyVault'
:type source: str or
~azure.mgmt.storage.v2019_06_01.models.EncryptionScopeSource
:param state: The state of the encryption scope. Possible values
(case-insensitive): Enabled, Disabled. Possible values include:
'Enabled', 'Disabled'
:type state: str or
~azure.mgmt.storage.v2019_06_01.models.EncryptionScopeState
:ivar creation_time: Gets the creation date and time of the encryption
scope in UTC.
:vartype creation_time: datetime
:ivar last_modified_time: Gets the last modification date and time of the
encryption scope in UTC.
:vartype last_modified_time: datetime
:param key_vault_properties: The key vault properties for the encryption
scope. This is a required field if encryption scope 'source' attribute is
set to 'Microsoft.KeyVault'.
:type key_vault_properties:
~azure.mgmt.storage.v2019_06_01.models.EncryptionScopeKeyVaultProperties
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'creation_time': {'readonly': True},
'last_modified_time': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'source': {'key': 'properties.source', 'type': 'str'},
'state': {'key': 'properties.state', 'type': 'str'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'key_vault_properties': {'key': 'properties.keyVaultProperties', 'type': 'EncryptionScopeKeyVaultProperties'},
}

def __init__(self, **kwargs):
super(EncryptionScope, self).__init__(**kwargs)
self.source = kwargs.get('source', None)
self.state = kwargs.get('state', None)
self.creation_time = None
self.last_modified_time = None
self.key_vault_properties = kwargs.get('key_vault_properties', None)


class EncryptionScopeKeyVaultProperties(Model):
"""The key vault properties for the encryption scope. This is a required field
if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
:param key_uri: The object identifier for a key vault key object. When
applied, the encryption scope will use the key referenced by the
identifier to enable customer-managed key support on this encryption
scope.
:type key_uri: str
"""

_attribute_map = {
'key_uri': {'key': 'keyUri', 'type': 'str'},
}

def __init__(self, **kwargs):
super(EncryptionScopeKeyVaultProperties, self).__init__(**kwargs)
self.key_uri = kwargs.get('key_uri', None)


class EncryptionService(Model):
"""A service that allows server-side encryption to be used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,10 @@ class BlobServiceProperties(Resource):
delete.
:type delete_retention_policy:
~azure.mgmt.storage.v2019_06_01.models.DeleteRetentionPolicy
:param automatic_snapshot_policy_enabled: Automatic Snapshot is enabled if
set to true.
:param is_versioning_enabled: Versioning is enabled if set to true.
:type is_versioning_enabled: bool
:param automatic_snapshot_policy_enabled: Deprecated in favor of
isVersioningEnabled property.
:type automatic_snapshot_policy_enabled: bool
:param change_feed: The blob service properties for change feed events.
:type change_feed: ~azure.mgmt.storage.v2019_06_01.models.ChangeFeed
Expand All @@ -494,17 +496,19 @@ class BlobServiceProperties(Resource):
'cors': {'key': 'properties.cors', 'type': 'CorsRules'},
'default_service_version': {'key': 'properties.defaultServiceVersion', 'type': 'str'},
'delete_retention_policy': {'key': 'properties.deleteRetentionPolicy', 'type': 'DeleteRetentionPolicy'},
'is_versioning_enabled': {'key': 'properties.isVersioningEnabled', 'type': 'bool'},
'automatic_snapshot_policy_enabled': {'key': 'properties.automaticSnapshotPolicyEnabled', 'type': 'bool'},
'change_feed': {'key': 'properties.changeFeed', 'type': 'ChangeFeed'},
'restore_policy': {'key': 'properties.restorePolicy', 'type': 'RestorePolicyProperties'},
'sku': {'key': 'sku', 'type': 'Sku'},
}

def __init__(self, *, cors=None, default_service_version: str=None, delete_retention_policy=None, automatic_snapshot_policy_enabled: bool=None, change_feed=None, restore_policy=None, **kwargs) -> None:
def __init__(self, *, cors=None, default_service_version: str=None, delete_retention_policy=None, is_versioning_enabled: bool=None, automatic_snapshot_policy_enabled: bool=None, change_feed=None, restore_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
self.is_versioning_enabled = is_versioning_enabled
self.automatic_snapshot_policy_enabled = automatic_snapshot_policy_enabled
self.change_feed = change_feed
self.restore_policy = restore_policy
Expand Down Expand Up @@ -847,6 +851,91 @@ def __init__(self, *, services=None, key_source="Microsoft.Storage", key_vault_p
self.key_vault_properties = key_vault_properties


class EncryptionScope(Resource):
"""The Encryption Scope 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
:param source: The provider for the encryption scope. Possible values
(case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Possible
values include: 'Microsoft.Storage', 'Microsoft.KeyVault'
:type source: str or
~azure.mgmt.storage.v2019_06_01.models.EncryptionScopeSource
:param state: The state of the encryption scope. Possible values
(case-insensitive): Enabled, Disabled. Possible values include:
'Enabled', 'Disabled'
:type state: str or
~azure.mgmt.storage.v2019_06_01.models.EncryptionScopeState
:ivar creation_time: Gets the creation date and time of the encryption
scope in UTC.
:vartype creation_time: datetime
:ivar last_modified_time: Gets the last modification date and time of the
encryption scope in UTC.
:vartype last_modified_time: datetime
:param key_vault_properties: The key vault properties for the encryption
scope. This is a required field if encryption scope 'source' attribute is
set to 'Microsoft.KeyVault'.
:type key_vault_properties:
~azure.mgmt.storage.v2019_06_01.models.EncryptionScopeKeyVaultProperties
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'creation_time': {'readonly': True},
'last_modified_time': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'source': {'key': 'properties.source', 'type': 'str'},
'state': {'key': 'properties.state', 'type': 'str'},
'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'},
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'key_vault_properties': {'key': 'properties.keyVaultProperties', 'type': 'EncryptionScopeKeyVaultProperties'},
}

def __init__(self, *, source=None, state=None, key_vault_properties=None, **kwargs) -> None:
super(EncryptionScope, self).__init__(**kwargs)
self.source = source
self.state = state
self.creation_time = None
self.last_modified_time = None
self.key_vault_properties = key_vault_properties


class EncryptionScopeKeyVaultProperties(Model):
"""The key vault properties for the encryption scope. This is a required field
if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
:param key_uri: The object identifier for a key vault key object. When
applied, the encryption scope will use the key referenced by the
identifier to enable customer-managed key support on this encryption
scope.
:type key_uri: str
"""

_attribute_map = {
'key_uri': {'key': 'keyUri', 'type': 'str'},
}

def __init__(self, *, key_uri: str=None, **kwargs) -> None:
super(EncryptionScopeKeyVaultProperties, self).__init__(**kwargs)
self.key_uri = key_uri


class EncryptionService(Model):
"""A service that allows server-side encryption to be used.
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 EncryptionScopePaged(Paged):
"""
A paging container for iterating over a list of :class:`EncryptionScope <azure.mgmt.storage.v2019_06_01.models.EncryptionScope>` object
"""

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

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

super(EncryptionScopePaged, self).__init__(*args, **kwargs)
class BlobServicePropertiesPaged(Paged):
"""
A paging container for iterating over a list of :class:`BlobServiceProperties <azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties>` object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,18 @@ class SignedResource(str, Enum):
s = "s"


class EncryptionScopeSource(str, Enum):

microsoft_storage = "Microsoft.Storage"
microsoft_key_vault = "Microsoft.KeyVault"


class EncryptionScopeState(str, Enum):

enabled = "Enabled"
disabled = "Disabled"


class PublicAccess(str, Enum):

container = "Container"
Expand Down
Loading

0 comments on commit e70c2b4

Please sign in to comment.