diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/__init__.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/__init__.py index 2de8ce1f91ae..73655a9a9a41 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/__init__.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/__init__.py @@ -60,6 +60,7 @@ from ._models_py3 import NetworkRuleSet from ._models_py3 import OperationDefinition from ._models_py3 import OperationDisplayDefinition + from ._models_py3 import OperationLogSpecificationDefinition from ._models_py3 import OperationMetricSpecificationDefinition from ._models_py3 import OperationServiceSpecificationDefinition from ._models_py3 import OverrideTaskStepProperties @@ -115,7 +116,6 @@ from ._models_py3 import SourceUpdateParameters from ._models_py3 import SourceUploadDefinition from ._models_py3 import Status - from ._models_py3 import StorageAccountProperties from ._models_py3 import SystemData from ._models_py3 import Target from ._models_py3 import Task @@ -192,6 +192,7 @@ from ._models import NetworkRuleSet from ._models import OperationDefinition from ._models import OperationDisplayDefinition + from ._models import OperationLogSpecificationDefinition from ._models import OperationMetricSpecificationDefinition from ._models import OperationServiceSpecificationDefinition from ._models import OverrideTaskStepProperties @@ -247,7 +248,6 @@ from ._models import SourceUpdateParameters from ._models import SourceUploadDefinition from ._models import Status - from ._models import StorageAccountProperties from ._models import SystemData from ._models import Target from ._models import Task @@ -310,6 +310,7 @@ TrustPolicyType, EncryptionStatus, PublicNetworkAccess, + NetworkRuleBypassOptions, PasswordName, RegistryUsageUnit, WebhookStatus, @@ -384,6 +385,7 @@ 'NetworkRuleSet', 'OperationDefinition', 'OperationDisplayDefinition', + 'OperationLogSpecificationDefinition', 'OperationMetricSpecificationDefinition', 'OperationServiceSpecificationDefinition', 'OverrideTaskStepProperties', @@ -439,7 +441,6 @@ 'SourceUpdateParameters', 'SourceUploadDefinition', 'Status', - 'StorageAccountProperties', 'SystemData', 'Target', 'Task', @@ -501,6 +502,7 @@ 'TrustPolicyType', 'EncryptionStatus', 'PublicNetworkAccess', + 'NetworkRuleBypassOptions', 'PasswordName', 'RegistryUsageUnit', 'WebhookStatus', diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_container_registry_management_client_enums.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_container_registry_management_client_enums.py index 268567c5d4c0..29082ea233a7 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_container_registry_management_client_enums.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_container_registry_management_client_enums.py @@ -145,6 +145,12 @@ class PublicNetworkAccess(str, Enum): disabled = "Disabled" +class NetworkRuleBypassOptions(str, Enum): + + azure_services = "AzureServices" + none = "None" + + class PasswordName(str, Enum): password = "password" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models.py index cf1811c5377e..d4e4af8b575c 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models.py @@ -2231,6 +2231,30 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) +class OperationLogSpecificationDefinition(Model): + """The definition of Azure Monitoring log. + + :param name: Log name. + :type name: str + :param display_name: Log display name. + :type display_name: str + :param blob_duration: Log blob duration. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationLogSpecificationDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + class OperationMetricSpecificationDefinition(Model): """The definition of Azure Monitoring metric. @@ -2274,15 +2298,20 @@ class OperationServiceSpecificationDefinition(Model): definition. :type metric_specifications: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationMetricSpecificationDefinition] + :param log_specifications: A list of Azure Monitoring log definitions. + :type log_specifications: + list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationLogSpecificationDefinition] """ _attribute_map = { 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'}, } def __init__(self, **kwargs): super(OperationServiceSpecificationDefinition, self).__init__(**kwargs) self.metric_specifications = kwargs.get('metric_specifications', None) + self.log_specifications = kwargs.get('log_specifications', None) class OverrideTaskStepProperties(Model): @@ -2951,10 +2980,6 @@ class Registry(Resource): :param admin_user_enabled: The value that indicates whether the admin user is enabled. Default value: False . :type admin_user_enabled: bool - :param storage_account: The properties of the storage account for the - container registry. Only applicable to Classic SKU. - :type storage_account: - ~azure.mgmt.containerregistry.v2019_12_01_preview.models.StorageAccountProperties :param network_rule_set: The network rule set for a container registry. :type network_rule_set: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleSet @@ -2979,6 +3004,11 @@ class Registry(Resource): 'Disabled'. Default value: "Enabled" . :type public_network_access: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess + :param network_rule_bypass_options: Whether to allow trusted Azure + services to access a network restricted registry. Possible values include: + 'AzureServices', 'None'. Default value: "AzureServices" . + :type network_rule_bypass_options: str or + ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions """ _validation = { @@ -3010,7 +3040,6 @@ class Registry(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'Status'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, 'policies': {'key': 'properties.policies', 'type': 'Policies'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, @@ -3018,6 +3047,7 @@ class Registry(Resource): 'data_endpoint_host_names': {'key': 'properties.dataEndpointHostNames', 'type': '[str]'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, } def __init__(self, **kwargs): @@ -3029,7 +3059,6 @@ def __init__(self, **kwargs): self.provisioning_state = None self.status = None self.admin_user_enabled = kwargs.get('admin_user_enabled', False) - self.storage_account = kwargs.get('storage_account', None) self.network_rule_set = kwargs.get('network_rule_set', None) self.policies = kwargs.get('policies', None) self.encryption = kwargs.get('encryption', None) @@ -3037,6 +3066,7 @@ def __init__(self, **kwargs): self.data_endpoint_host_names = None self.private_endpoint_connections = None self.public_network_access = kwargs.get('public_network_access', "Enabled") + self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', "AzureServices") class RegistryListCredentialsResult(Model): @@ -3145,13 +3175,13 @@ def __init__(self, **kwargs): class RegistryUpdateParameters(Model): """The parameters for updating a container registry. + :param identity: The identity of the container registry. + :type identity: + ~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties :param tags: The tags for the container registry. :type tags: dict[str, str] :param sku: The SKU of the container registry. :type sku: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Sku - :param identity: The identity of the container registry. - :type identity: - ~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties :param admin_user_enabled: The value that indicates whether the admin user is enabled. :type admin_user_enabled: bool @@ -3172,31 +3202,38 @@ class RegistryUpdateParameters(Model): 'Disabled' :type public_network_access: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess + :param network_rule_bypass_options: Whether to allow trusted Azure + services to access a network restricted registry. Possible values include: + 'AzureServices', 'None'. Default value: "AzureServices" . + :type network_rule_bypass_options: str or + ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions """ _attribute_map = { + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, 'policies': {'key': 'properties.policies', 'type': 'Policies'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, 'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, } def __init__(self, **kwargs): super(RegistryUpdateParameters, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) - self.identity = kwargs.get('identity', None) self.admin_user_enabled = kwargs.get('admin_user_enabled', None) self.network_rule_set = kwargs.get('network_rule_set', None) self.policies = kwargs.get('policies', None) self.encryption = kwargs.get('encryption', None) self.data_endpoint_enabled = kwargs.get('data_endpoint_enabled', None) self.public_network_access = kwargs.get('public_network_access', None) + self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', "AzureServices") class RegistryUsage(Model): @@ -4133,29 +4170,6 @@ def __init__(self, **kwargs): self.timestamp = None -class StorageAccountProperties(Model): - """The properties of a storage account for a container registry. Only - applicable to Classic SKU. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The resource ID of the storage account. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageAccountProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - class SystemData(Model): """Metadata pertaining to creation and last modification of the resource. diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models_py3.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models_py3.py index 81a4b6981ce6..fe91294c8898 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models_py3.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/models/_models_py3.py @@ -2231,6 +2231,30 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non self.description = description +class OperationLogSpecificationDefinition(Model): + """The definition of Azure Monitoring log. + + :param name: Log name. + :type name: str + :param display_name: Log display name. + :type display_name: str + :param blob_duration: Log blob duration. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(OperationLogSpecificationDefinition, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + class OperationMetricSpecificationDefinition(Model): """The definition of Azure Monitoring metric. @@ -2274,15 +2298,20 @@ class OperationServiceSpecificationDefinition(Model): definition. :type metric_specifications: list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationMetricSpecificationDefinition] + :param log_specifications: A list of Azure Monitoring log definitions. + :type log_specifications: + list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationLogSpecificationDefinition] """ _attribute_map = { 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'}, } - def __init__(self, *, metric_specifications=None, **kwargs) -> None: + def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: super(OperationServiceSpecificationDefinition, self).__init__(**kwargs) self.metric_specifications = metric_specifications + self.log_specifications = log_specifications class OverrideTaskStepProperties(Model): @@ -2951,10 +2980,6 @@ class Registry(Resource): :param admin_user_enabled: The value that indicates whether the admin user is enabled. Default value: False . :type admin_user_enabled: bool - :param storage_account: The properties of the storage account for the - container registry. Only applicable to Classic SKU. - :type storage_account: - ~azure.mgmt.containerregistry.v2019_12_01_preview.models.StorageAccountProperties :param network_rule_set: The network rule set for a container registry. :type network_rule_set: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleSet @@ -2979,6 +3004,11 @@ class Registry(Resource): 'Disabled'. Default value: "Enabled" . :type public_network_access: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess + :param network_rule_bypass_options: Whether to allow trusted Azure + services to access a network restricted registry. Possible values include: + 'AzureServices', 'None'. Default value: "AzureServices" . + :type network_rule_bypass_options: str or + ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions """ _validation = { @@ -3010,7 +3040,6 @@ class Registry(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'Status'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, 'policies': {'key': 'properties.policies', 'type': 'Policies'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, @@ -3018,9 +3047,10 @@ class Registry(Resource): 'data_endpoint_host_names': {'key': 'properties.dataEndpointHostNames', 'type': '[str]'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, } - def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_enabled: bool=False, storage_account=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access="Enabled", **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_enabled: bool=False, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access="Enabled", network_rule_bypass_options="AzureServices", **kwargs) -> None: super(Registry, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.identity = identity @@ -3029,7 +3059,6 @@ def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_e self.provisioning_state = None self.status = None self.admin_user_enabled = admin_user_enabled - self.storage_account = storage_account self.network_rule_set = network_rule_set self.policies = policies self.encryption = encryption @@ -3037,6 +3066,7 @@ def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_e self.data_endpoint_host_names = None self.private_endpoint_connections = None self.public_network_access = public_network_access + self.network_rule_bypass_options = network_rule_bypass_options class RegistryListCredentialsResult(Model): @@ -3145,13 +3175,13 @@ def __init__(self, *, name=None, value: str=None, **kwargs) -> None: class RegistryUpdateParameters(Model): """The parameters for updating a container registry. + :param identity: The identity of the container registry. + :type identity: + ~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties :param tags: The tags for the container registry. :type tags: dict[str, str] :param sku: The SKU of the container registry. :type sku: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Sku - :param identity: The identity of the container registry. - :type identity: - ~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties :param admin_user_enabled: The value that indicates whether the admin user is enabled. :type admin_user_enabled: bool @@ -3172,31 +3202,38 @@ class RegistryUpdateParameters(Model): 'Disabled' :type public_network_access: str or ~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess + :param network_rule_bypass_options: Whether to allow trusted Azure + services to access a network restricted registry. Possible values include: + 'AzureServices', 'None'. Default value: "AzureServices" . + :type network_rule_bypass_options: str or + ~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions """ _attribute_map = { + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, 'policies': {'key': 'properties.policies', 'type': 'Policies'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, 'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, } - def __init__(self, *, tags=None, sku=None, identity=None, admin_user_enabled: bool=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access=None, **kwargs) -> None: + def __init__(self, *, identity=None, tags=None, sku=None, admin_user_enabled: bool=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access=None, network_rule_bypass_options="AzureServices", **kwargs) -> None: super(RegistryUpdateParameters, self).__init__(**kwargs) + self.identity = identity self.tags = tags self.sku = sku - self.identity = identity self.admin_user_enabled = admin_user_enabled self.network_rule_set = network_rule_set self.policies = policies self.encryption = encryption self.data_endpoint_enabled = data_endpoint_enabled self.public_network_access = public_network_access + self.network_rule_bypass_options = network_rule_bypass_options class RegistryUsage(Model): @@ -4133,29 +4170,6 @@ def __init__(self, **kwargs) -> None: self.timestamp = None -class StorageAccountProperties(Model): - """The properties of a storage account for a container registry. Only - applicable to Classic SKU. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The resource ID of the storage account. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(StorageAccountProperties, self).__init__(**kwargs) - self.id = id - - class SystemData(Model): """Metadata pertaining to creation and last modification of the resource. diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/__init__.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/__init__.py index abbf1d491aa1..a22f7c3f9e94 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/__init__.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/__init__.py @@ -65,6 +65,7 @@ from ._models_py3 import NetworkRuleSet from ._models_py3 import OperationDefinition from ._models_py3 import OperationDisplayDefinition + from ._models_py3 import OperationLogSpecificationDefinition from ._models_py3 import OperationMetricSpecificationDefinition from ._models_py3 import OperationServiceSpecificationDefinition from ._models_py3 import OverrideTaskStepProperties @@ -122,7 +123,6 @@ from ._models_py3 import SourceUploadDefinition from ._models_py3 import Status from ._models_py3 import StatusDetailProperties - from ._models_py3 import StorageAccountProperties from ._models_py3 import SyncProperties from ._models_py3 import SyncUpdateProperties from ._models_py3 import SystemData @@ -208,6 +208,7 @@ from ._models import NetworkRuleSet from ._models import OperationDefinition from ._models import OperationDisplayDefinition + from ._models import OperationLogSpecificationDefinition from ._models import OperationMetricSpecificationDefinition from ._models import OperationServiceSpecificationDefinition from ._models import OverrideTaskStepProperties @@ -265,7 +266,6 @@ from ._models import SourceUploadDefinition from ._models import Status from ._models import StatusDetailProperties - from ._models import StorageAccountProperties from ._models import SyncProperties from ._models import SyncUpdateProperties from ._models import SystemData @@ -421,6 +421,7 @@ 'NetworkRuleSet', 'OperationDefinition', 'OperationDisplayDefinition', + 'OperationLogSpecificationDefinition', 'OperationMetricSpecificationDefinition', 'OperationServiceSpecificationDefinition', 'OverrideTaskStepProperties', @@ -478,7 +479,6 @@ 'SourceUploadDefinition', 'Status', 'StatusDetailProperties', - 'StorageAccountProperties', 'SyncProperties', 'SyncUpdateProperties', 'SystemData', diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models.py index a051bac77db3..9dff9713fe39 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models.py @@ -2448,6 +2448,30 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) +class OperationLogSpecificationDefinition(Model): + """The definition of Azure Monitoring log. + + :param name: Log name. + :type name: str + :param display_name: Log display name. + :type display_name: str + :param blob_duration: Log blob duration. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationLogSpecificationDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + class OperationMetricSpecificationDefinition(Model): """The definition of Azure Monitoring metric. @@ -2491,15 +2515,20 @@ class OperationServiceSpecificationDefinition(Model): definition. :type metric_specifications: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.OperationMetricSpecificationDefinition] + :param log_specifications: A list of Azure Monitoring log definitions. + :type log_specifications: + list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.OperationLogSpecificationDefinition] """ _attribute_map = { 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'}, } def __init__(self, **kwargs): super(OperationServiceSpecificationDefinition, self).__init__(**kwargs) self.metric_specifications = kwargs.get('metric_specifications', None) + self.log_specifications = kwargs.get('log_specifications', None) class OverrideTaskStepProperties(Model): @@ -3197,10 +3226,6 @@ class Registry(Resource): :param admin_user_enabled: The value that indicates whether the admin user is enabled. Default value: False . :type admin_user_enabled: bool - :param storage_account: The properties of the storage account for the - container registry. Only applicable to Classic SKU. - :type storage_account: - ~azure.mgmt.containerregistry.v2020_11_01_preview.models.StorageAccountProperties :param network_rule_set: The network rule set for a container registry. :type network_rule_set: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.NetworkRuleSet @@ -3235,6 +3260,9 @@ class Registry(Resource): Default value: "Disabled" . :type zone_redundancy: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ZoneRedundancy + :param anonymous_pull_enabled: Enables registry-wide pull from + unauthenticated clients. + :type anonymous_pull_enabled: bool """ _validation = { @@ -3266,7 +3294,6 @@ class Registry(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'Status'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, 'policies': {'key': 'properties.policies', 'type': 'Policies'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, @@ -3276,6 +3303,7 @@ class Registry(Resource): 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, 'zone_redundancy': {'key': 'properties.zoneRedundancy', 'type': 'str'}, + 'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -3287,7 +3315,6 @@ def __init__(self, **kwargs): self.provisioning_state = None self.status = None self.admin_user_enabled = kwargs.get('admin_user_enabled', False) - self.storage_account = kwargs.get('storage_account', None) self.network_rule_set = kwargs.get('network_rule_set', None) self.policies = kwargs.get('policies', None) self.encryption = kwargs.get('encryption', None) @@ -3297,6 +3324,7 @@ def __init__(self, **kwargs): self.public_network_access = kwargs.get('public_network_access', "Enabled") self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', "AzureServices") self.zone_redundancy = kwargs.get('zone_redundancy', "Disabled") + self.anonymous_pull_enabled = kwargs.get('anonymous_pull_enabled', None) class RegistryListCredentialsResult(Model): @@ -3405,13 +3433,13 @@ def __init__(self, **kwargs): class RegistryUpdateParameters(Model): """The parameters for updating a container registry. + :param identity: The identity of the container registry. + :type identity: + ~azure.mgmt.containerregistry.v2020_11_01_preview.models.IdentityProperties :param tags: The tags for the container registry. :type tags: dict[str, str] :param sku: The SKU of the container registry. :type sku: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Sku - :param identity: The identity of the container registry. - :type identity: - ~azure.mgmt.containerregistry.v2020_11_01_preview.models.IdentityProperties :param admin_user_enabled: The value that indicates whether the admin user is enabled. :type admin_user_enabled: bool @@ -3437,12 +3465,15 @@ class RegistryUpdateParameters(Model): 'AzureServices', 'None'. Default value: "AzureServices" . :type network_rule_bypass_options: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.NetworkRuleBypassOptions + :param anonymous_pull_enabled: Enables registry-wide pull from + unauthenticated clients. + :type anonymous_pull_enabled: bool """ _attribute_map = { + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, 'policies': {'key': 'properties.policies', 'type': 'Policies'}, @@ -3450,13 +3481,14 @@ class RegistryUpdateParameters(Model): 'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, + 'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'}, } def __init__(self, **kwargs): super(RegistryUpdateParameters, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) - self.identity = kwargs.get('identity', None) self.admin_user_enabled = kwargs.get('admin_user_enabled', None) self.network_rule_set = kwargs.get('network_rule_set', None) self.policies = kwargs.get('policies', None) @@ -3464,6 +3496,7 @@ def __init__(self, **kwargs): self.data_endpoint_enabled = kwargs.get('data_endpoint_enabled', None) self.public_network_access = kwargs.get('public_network_access', None) self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', "AzureServices") + self.anonymous_pull_enabled = kwargs.get('anonymous_pull_enabled', None) class RegistryUsage(Model): @@ -4451,29 +4484,6 @@ def __init__(self, **kwargs): self.correlation_id = None -class StorageAccountProperties(Model): - """The properties of a storage account for a container registry. Only - applicable to Classic SKU. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The resource ID of the storage account. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(StorageAccountProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - class SyncProperties(Model): """The sync properties of the connected registry with its parent. diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models_py3.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models_py3.py index f46db2d25ec4..d7dbdb6f9fd3 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models_py3.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/models/_models_py3.py @@ -2448,6 +2448,30 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non self.description = description +class OperationLogSpecificationDefinition(Model): + """The definition of Azure Monitoring log. + + :param name: Log name. + :type name: str + :param display_name: Log display name. + :type display_name: str + :param blob_duration: Log blob duration. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(OperationLogSpecificationDefinition, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + class OperationMetricSpecificationDefinition(Model): """The definition of Azure Monitoring metric. @@ -2491,15 +2515,20 @@ class OperationServiceSpecificationDefinition(Model): definition. :type metric_specifications: list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.OperationMetricSpecificationDefinition] + :param log_specifications: A list of Azure Monitoring log definitions. + :type log_specifications: + list[~azure.mgmt.containerregistry.v2020_11_01_preview.models.OperationLogSpecificationDefinition] """ _attribute_map = { 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'}, } - def __init__(self, *, metric_specifications=None, **kwargs) -> None: + def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: super(OperationServiceSpecificationDefinition, self).__init__(**kwargs) self.metric_specifications = metric_specifications + self.log_specifications = log_specifications class OverrideTaskStepProperties(Model): @@ -3197,10 +3226,6 @@ class Registry(Resource): :param admin_user_enabled: The value that indicates whether the admin user is enabled. Default value: False . :type admin_user_enabled: bool - :param storage_account: The properties of the storage account for the - container registry. Only applicable to Classic SKU. - :type storage_account: - ~azure.mgmt.containerregistry.v2020_11_01_preview.models.StorageAccountProperties :param network_rule_set: The network rule set for a container registry. :type network_rule_set: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.NetworkRuleSet @@ -3235,6 +3260,9 @@ class Registry(Resource): Default value: "Disabled" . :type zone_redundancy: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.ZoneRedundancy + :param anonymous_pull_enabled: Enables registry-wide pull from + unauthenticated clients. + :type anonymous_pull_enabled: bool """ _validation = { @@ -3266,7 +3294,6 @@ class Registry(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'Status'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, 'policies': {'key': 'properties.policies', 'type': 'Policies'}, 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, @@ -3276,9 +3303,10 @@ class Registry(Resource): 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, 'zone_redundancy': {'key': 'properties.zoneRedundancy', 'type': 'str'}, + 'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'}, } - def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_enabled: bool=False, storage_account=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access="Enabled", network_rule_bypass_options="AzureServices", zone_redundancy="Disabled", **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_enabled: bool=False, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access="Enabled", network_rule_bypass_options="AzureServices", zone_redundancy="Disabled", anonymous_pull_enabled: bool=None, **kwargs) -> None: super(Registry, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.identity = identity @@ -3287,7 +3315,6 @@ def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_e self.provisioning_state = None self.status = None self.admin_user_enabled = admin_user_enabled - self.storage_account = storage_account self.network_rule_set = network_rule_set self.policies = policies self.encryption = encryption @@ -3297,6 +3324,7 @@ def __init__(self, *, location: str, sku, tags=None, identity=None, admin_user_e self.public_network_access = public_network_access self.network_rule_bypass_options = network_rule_bypass_options self.zone_redundancy = zone_redundancy + self.anonymous_pull_enabled = anonymous_pull_enabled class RegistryListCredentialsResult(Model): @@ -3405,13 +3433,13 @@ def __init__(self, *, name=None, value: str=None, **kwargs) -> None: class RegistryUpdateParameters(Model): """The parameters for updating a container registry. + :param identity: The identity of the container registry. + :type identity: + ~azure.mgmt.containerregistry.v2020_11_01_preview.models.IdentityProperties :param tags: The tags for the container registry. :type tags: dict[str, str] :param sku: The SKU of the container registry. :type sku: ~azure.mgmt.containerregistry.v2020_11_01_preview.models.Sku - :param identity: The identity of the container registry. - :type identity: - ~azure.mgmt.containerregistry.v2020_11_01_preview.models.IdentityProperties :param admin_user_enabled: The value that indicates whether the admin user is enabled. :type admin_user_enabled: bool @@ -3437,12 +3465,15 @@ class RegistryUpdateParameters(Model): 'AzureServices', 'None'. Default value: "AzureServices" . :type network_rule_bypass_options: str or ~azure.mgmt.containerregistry.v2020_11_01_preview.models.NetworkRuleBypassOptions + :param anonymous_pull_enabled: Enables registry-wide pull from + unauthenticated clients. + :type anonymous_pull_enabled: bool """ _attribute_map = { + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, - 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, 'policies': {'key': 'properties.policies', 'type': 'Policies'}, @@ -3450,13 +3481,14 @@ class RegistryUpdateParameters(Model): 'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, + 'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'}, } - def __init__(self, *, tags=None, sku=None, identity=None, admin_user_enabled: bool=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access=None, network_rule_bypass_options="AzureServices", **kwargs) -> None: + def __init__(self, *, identity=None, tags=None, sku=None, admin_user_enabled: bool=None, network_rule_set=None, policies=None, encryption=None, data_endpoint_enabled: bool=None, public_network_access=None, network_rule_bypass_options="AzureServices", anonymous_pull_enabled: bool=None, **kwargs) -> None: super(RegistryUpdateParameters, self).__init__(**kwargs) + self.identity = identity self.tags = tags self.sku = sku - self.identity = identity self.admin_user_enabled = admin_user_enabled self.network_rule_set = network_rule_set self.policies = policies @@ -3464,6 +3496,7 @@ def __init__(self, *, tags=None, sku=None, identity=None, admin_user_enabled: bo self.data_endpoint_enabled = data_endpoint_enabled self.public_network_access = public_network_access self.network_rule_bypass_options = network_rule_bypass_options + self.anonymous_pull_enabled = anonymous_pull_enabled class RegistryUsage(Model): @@ -4451,29 +4484,6 @@ def __init__(self, **kwargs) -> None: self.correlation_id = None -class StorageAccountProperties(Model): - """The properties of a storage account for a container registry. Only - applicable to Classic SKU. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The resource ID of the storage account. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(StorageAccountProperties, self).__init__(**kwargs) - self.id = id - - class SyncProperties(Model): """The sync properties of the connected registry with its parent.