Skip to content

Commit

Permalink
Generated from 13aa2340372f139ed06e305a040a067ad628f972
Browse files Browse the repository at this point in the history
Fix spellcheck and prettier check
  • Loading branch information
SDK Automation committed Mar 31, 2020
1 parent ebaba3c commit bf71a1c
Show file tree
Hide file tree
Showing 8 changed files with 608 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,19 @@ def management_policies(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 object_replication_policies(self):
"""Instance depends on the API version:
* 2019-06-01: :class:`ObjectReplicationPoliciesOperations<azure.mgmt.storage.v2019_06_01.operations.ObjectReplicationPoliciesOperations>`
"""
api_version = self._get_api_version('object_replication_policies')
if api_version == '2019-06-01':
from .v2019_06_01.operations import ObjectReplicationPoliciesOperations 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 operations(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 ObjectReplicationPoliciesOperations
from .operations import EncryptionScopesOperations
from .operations import BlobServicesOperations
from .operations import BlobContainersOperations
Expand Down Expand Up @@ -48,6 +49,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 object_replication_policies: ObjectReplicationPolicies operations
:vartype object_replication_policies: azure.mgmt.storage.v2019_06_01.operations.ObjectReplicationPoliciesOperations
:ivar encryption_scopes: EncryptionScopes operations
:vartype encryption_scopes: azure.mgmt.storage.v2019_06_01.operations.EncryptionScopesOperations
:ivar blob_services: BlobServices operations
Expand Down Expand Up @@ -92,6 +95,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.object_replication_policies = ObjectReplicationPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.encryption_scopes = EncryptionScopesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.blob_services = BlobServicesOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
from ._models_py3 import ManagementPolicySnapShot
from ._models_py3 import MetricSpecification
from ._models_py3 import NetworkRuleSet
from ._models_py3 import ObjectReplicationPolicy
from ._models_py3 import ObjectReplicationPolicyFilter
from ._models_py3 import ObjectReplicationPolicyRule
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import PrivateEndpoint
Expand Down Expand Up @@ -147,6 +150,9 @@
from ._models import ManagementPolicySnapShot
from ._models import MetricSpecification
from ._models import NetworkRuleSet
from ._models import ObjectReplicationPolicy
from ._models import ObjectReplicationPolicyFilter
from ._models import ObjectReplicationPolicyRule
from ._models import Operation
from ._models import OperationDisplay
from ._models import PrivateEndpoint
Expand Down Expand Up @@ -183,6 +189,7 @@
from ._paged_models import EncryptionScopePaged
from ._paged_models import FileShareItemPaged
from ._paged_models import ListContainerItemPaged
from ._paged_models import ObjectReplicationPolicyPaged
from ._paged_models import OperationPaged
from ._paged_models import SkuInformationPaged
from ._paged_models import StorageAccountPaged
Expand Down Expand Up @@ -281,6 +288,9 @@
'ManagementPolicySnapShot',
'MetricSpecification',
'NetworkRuleSet',
'ObjectReplicationPolicy',
'ObjectReplicationPolicyFilter',
'ObjectReplicationPolicyRule',
'Operation',
'OperationDisplay',
'PrivateEndpoint',
Expand Down Expand Up @@ -317,6 +327,7 @@
'SkuInformationPaged',
'StorageAccountPaged',
'UsagePaged',
'ObjectReplicationPolicyPaged',
'EncryptionScopePaged',
'BlobServicePropertiesPaged',
'ListContainerItemPaged',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2191,6 +2191,130 @@ def __init__(self, **kwargs):
self.default_action = kwargs.get('default_action', "Allow")


class ObjectReplicationPolicy(Resource):
"""The replication policy between two storage accounts. Multiple rules can be
defined in one policy.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
: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
:ivar policy_id: A unique id for object replication policy.
:vartype policy_id: str
:ivar enabled_time: Indicates when the policy is enabled on the source
account.
:vartype enabled_time: datetime
:param source_account: Required. Required. Source account name.
:type source_account: str
:param destination_account: Required. Required. Destination account name.
:type destination_account: str
:param rules: The storage account object replication rules.
:type rules:
list[~azure.mgmt.storage.v2019_06_01.models.ObjectReplicationPolicyRule]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'policy_id': {'readonly': True},
'enabled_time': {'readonly': True},
'source_account': {'required': True},
'destination_account': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'policy_id': {'key': 'properties.policyId', 'type': 'str'},
'enabled_time': {'key': 'properties.enabledTime', 'type': 'iso-8601'},
'source_account': {'key': 'properties.sourceAccount', 'type': 'str'},
'destination_account': {'key': 'properties.destinationAccount', 'type': 'str'},
'rules': {'key': 'properties.rules', 'type': '[ObjectReplicationPolicyRule]'},
}

def __init__(self, **kwargs):
super(ObjectReplicationPolicy, self).__init__(**kwargs)
self.policy_id = None
self.enabled_time = None
self.source_account = kwargs.get('source_account', None)
self.destination_account = kwargs.get('destination_account', None)
self.rules = kwargs.get('rules', None)


class ObjectReplicationPolicyFilter(Model):
"""Filters limit replication to a subset of blobs within the storage account.
A logical OR is performed on values in the filter. If multiple filters are
defined, a logical AND is performed on all filters.
:param prefix_match: Optional. Filters the results to replicate only blobs
whose names begin with the specified prefix.
:type prefix_match: list[str]
:param min_creation_time: Blobs created after the time will be replicated
to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'.
Example: 2020-02-19T16:05:00Z
:type min_creation_time: str
"""

_attribute_map = {
'prefix_match': {'key': 'prefixMatch', 'type': '[str]'},
'min_creation_time': {'key': 'minCreationTime', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ObjectReplicationPolicyFilter, self).__init__(**kwargs)
self.prefix_match = kwargs.get('prefix_match', None)
self.min_creation_time = kwargs.get('min_creation_time', None)


class ObjectReplicationPolicyRule(Model):
"""The replication policy rule between two containers.
All required parameters must be populated in order to send to Azure.
:param rule_id: Rule Id is auto-generated for each new rule on destination
account. It is required for put policy on source account.
:type rule_id: str
:param source_container: Required. Required. Source container name.
:type source_container: str
:param destination_container: Required. Required. Destination container
name.
:type destination_container: str
:param filters: Optional. An object that defines the filter set.
:type filters:
~azure.mgmt.storage.v2019_06_01.models.ObjectReplicationPolicyFilter
"""

_validation = {
'source_container': {'required': True},
'destination_container': {'required': True},
}

_attribute_map = {
'rule_id': {'key': 'ruleId', 'type': 'str'},
'source_container': {'key': 'sourceContainer', 'type': 'str'},
'destination_container': {'key': 'destinationContainer', 'type': 'str'},
'filters': {'key': 'filters', 'type': 'ObjectReplicationPolicyFilter'},
}

def __init__(self, **kwargs):
super(ObjectReplicationPolicyRule, self).__init__(**kwargs)
self.rule_id = kwargs.get('rule_id', None)
self.source_container = kwargs.get('source_container', None)
self.destination_container = kwargs.get('destination_container', None)
self.filters = kwargs.get('filters', None)


class Operation(Model):
"""Storage REST API operation definition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2191,6 +2191,130 @@ def __init__(self, *, bypass="AzureServices", virtual_network_rules=None, ip_rul
self.default_action = default_action


class ObjectReplicationPolicy(Resource):
"""The replication policy between two storage accounts. Multiple rules can be
defined in one policy.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
: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
:ivar policy_id: A unique id for object replication policy.
:vartype policy_id: str
:ivar enabled_time: Indicates when the policy is enabled on the source
account.
:vartype enabled_time: datetime
:param source_account: Required. Required. Source account name.
:type source_account: str
:param destination_account: Required. Required. Destination account name.
:type destination_account: str
:param rules: The storage account object replication rules.
:type rules:
list[~azure.mgmt.storage.v2019_06_01.models.ObjectReplicationPolicyRule]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'policy_id': {'readonly': True},
'enabled_time': {'readonly': True},
'source_account': {'required': True},
'destination_account': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'policy_id': {'key': 'properties.policyId', 'type': 'str'},
'enabled_time': {'key': 'properties.enabledTime', 'type': 'iso-8601'},
'source_account': {'key': 'properties.sourceAccount', 'type': 'str'},
'destination_account': {'key': 'properties.destinationAccount', 'type': 'str'},
'rules': {'key': 'properties.rules', 'type': '[ObjectReplicationPolicyRule]'},
}

def __init__(self, *, source_account: str, destination_account: str, rules=None, **kwargs) -> None:
super(ObjectReplicationPolicy, self).__init__(**kwargs)
self.policy_id = None
self.enabled_time = None
self.source_account = source_account
self.destination_account = destination_account
self.rules = rules


class ObjectReplicationPolicyFilter(Model):
"""Filters limit replication to a subset of blobs within the storage account.
A logical OR is performed on values in the filter. If multiple filters are
defined, a logical AND is performed on all filters.
:param prefix_match: Optional. Filters the results to replicate only blobs
whose names begin with the specified prefix.
:type prefix_match: list[str]
:param min_creation_time: Blobs created after the time will be replicated
to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'.
Example: 2020-02-19T16:05:00Z
:type min_creation_time: str
"""

_attribute_map = {
'prefix_match': {'key': 'prefixMatch', 'type': '[str]'},
'min_creation_time': {'key': 'minCreationTime', 'type': 'str'},
}

def __init__(self, *, prefix_match=None, min_creation_time: str=None, **kwargs) -> None:
super(ObjectReplicationPolicyFilter, self).__init__(**kwargs)
self.prefix_match = prefix_match
self.min_creation_time = min_creation_time


class ObjectReplicationPolicyRule(Model):
"""The replication policy rule between two containers.
All required parameters must be populated in order to send to Azure.
:param rule_id: Rule Id is auto-generated for each new rule on destination
account. It is required for put policy on source account.
:type rule_id: str
:param source_container: Required. Required. Source container name.
:type source_container: str
:param destination_container: Required. Required. Destination container
name.
:type destination_container: str
:param filters: Optional. An object that defines the filter set.
:type filters:
~azure.mgmt.storage.v2019_06_01.models.ObjectReplicationPolicyFilter
"""

_validation = {
'source_container': {'required': True},
'destination_container': {'required': True},
}

_attribute_map = {
'rule_id': {'key': 'ruleId', 'type': 'str'},
'source_container': {'key': 'sourceContainer', 'type': 'str'},
'destination_container': {'key': 'destinationContainer', 'type': 'str'},
'filters': {'key': 'filters', 'type': 'ObjectReplicationPolicyFilter'},
}

def __init__(self, *, source_container: str, destination_container: str, rule_id: str=None, filters=None, **kwargs) -> None:
super(ObjectReplicationPolicyRule, self).__init__(**kwargs)
self.rule_id = rule_id
self.source_container = source_container
self.destination_container = destination_container
self.filters = filters


class Operation(Model):
"""Storage REST API operation definition.
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 ObjectReplicationPolicyPaged(Paged):
"""
A paging container for iterating over a list of :class:`ObjectReplicationPolicy <azure.mgmt.storage.v2019_06_01.models.ObjectReplicationPolicy>` object
"""

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

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

super(ObjectReplicationPolicyPaged, 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from ._management_policies_operations import ManagementPoliciesOperations
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
from ._private_link_resources_operations import PrivateLinkResourcesOperations
from ._object_replication_policies_operations import ObjectReplicationPoliciesOperations
from ._encryption_scopes_operations import EncryptionScopesOperations
from ._blob_services_operations import BlobServicesOperations
from ._blob_containers_operations import BlobContainersOperations
Expand All @@ -30,6 +31,7 @@
'ManagementPoliciesOperations',
'PrivateEndpointConnectionsOperations',
'PrivateLinkResourcesOperations',
'ObjectReplicationPoliciesOperations',
'EncryptionScopesOperations',
'BlobServicesOperations',
'BlobContainersOperations',
Expand Down
Loading

0 comments on commit bf71a1c

Please sign in to comment.