diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py index 3fbd85a74e49..146d80f519d1 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py @@ -129,7 +129,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -176,7 +176,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -294,7 +294,7 @@ def delete( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -353,7 +353,7 @@ def update( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -421,7 +421,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -554,7 +554,7 @@ def list_credentials( url = self.list_credentials.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -627,7 +627,7 @@ def regenerate_credential( url = self.regenerate_credential.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/__init__.py index 964267287ad9..ddf4a46dfcc1 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/__init__.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/__init__.py @@ -22,6 +22,8 @@ from .sku_py3 import Sku from .status_py3 import Status from .storage_account_properties_py3 import StorageAccountProperties + from .virtual_network_rule_py3 import VirtualNetworkRule + from .network_rule_set_py3 import NetworkRuleSet from .registry_py3 import Registry from .registry_update_parameters_py3 import RegistryUpdateParameters from .registry_password_py3 import RegistryPassword @@ -61,6 +63,8 @@ from .sku import Sku from .status import Status from .storage_account_properties import StorageAccountProperties + from .virtual_network_rule import VirtualNetworkRule + from .network_rule_set import NetworkRuleSet from .registry import Registry from .registry_update_parameters import RegistryUpdateParameters from .registry_password import RegistryPassword @@ -97,6 +101,7 @@ SkuName, SkuTier, ProvisioningState, + DefaultAction, PasswordName, RegistryUsageUnit, PolicyStatus, @@ -118,6 +123,8 @@ 'Sku', 'Status', 'StorageAccountProperties', + 'VirtualNetworkRule', + 'NetworkRuleSet', 'Registry', 'RegistryUpdateParameters', 'RegistryPassword', @@ -153,6 +160,7 @@ 'SkuName', 'SkuTier', 'ProvisioningState', + 'DefaultAction', 'PasswordName', 'RegistryUsageUnit', 'PolicyStatus', diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/container_registry_management_client_enums.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/container_registry_management_client_enums.py index cb15336b81f1..263fe2f1145f 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/container_registry_management_client_enums.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/container_registry_management_client_enums.py @@ -44,6 +44,12 @@ class ProvisioningState(str, Enum): canceled = "Canceled" +class DefaultAction(str, Enum): + + allow = "Allow" + deny = "Deny" + + class PasswordName(str, Enum): password = "password" diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/network_rule_set.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/network_rule_set.py new file mode 100644 index 000000000000..7d191ea24a03 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/network_rule_set.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """The network rule set for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param default_action: Required. The default action of allow or deny when + no other rules match. Possible values include: 'Allow', 'Deny'. Default + value: "Allow" . + :type default_action: str or + ~azure.mgmt.containerregistry.v2017_10_01.models.DefaultAction + :param virtual_network_rules: The virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.containerregistry.v2017_10_01.models.VirtualNetworkRule] + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + } + + def __init__(self, **kwargs): + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = kwargs.get('default_action', "Allow") + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/network_rule_set_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/network_rule_set_py3.py new file mode 100644 index 000000000000..2f1a3255f784 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/network_rule_set_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """The network rule set for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param default_action: Required. The default action of allow or deny when + no other rules match. Possible values include: 'Allow', 'Deny'. Default + value: "Allow" . + :type default_action: str or + ~azure.mgmt.containerregistry.v2017_10_01.models.DefaultAction + :param virtual_network_rules: The virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.containerregistry.v2017_10_01.models.VirtualNetworkRule] + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + } + + def __init__(self, *, default_action="Allow", virtual_network_rules=None, **kwargs) -> None: + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = default_action + self.virtual_network_rules = virtual_network_rules diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry.py index 64d644e1e1be..665a6f3adf3c 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry.py @@ -54,6 +54,9 @@ class Registry(Resource): container registry. Only applicable to Classic SKU. :type storage_account: ~azure.mgmt.containerregistry.v2017_10_01.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2017_10_01.models.NetworkRuleSet """ _validation = { @@ -81,6 +84,7 @@ class Registry(Resource): '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'}, } def __init__(self, **kwargs): @@ -92,3 +96,4 @@ def __init__(self, **kwargs): 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) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_py3.py index 0ab8610f20b5..f75dd233428a 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_py3.py @@ -54,6 +54,9 @@ class Registry(Resource): container registry. Only applicable to Classic SKU. :type storage_account: ~azure.mgmt.containerregistry.v2017_10_01.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2017_10_01.models.NetworkRuleSet """ _validation = { @@ -81,9 +84,10 @@ class Registry(Resource): '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'}, } - def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=False, storage_account=None, **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=False, storage_account=None, network_rule_set=None, **kwargs) -> None: super(Registry, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.login_server = None @@ -92,3 +96,4 @@ def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=Fa self.status = None self.admin_user_enabled = admin_user_enabled self.storage_account = storage_account + self.network_rule_set = network_rule_set diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters.py index 0a39b1291570..11317a0df58b 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters.py @@ -28,6 +28,9 @@ class RegistryUpdateParameters(Model): registry. :type storage_account: ~azure.mgmt.containerregistry.v2017_10_01.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2017_10_01.models.NetworkRuleSet """ _attribute_map = { @@ -35,6 +38,7 @@ class RegistryUpdateParameters(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, } def __init__(self, **kwargs): @@ -43,3 +47,4 @@ def __init__(self, **kwargs): self.sku = kwargs.get('sku', None) self.admin_user_enabled = kwargs.get('admin_user_enabled', None) self.storage_account = kwargs.get('storage_account', None) + self.network_rule_set = kwargs.get('network_rule_set', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters_py3.py index 0639f0c8f4c6..92f3d34bb8c9 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters_py3.py @@ -28,6 +28,9 @@ class RegistryUpdateParameters(Model): registry. :type storage_account: ~azure.mgmt.containerregistry.v2017_10_01.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2017_10_01.models.NetworkRuleSet """ _attribute_map = { @@ -35,11 +38,13 @@ class RegistryUpdateParameters(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, } - def __init__(self, *, tags=None, sku=None, admin_user_enabled: bool=None, storage_account=None, **kwargs) -> None: + def __init__(self, *, tags=None, sku=None, admin_user_enabled: bool=None, storage_account=None, network_rule_set=None, **kwargs) -> None: super(RegistryUpdateParameters, self).__init__(**kwargs) self.tags = tags self.sku = sku self.admin_user_enabled = admin_user_enabled self.storage_account = storage_account + self.network_rule_set = network_rule_set diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/virtual_network_rule.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/virtual_network_rule.py new file mode 100644 index 000000000000..a22dea97ed0b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/virtual_network_rule.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """The virtual network rule for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of a subnet, for example: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/virtual_network_rule_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..476e8cf718ed --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/virtual_network_rule_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """The virtual network rule for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of a subnet, for example: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py index 9221a98c7052..efb8cf96cb78 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py @@ -46,7 +46,7 @@ def _import_image_initial( url = self.import_image.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -219,7 +219,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -266,7 +266,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -370,7 +370,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -450,7 +450,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -572,7 +572,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -705,7 +705,7 @@ def list_credentials( url = self.list_credentials.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -778,7 +778,7 @@ def regenerate_credential( url = self.regenerate_credential.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -846,7 +846,7 @@ def list_usages( url = self.list_usages.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -910,7 +910,7 @@ def list_policies( url = self.list_policies.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -959,7 +959,7 @@ def _update_policies_initial( url = self.update_policies.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py index 2df735992f62..9b06b310ac36 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py @@ -64,7 +64,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -114,7 +114,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -226,7 +226,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -312,7 +312,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -439,7 +439,7 @@ def internal_paging(next_link=None, raw=False): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py index b5f3f1e35f23..8d315567e16d 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py @@ -64,7 +64,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -112,7 +112,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -222,7 +222,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -306,7 +306,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -434,7 +434,7 @@ def internal_paging(next_link=None, raw=False): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -504,7 +504,7 @@ def ping( url = self.ping.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -572,7 +572,7 @@ def get_callback_config( url = self.get_callback_config.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -641,7 +641,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_events.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/__init__.py index adec0c249a71..ad51020aedc1 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/__init__.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/__init__.py @@ -22,6 +22,8 @@ from .sku_py3 import Sku from .status_py3 import Status from .storage_account_properties_py3 import StorageAccountProperties + from .virtual_network_rule_py3 import VirtualNetworkRule + from .network_rule_set_py3 import NetworkRuleSet from .registry_py3 import Registry from .registry_update_parameters_py3 import RegistryUpdateParameters from .registry_password_py3 import RegistryPassword @@ -88,6 +90,8 @@ from .sku import Sku from .status import Status from .storage_account_properties import StorageAccountProperties + from .virtual_network_rule import VirtualNetworkRule + from .network_rule_set import NetworkRuleSet from .registry import Registry from .registry_update_parameters import RegistryUpdateParameters from .registry_password import RegistryPassword @@ -155,6 +159,7 @@ SkuName, SkuTier, ProvisioningState, + DefaultAction, PasswordName, RegistryUsageUnit, PolicyStatus, @@ -184,6 +189,8 @@ 'Sku', 'Status', 'StorageAccountProperties', + 'VirtualNetworkRule', + 'NetworkRuleSet', 'Registry', 'RegistryUpdateParameters', 'RegistryPassword', @@ -250,6 +257,7 @@ 'SkuName', 'SkuTier', 'ProvisioningState', + 'DefaultAction', 'PasswordName', 'RegistryUsageUnit', 'PolicyStatus', diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/container_registry_management_client_enums.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/container_registry_management_client_enums.py index 7e8a358ecd2c..fed1d2e8a695 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/container_registry_management_client_enums.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/container_registry_management_client_enums.py @@ -44,6 +44,12 @@ class ProvisioningState(str, Enum): canceled = "Canceled" +class DefaultAction(str, Enum): + + allow = "Allow" + deny = "Deny" + + class PasswordName(str, Enum): password = "password" diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/network_rule_set.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/network_rule_set.py new file mode 100644 index 000000000000..b847e1ad8eb3 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/network_rule_set.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """The network rule set for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param default_action: Required. The default action of allow or deny when + no other rules match. Possible values include: 'Allow', 'Deny'. Default + value: "Allow" . + :type default_action: str or + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.DefaultAction + :param virtual_network_rules: The virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.containerregistry.v2018_02_01_preview.models.VirtualNetworkRule] + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + } + + def __init__(self, **kwargs): + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = kwargs.get('default_action', "Allow") + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/network_rule_set_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/network_rule_set_py3.py new file mode 100644 index 000000000000..90b4ae797fe7 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/network_rule_set_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """The network rule set for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param default_action: Required. The default action of allow or deny when + no other rules match. Possible values include: 'Allow', 'Deny'. Default + value: "Allow" . + :type default_action: str or + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.DefaultAction + :param virtual_network_rules: The virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.containerregistry.v2018_02_01_preview.models.VirtualNetworkRule] + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + } + + def __init__(self, *, default_action="Allow", virtual_network_rules=None, **kwargs) -> None: + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = default_action + self.virtual_network_rules = virtual_network_rules diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry.py index 239c1c7d9a2b..28b42cf2d1bb 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry.py @@ -55,6 +55,9 @@ class Registry(Resource): container registry. Only applicable to Classic SKU. :type storage_account: ~azure.mgmt.containerregistry.v2018_02_01_preview.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.NetworkRuleSet """ _validation = { @@ -82,6 +85,7 @@ class Registry(Resource): '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'}, } def __init__(self, **kwargs): @@ -93,3 +97,4 @@ def __init__(self, **kwargs): 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) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_py3.py index 751889cd8cac..c408d04117d6 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_py3.py @@ -55,6 +55,9 @@ class Registry(Resource): container registry. Only applicable to Classic SKU. :type storage_account: ~azure.mgmt.containerregistry.v2018_02_01_preview.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.NetworkRuleSet """ _validation = { @@ -82,9 +85,10 @@ class Registry(Resource): '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'}, } - def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=False, storage_account=None, **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=False, storage_account=None, network_rule_set=None, **kwargs) -> None: super(Registry, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.login_server = None @@ -93,3 +97,4 @@ def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=Fa self.status = None self.admin_user_enabled = admin_user_enabled self.storage_account = storage_account + self.network_rule_set = network_rule_set diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_update_parameters.py index c71ae281d078..b70002cc5050 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_update_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_update_parameters.py @@ -28,6 +28,9 @@ class RegistryUpdateParameters(Model): registry. :type storage_account: ~azure.mgmt.containerregistry.v2018_02_01_preview.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.NetworkRuleSet """ _attribute_map = { @@ -35,6 +38,7 @@ class RegistryUpdateParameters(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, } def __init__(self, **kwargs): @@ -43,3 +47,4 @@ def __init__(self, **kwargs): self.sku = kwargs.get('sku', None) self.admin_user_enabled = kwargs.get('admin_user_enabled', None) self.storage_account = kwargs.get('storage_account', None) + self.network_rule_set = kwargs.get('network_rule_set', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_update_parameters_py3.py index e61030896b9c..0220150bff61 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_update_parameters_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/registry_update_parameters_py3.py @@ -28,6 +28,9 @@ class RegistryUpdateParameters(Model): registry. :type storage_account: ~azure.mgmt.containerregistry.v2018_02_01_preview.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.NetworkRuleSet """ _attribute_map = { @@ -35,11 +38,13 @@ class RegistryUpdateParameters(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, } - def __init__(self, *, tags=None, sku=None, admin_user_enabled: bool=None, storage_account=None, **kwargs) -> None: + def __init__(self, *, tags=None, sku=None, admin_user_enabled: bool=None, storage_account=None, network_rule_set=None, **kwargs) -> None: super(RegistryUpdateParameters, self).__init__(**kwargs) self.tags = tags self.sku = sku self.admin_user_enabled = admin_user_enabled self.storage_account = storage_account + self.network_rule_set = network_rule_set diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/virtual_network_rule.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/virtual_network_rule.py new file mode 100644 index 000000000000..a22dea97ed0b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/virtual_network_rule.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """The virtual network rule for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of a subnet, for example: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/virtual_network_rule_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..476e8cf718ed --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/virtual_network_rule_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """The virtual network rule for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of a subnet, for example: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py index 2c848bd0dcd6..2b25edd7f940 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/registries_operations.py @@ -46,7 +46,7 @@ def _import_image_initial( url = self.import_image.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -224,7 +224,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -273,7 +273,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -379,7 +379,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -461,7 +461,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -585,7 +585,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -722,7 +722,7 @@ def list_credentials( url = self.list_credentials.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -797,7 +797,7 @@ def regenerate_credential( url = self.regenerate_credential.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -867,7 +867,7 @@ def list_usages( url = self.list_usages.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -933,7 +933,7 @@ def list_policies( url = self.list_policies.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -984,7 +984,7 @@ def _update_policies_initial( url = self.update_policies.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/replications_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/replications_operations.py index 5dee662e59d2..504583419b90 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/replications_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/replications_operations.py @@ -65,7 +65,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -115,7 +115,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -227,7 +227,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -313,7 +313,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -440,7 +440,7 @@ def internal_paging(next_link=None, raw=False): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/webhooks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/webhooks_operations.py index 6ff7bf1352c4..836d297d8df5 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/webhooks_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/operations/webhooks_operations.py @@ -65,7 +65,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -113,7 +113,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -223,7 +223,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -307,7 +307,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -435,7 +435,7 @@ def internal_paging(next_link=None, raw=False): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -506,7 +506,7 @@ def ping( url = self.ping.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -574,7 +574,7 @@ def get_callback_config( url = self.get_callback_config.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -643,7 +643,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_events.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/__init__.py index 6156c3a5cadb..b79568b7a688 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/__init__.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/__init__.py @@ -22,6 +22,8 @@ from .sku_py3 import Sku from .status_py3 import Status from .storage_account_properties_py3 import StorageAccountProperties + from .virtual_network_rule_py3 import VirtualNetworkRule + from .network_rule_set_py3 import NetworkRuleSet from .registry_py3 import Registry from .registry_update_parameters_py3 import RegistryUpdateParameters from .registry_password_py3 import RegistryPassword @@ -101,6 +103,8 @@ from .sku import Sku from .status import Status from .storage_account_properties import StorageAccountProperties + from .virtual_network_rule import VirtualNetworkRule + from .network_rule_set import NetworkRuleSet from .registry import Registry from .registry_update_parameters import RegistryUpdateParameters from .registry_password import RegistryPassword @@ -179,6 +183,7 @@ SkuName, SkuTier, ProvisioningState, + DefaultAction, PasswordName, RegistryUsageUnit, PolicyStatus, @@ -212,6 +217,8 @@ 'Sku', 'Status', 'StorageAccountProperties', + 'VirtualNetworkRule', + 'NetworkRuleSet', 'Registry', 'RegistryUpdateParameters', 'RegistryPassword', @@ -289,6 +296,7 @@ 'SkuName', 'SkuTier', 'ProvisioningState', + 'DefaultAction', 'PasswordName', 'RegistryUsageUnit', 'PolicyStatus', diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/container_registry_management_client_enums.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/container_registry_management_client_enums.py index ae0685705827..1de046066b30 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/container_registry_management_client_enums.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/container_registry_management_client_enums.py @@ -44,6 +44,12 @@ class ProvisioningState(str, Enum): canceled = "Canceled" +class DefaultAction(str, Enum): + + allow = "Allow" + deny = "Deny" + + class PasswordName(str, Enum): password = "password" diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/network_rule_set.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/network_rule_set.py new file mode 100644 index 000000000000..6985b4ebe32e --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/network_rule_set.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """The network rule set for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param default_action: Required. The default action of allow or deny when + no other rules match. Possible values include: 'Allow', 'Deny'. Default + value: "Allow" . + :type default_action: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.DefaultAction + :param virtual_network_rules: The virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.containerregistry.v2018_09_01.models.VirtualNetworkRule] + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + } + + def __init__(self, **kwargs): + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = kwargs.get('default_action', "Allow") + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/network_rule_set_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/network_rule_set_py3.py new file mode 100644 index 000000000000..6f8c0eee6dd8 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/network_rule_set_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class NetworkRuleSet(Model): + """The network rule set for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param default_action: Required. The default action of allow or deny when + no other rules match. Possible values include: 'Allow', 'Deny'. Default + value: "Allow" . + :type default_action: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.DefaultAction + :param virtual_network_rules: The virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.containerregistry.v2018_09_01.models.VirtualNetworkRule] + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + } + + def __init__(self, *, default_action="Allow", virtual_network_rules=None, **kwargs) -> None: + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = default_action + self.virtual_network_rules = virtual_network_rules diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry.py index 620129cafebf..a4e3349c8f81 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry.py @@ -54,6 +54,9 @@ class Registry(Resource): container registry. Only applicable to Classic SKU. :type storage_account: ~azure.mgmt.containerregistry.v2018_09_01.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2018_09_01.models.NetworkRuleSet """ _validation = { @@ -81,6 +84,7 @@ class Registry(Resource): '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'}, } def __init__(self, **kwargs): @@ -92,3 +96,4 @@ def __init__(self, **kwargs): 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) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_py3.py index 049a2b708dcb..f5d7c73be877 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_py3.py @@ -54,6 +54,9 @@ class Registry(Resource): container registry. Only applicable to Classic SKU. :type storage_account: ~azure.mgmt.containerregistry.v2018_09_01.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2018_09_01.models.NetworkRuleSet """ _validation = { @@ -81,9 +84,10 @@ class Registry(Resource): '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'}, } - def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=False, storage_account=None, **kwargs) -> None: + def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=False, storage_account=None, network_rule_set=None, **kwargs) -> None: super(Registry, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.login_server = None @@ -92,3 +96,4 @@ def __init__(self, *, location: str, sku, tags=None, admin_user_enabled: bool=Fa self.status = None self.admin_user_enabled = admin_user_enabled self.storage_account = storage_account + self.network_rule_set = network_rule_set diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters.py index fa3786ebd673..8d773bfe9c9e 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters.py @@ -28,6 +28,9 @@ class RegistryUpdateParameters(Model): registry. :type storage_account: ~azure.mgmt.containerregistry.v2018_09_01.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2018_09_01.models.NetworkRuleSet """ _attribute_map = { @@ -35,6 +38,7 @@ class RegistryUpdateParameters(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, } def __init__(self, **kwargs): @@ -43,3 +47,4 @@ def __init__(self, **kwargs): self.sku = kwargs.get('sku', None) self.admin_user_enabled = kwargs.get('admin_user_enabled', None) self.storage_account = kwargs.get('storage_account', None) + self.network_rule_set = kwargs.get('network_rule_set', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters_py3.py index c487af741eff..7b1efde6d76a 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/registry_update_parameters_py3.py @@ -28,6 +28,9 @@ class RegistryUpdateParameters(Model): registry. :type storage_account: ~azure.mgmt.containerregistry.v2018_09_01.models.StorageAccountProperties + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: + ~azure.mgmt.containerregistry.v2018_09_01.models.NetworkRuleSet """ _attribute_map = { @@ -35,11 +38,13 @@ class RegistryUpdateParameters(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, } - def __init__(self, *, tags=None, sku=None, admin_user_enabled: bool=None, storage_account=None, **kwargs) -> None: + def __init__(self, *, tags=None, sku=None, admin_user_enabled: bool=None, storage_account=None, network_rule_set=None, **kwargs) -> None: super(RegistryUpdateParameters, self).__init__(**kwargs) self.tags = tags self.sku = sku self.admin_user_enabled = admin_user_enabled self.storage_account = storage_account + self.network_rule_set = network_rule_set diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task.py index 98b48005acb9..da65f5e3e5c4 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task.py @@ -14,7 +14,7 @@ class Task(Resource): """The task that has the ARM resource and task properties. - The task will have all information to schedule a run against it. + The task will have all information to schedule a run against it. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_py3.py index 55d58aae9356..f2b6b150bb6d 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/task_py3.py @@ -14,7 +14,7 @@ class Task(Resource): """The task that has the ARM resource and task properties. - The task will have all information to schedule a run against it. + The task will have all information to schedule a run against it. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/virtual_network_rule.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/virtual_network_rule.py new file mode 100644 index 000000000000..a22dea97ed0b --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/virtual_network_rule.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """The virtual network rule for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of a subnet, for example: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/virtual_network_rule_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/virtual_network_rule_py3.py new file mode 100644 index 000000000000..476e8cf718ed --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/virtual_network_rule_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkRule(Model): + """The virtual network rule for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Resource ID of a subnet, for example: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py index 3464d2ce5608..3eb4e97c317f 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py @@ -46,7 +46,7 @@ def _import_image_initial( url = self.import_image.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -223,7 +223,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -272,7 +272,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -378,7 +378,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -460,7 +460,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -584,7 +584,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -721,7 +721,7 @@ def list_credentials( url = self.list_credentials.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -796,7 +796,7 @@ def regenerate_credential( url = self.regenerate_credential.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -866,7 +866,7 @@ def list_usages( url = self.list_usages.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -932,7 +932,7 @@ def list_policies( url = self.list_policies.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -983,7 +983,7 @@ def _update_policies_initial( url = self.update_policies.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -1093,7 +1093,7 @@ def _schedule_run_initial( url = self.schedule_run.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -1215,7 +1215,7 @@ def get_build_source_upload_url( url = self.get_build_source_upload_url.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/replications_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/replications_operations.py index 2e77093a9b34..6502b1c4b49d 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/replications_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/replications_operations.py @@ -64,7 +64,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -114,7 +114,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -226,7 +226,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -312,7 +312,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -439,7 +439,7 @@ def internal_paging(next_link=None, raw=False): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/runs_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/runs_operations.py index 2f0cecc6159c..8de207f2eadd 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/runs_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/runs_operations.py @@ -73,7 +73,7 @@ def internal_paging(next_link=None, raw=False): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -147,7 +147,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'runId': self._serialize.url("run_id", run_id, 'str') } @@ -197,7 +197,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'runId': self._serialize.url("run_id", run_id, 'str') } @@ -324,7 +324,7 @@ def get_log_sas_url( url = self.get_log_sas_url.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'runId': self._serialize.url("run_id", run_id, 'str') } @@ -372,7 +372,7 @@ def _cancel_initial( url = self.cancel.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'runId': self._serialize.url("run_id", run_id, 'str') } diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/tasks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/tasks_operations.py index 9a6bfc9c2d82..950477ebcd4c 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/tasks_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/tasks_operations.py @@ -65,7 +65,7 @@ def internal_paging(next_link=None, raw=False): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -135,7 +135,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') } @@ -183,7 +183,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') } @@ -291,7 +291,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') } @@ -375,7 +375,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') } @@ -501,7 +501,7 @@ def get_details( url = self.get_details.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'taskName': self._serialize.url("task_name", task_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$') } diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/webhooks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/webhooks_operations.py index 9d6ca9fc03d1..398b15ae82e3 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/webhooks_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/operations/webhooks_operations.py @@ -64,7 +64,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -112,7 +112,7 @@ def _create_initial( url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -222,7 +222,7 @@ def _delete_initial( url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -306,7 +306,7 @@ def _update_initial( url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -434,7 +434,7 @@ def internal_paging(next_link=None, raw=False): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -504,7 +504,7 @@ def ping( url = self.ping.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -572,7 +572,7 @@ def get_callback_config( url = self.get_callback_config.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } @@ -641,7 +641,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_events.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') }