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 ddf4a46dfcc1..41a1b0766c10 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 @@ -23,6 +23,7 @@ from .status_py3 import Status from .storage_account_properties_py3 import StorageAccountProperties from .virtual_network_rule_py3 import VirtualNetworkRule + from .ip_rule_py3 import IPRule from .network_rule_set_py3 import NetworkRuleSet from .registry_py3 import Registry from .registry_update_parameters_py3 import RegistryUpdateParameters @@ -64,6 +65,7 @@ from .status import Status from .storage_account_properties import StorageAccountProperties from .virtual_network_rule import VirtualNetworkRule + from .ip_rule import IPRule from .network_rule_set import NetworkRuleSet from .registry import Registry from .registry_update_parameters import RegistryUpdateParameters @@ -102,6 +104,7 @@ SkuTier, ProvisioningState, DefaultAction, + Action, PasswordName, RegistryUsageUnit, PolicyStatus, @@ -124,6 +127,7 @@ 'Status', 'StorageAccountProperties', 'VirtualNetworkRule', + 'IPRule', 'NetworkRuleSet', 'Registry', 'RegistryUpdateParameters', @@ -161,6 +165,7 @@ 'SkuTier', 'ProvisioningState', 'DefaultAction', + 'Action', '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 263fe2f1145f..cea72fdba0b9 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 @@ -50,6 +50,11 @@ class DefaultAction(str, Enum): deny = "Deny" +class Action(str, Enum): + + allow = "Allow" + + class PasswordName(str, Enum): password = "password" diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/ip_rule.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/ip_rule.py new file mode 100644 index 000000000000..770060dc29aa --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/ip_rule.py @@ -0,0 +1,41 @@ +# 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 IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2017_10_01.models.Action + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IPRule, self).__init__(**kwargs) + self.action = kwargs.get('action', "Allow") + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/ip_rule_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/ip_rule_py3.py new file mode 100644 index 000000000000..6a40b118b246 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/ip_rule_py3.py @@ -0,0 +1,41 @@ +# 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 IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2017_10_01.models.Action + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, ip_address_or_range: str, action="Allow", **kwargs) -> None: + super(IPRule, self).__init__(**kwargs) + self.action = action + self.ip_address_or_range = ip_address_or_range 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 index 7d191ea24a03..f2f05345b47f 100644 --- 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 @@ -25,6 +25,9 @@ class NetworkRuleSet(Model): :param virtual_network_rules: The virtual network rules. :type virtual_network_rules: list[~azure.mgmt.containerregistry.v2017_10_01.models.VirtualNetworkRule] + :param ip_rules: The IP ACL rules. + :type ip_rules: + list[~azure.mgmt.containerregistry.v2017_10_01.models.IPRule] """ _validation = { @@ -34,9 +37,11 @@ class NetworkRuleSet(Model): _attribute_map = { 'default_action': {'key': 'defaultAction', 'type': 'str'}, 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, } 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) + self.ip_rules = kwargs.get('ip_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 index 2f1a3255f784..7242ec1c746f 100644 --- 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 @@ -25,6 +25,9 @@ class NetworkRuleSet(Model): :param virtual_network_rules: The virtual network rules. :type virtual_network_rules: list[~azure.mgmt.containerregistry.v2017_10_01.models.VirtualNetworkRule] + :param ip_rules: The IP ACL rules. + :type ip_rules: + list[~azure.mgmt.containerregistry.v2017_10_01.models.IPRule] """ _validation = { @@ -34,9 +37,11 @@ class NetworkRuleSet(Model): _attribute_map = { 'default_action': {'key': 'defaultAction', 'type': 'str'}, 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, } - def __init__(self, *, default_action="Allow", virtual_network_rules=None, **kwargs) -> None: + def __init__(self, *, default_action="Allow", virtual_network_rules=None, ip_rules=None, **kwargs) -> None: super(NetworkRuleSet, self).__init__(**kwargs) self.default_action = default_action self.virtual_network_rules = virtual_network_rules + self.ip_rules = ip_rules 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 index a22dea97ed0b..11acf066faca 100644 --- 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 @@ -13,23 +13,30 @@ class VirtualNetworkRule(Model): - """The virtual network rule for a container registry. + """Virtual network rule. All required parameters must be populated in order to send to Azure. - :param id: Required. Resource ID of a subnet, for example: + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2017_10_01.models.Action + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - :type id: str + :type virtual_network_resource_id: str """ _validation = { - 'id': {'required': True}, + 'virtual_network_resource_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, } def __init__(self, **kwargs): super(VirtualNetworkRule, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.action = kwargs.get('action', "Allow") + self.virtual_network_resource_id = kwargs.get('virtual_network_resource_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 index 476e8cf718ed..7ba12d1851f5 100644 --- 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 @@ -13,23 +13,30 @@ class VirtualNetworkRule(Model): - """The virtual network rule for a container registry. + """Virtual network rule. All required parameters must be populated in order to send to Azure. - :param id: Required. Resource ID of a subnet, for example: + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2017_10_01.models.Action + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - :type id: str + :type virtual_network_resource_id: str """ _validation = { - 'id': {'required': True}, + 'virtual_network_resource_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str, **kwargs) -> None: + def __init__(self, *, virtual_network_resource_id: str, action="Allow", **kwargs) -> None: super(VirtualNetworkRule, self).__init__(**kwargs) - self.id = id + self.action = action + self.virtual_network_resource_id = virtual_network_resource_id 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 ad51020aedc1..eecd55704b4f 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 @@ -23,6 +23,7 @@ from .status_py3 import Status from .storage_account_properties_py3 import StorageAccountProperties from .virtual_network_rule_py3 import VirtualNetworkRule + from .ip_rule_py3 import IPRule from .network_rule_set_py3 import NetworkRuleSet from .registry_py3 import Registry from .registry_update_parameters_py3 import RegistryUpdateParameters @@ -91,6 +92,7 @@ from .status import Status from .storage_account_properties import StorageAccountProperties from .virtual_network_rule import VirtualNetworkRule + from .ip_rule import IPRule from .network_rule_set import NetworkRuleSet from .registry import Registry from .registry_update_parameters import RegistryUpdateParameters @@ -160,6 +162,7 @@ SkuTier, ProvisioningState, DefaultAction, + Action, PasswordName, RegistryUsageUnit, PolicyStatus, @@ -190,6 +193,7 @@ 'Status', 'StorageAccountProperties', 'VirtualNetworkRule', + 'IPRule', 'NetworkRuleSet', 'Registry', 'RegistryUpdateParameters', @@ -258,6 +262,7 @@ 'SkuTier', 'ProvisioningState', 'DefaultAction', + 'Action', '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 fed1d2e8a695..61eae33f07d2 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 @@ -50,6 +50,11 @@ class DefaultAction(str, Enum): deny = "Deny" +class Action(str, Enum): + + allow = "Allow" + + class PasswordName(str, Enum): password = "password" diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/ip_rule.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/ip_rule.py new file mode 100644 index 000000000000..cf6503692001 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/ip_rule.py @@ -0,0 +1,41 @@ +# 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 IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.Action + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IPRule, self).__init__(**kwargs) + self.action = kwargs.get('action', "Allow") + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/ip_rule_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/ip_rule_py3.py new file mode 100644 index 000000000000..8addc77d3a8f --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/ip_rule_py3.py @@ -0,0 +1,41 @@ +# 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 IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.Action + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, ip_address_or_range: str, action="Allow", **kwargs) -> None: + super(IPRule, self).__init__(**kwargs) + self.action = action + self.ip_address_or_range = ip_address_or_range 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 index b847e1ad8eb3..1d7b28d30f24 100644 --- 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 @@ -25,6 +25,9 @@ class NetworkRuleSet(Model): :param virtual_network_rules: The virtual network rules. :type virtual_network_rules: list[~azure.mgmt.containerregistry.v2018_02_01_preview.models.VirtualNetworkRule] + :param ip_rules: The IP ACL rules. + :type ip_rules: + list[~azure.mgmt.containerregistry.v2018_02_01_preview.models.IPRule] """ _validation = { @@ -34,9 +37,11 @@ class NetworkRuleSet(Model): _attribute_map = { 'default_action': {'key': 'defaultAction', 'type': 'str'}, 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, } 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) + self.ip_rules = kwargs.get('ip_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 index 90b4ae797fe7..6580fd35679c 100644 --- 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 @@ -25,6 +25,9 @@ class NetworkRuleSet(Model): :param virtual_network_rules: The virtual network rules. :type virtual_network_rules: list[~azure.mgmt.containerregistry.v2018_02_01_preview.models.VirtualNetworkRule] + :param ip_rules: The IP ACL rules. + :type ip_rules: + list[~azure.mgmt.containerregistry.v2018_02_01_preview.models.IPRule] """ _validation = { @@ -34,9 +37,11 @@ class NetworkRuleSet(Model): _attribute_map = { 'default_action': {'key': 'defaultAction', 'type': 'str'}, 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, } - def __init__(self, *, default_action="Allow", virtual_network_rules=None, **kwargs) -> None: + def __init__(self, *, default_action="Allow", virtual_network_rules=None, ip_rules=None, **kwargs) -> None: super(NetworkRuleSet, self).__init__(**kwargs) self.default_action = default_action self.virtual_network_rules = virtual_network_rules + self.ip_rules = ip_rules diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/quick_build_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/quick_build_request.py index 7e5351137e90..e2378ecfd27d 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/quick_build_request.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/quick_build_request.py @@ -24,7 +24,7 @@ class QuickBuildRequest(QueueBuildRequest): :type image_names: list[str] :param source_location: Required. The URL(absolute or relative) of the source that needs to be built. For Docker build, it can be an URL to a tar - or github repoistory as supported by Docker. + or github repository as supported by Docker. If it is relative URL, the relative path should be obtained from calling getSourceUploadUrl API. :type source_location: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/quick_build_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/quick_build_request_py3.py index bad180488cd6..5f6f471802d8 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/quick_build_request_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/quick_build_request_py3.py @@ -24,7 +24,7 @@ class QuickBuildRequest(QueueBuildRequest): :type image_names: list[str] :param source_location: Required. The URL(absolute or relative) of the source that needs to be built. For Docker build, it can be an URL to a tar - or github repoistory as supported by Docker. + or github repository as supported by Docker. If it is relative URL, the relative path should be obtained from calling getSourceUploadUrl API. :type source_location: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/source_repository_properties.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/source_repository_properties.py index f537dc82faaf..6be637c82a7a 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/source_repository_properties.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/source_repository_properties.py @@ -22,7 +22,7 @@ class SourceRepositoryProperties(Model): :type source_control_type: str or ~azure.mgmt.containerregistry.v2018_02_01_preview.models.SourceControlType :param repository_url: Required. The full URL to the source code - respository + repository :type repository_url: str :param is_commit_trigger_enabled: The value of this property indicates whether the source control commit trigger is enabled or not. Default diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/source_repository_properties_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/source_repository_properties_py3.py index 787f32b41d9b..11019f23de7f 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/source_repository_properties_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/source_repository_properties_py3.py @@ -22,7 +22,7 @@ class SourceRepositoryProperties(Model): :type source_control_type: str or ~azure.mgmt.containerregistry.v2018_02_01_preview.models.SourceControlType :param repository_url: Required. The full URL to the source code - respository + repository :type repository_url: str :param is_commit_trigger_enabled: The value of this property indicates whether the source control commit trigger is enabled or not. Default 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 index a22dea97ed0b..d8f2f67671ff 100644 --- 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 @@ -13,23 +13,30 @@ class VirtualNetworkRule(Model): - """The virtual network rule for a container registry. + """Virtual network rule. All required parameters must be populated in order to send to Azure. - :param id: Required. Resource ID of a subnet, for example: + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.Action + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - :type id: str + :type virtual_network_resource_id: str """ _validation = { - 'id': {'required': True}, + 'virtual_network_resource_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, } def __init__(self, **kwargs): super(VirtualNetworkRule, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.action = kwargs.get('action', "Allow") + self.virtual_network_resource_id = kwargs.get('virtual_network_resource_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 index 476e8cf718ed..b9db306970b2 100644 --- 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 @@ -13,23 +13,30 @@ class VirtualNetworkRule(Model): - """The virtual network rule for a container registry. + """Virtual network rule. All required parameters must be populated in order to send to Azure. - :param id: Required. Resource ID of a subnet, for example: + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2018_02_01_preview.models.Action + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - :type id: str + :type virtual_network_resource_id: str """ _validation = { - 'id': {'required': True}, + 'virtual_network_resource_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str, **kwargs) -> None: + def __init__(self, *, virtual_network_resource_id: str, action="Allow", **kwargs) -> None: super(VirtualNetworkRule, self).__init__(**kwargs) - self.id = id + self.action = action + self.virtual_network_resource_id = virtual_network_resource_id 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 b79568b7a688..851f7467b403 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 @@ -23,6 +23,7 @@ from .status_py3 import Status from .storage_account_properties_py3 import StorageAccountProperties from .virtual_network_rule_py3 import VirtualNetworkRule + from .ip_rule_py3 import IPRule from .network_rule_set_py3 import NetworkRuleSet from .registry_py3 import Registry from .registry_update_parameters_py3 import RegistryUpdateParameters @@ -104,6 +105,7 @@ from .status import Status from .storage_account_properties import StorageAccountProperties from .virtual_network_rule import VirtualNetworkRule + from .ip_rule import IPRule from .network_rule_set import NetworkRuleSet from .registry import Registry from .registry_update_parameters import RegistryUpdateParameters @@ -184,6 +186,7 @@ SkuTier, ProvisioningState, DefaultAction, + Action, PasswordName, RegistryUsageUnit, PolicyStatus, @@ -218,6 +221,7 @@ 'Status', 'StorageAccountProperties', 'VirtualNetworkRule', + 'IPRule', 'NetworkRuleSet', 'Registry', 'RegistryUpdateParameters', @@ -297,6 +301,7 @@ 'SkuTier', 'ProvisioningState', 'DefaultAction', + 'Action', '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 1de046066b30..15d75a21a09c 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 @@ -50,6 +50,11 @@ class DefaultAction(str, Enum): deny = "Deny" +class Action(str, Enum): + + allow = "Allow" + + class PasswordName(str, Enum): password = "password" diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request.py index 80dd5ca1f71b..7310dd6a9f2f 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request.py @@ -48,7 +48,7 @@ class DockerBuildRequest(RunRequest): :type agent_configuration: ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties :param source_location: The URL(absolute or relative) of the source - context. It can be an URL to a tar or git repoistory. + context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API. :type source_location: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request_py3.py index 3cf4081f5afb..d03998190503 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/docker_build_request_py3.py @@ -48,7 +48,7 @@ class DockerBuildRequest(RunRequest): :type agent_configuration: ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties :param source_location: The URL(absolute or relative) of the source - context. It can be an URL to a tar or git repoistory. + context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API. :type source_location: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/encoded_task_run_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/encoded_task_run_request.py index bd399328c258..52c7020757d2 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/encoded_task_run_request.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/encoded_task_run_request.py @@ -42,7 +42,7 @@ class EncodedTaskRunRequest(RunRequest): :type agent_configuration: ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties :param source_location: The URL(absolute or relative) of the source - context. It can be an URL to a tar or git repoistory. + context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API. :type source_location: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/encoded_task_run_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/encoded_task_run_request_py3.py index eceaafb5a6ed..56be85f1c1e1 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/encoded_task_run_request_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/encoded_task_run_request_py3.py @@ -42,7 +42,7 @@ class EncodedTaskRunRequest(RunRequest): :type agent_configuration: ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties :param source_location: The URL(absolute or relative) of the source - context. It can be an URL to a tar or git repoistory. + context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API. :type source_location: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/file_task_run_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/file_task_run_request.py index ad238e4377fe..789c320bcdfb 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/file_task_run_request.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/file_task_run_request.py @@ -42,7 +42,7 @@ class FileTaskRunRequest(RunRequest): :type agent_configuration: ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties :param source_location: The URL(absolute or relative) of the source - context. It can be an URL to a tar or git repoistory. + context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API. :type source_location: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/file_task_run_request_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/file_task_run_request_py3.py index c2a63a9f0857..6779fa9e73fe 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/file_task_run_request_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/file_task_run_request_py3.py @@ -42,7 +42,7 @@ class FileTaskRunRequest(RunRequest): :type agent_configuration: ~azure.mgmt.containerregistry.v2018_09_01.models.AgentProperties :param source_location: The URL(absolute or relative) of the source - context. It can be an URL to a tar or git repoistory. + context. It can be an URL to a tar or git repository. If it is relative URL, the relative path should be obtained from calling listBuildSourceUploadUrl API. :type source_location: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/ip_rule.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/ip_rule.py new file mode 100644 index 000000000000..e265dd281fca --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/ip_rule.py @@ -0,0 +1,41 @@ +# 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 IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Action + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IPRule, self).__init__(**kwargs) + self.action = kwargs.get('action', "Allow") + self.ip_address_or_range = kwargs.get('ip_address_or_range', None) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/ip_rule_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/ip_rule_py3.py new file mode 100644 index 000000000000..57ffc077e0db --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/ip_rule_py3.py @@ -0,0 +1,41 @@ +# 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 IPRule(Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of IP ACL rule. Possible values include: + 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Action + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR + format. Only IPV4 address is allowed. + :type ip_address_or_range: str + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, ip_address_or_range: str, action="Allow", **kwargs) -> None: + super(IPRule, self).__init__(**kwargs) + self.action = action + self.ip_address_or_range = ip_address_or_range 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 index 6985b4ebe32e..0de2d6dade98 100644 --- 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 @@ -25,6 +25,9 @@ class NetworkRuleSet(Model): :param virtual_network_rules: The virtual network rules. :type virtual_network_rules: list[~azure.mgmt.containerregistry.v2018_09_01.models.VirtualNetworkRule] + :param ip_rules: The IP ACL rules. + :type ip_rules: + list[~azure.mgmt.containerregistry.v2018_09_01.models.IPRule] """ _validation = { @@ -34,9 +37,11 @@ class NetworkRuleSet(Model): _attribute_map = { 'default_action': {'key': 'defaultAction', 'type': 'str'}, 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, } 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) + self.ip_rules = kwargs.get('ip_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 index 6f8c0eee6dd8..e34860da74e7 100644 --- 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 @@ -25,6 +25,9 @@ class NetworkRuleSet(Model): :param virtual_network_rules: The virtual network rules. :type virtual_network_rules: list[~azure.mgmt.containerregistry.v2018_09_01.models.VirtualNetworkRule] + :param ip_rules: The IP ACL rules. + :type ip_rules: + list[~azure.mgmt.containerregistry.v2018_09_01.models.IPRule] """ _validation = { @@ -34,9 +37,11 @@ class NetworkRuleSet(Model): _attribute_map = { 'default_action': {'key': 'defaultAction', 'type': 'str'}, 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, } - def __init__(self, *, default_action="Allow", virtual_network_rules=None, **kwargs) -> None: + def __init__(self, *, default_action="Allow", virtual_network_rules=None, ip_rules=None, **kwargs) -> None: super(NetworkRuleSet, self).__init__(**kwargs) self.default_action = default_action self.virtual_network_rules = virtual_network_rules + self.ip_rules = ip_rules diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties.py index bc3e6cd13811..1a5a6038a623 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties.py @@ -22,7 +22,7 @@ class SourceProperties(Model): :type source_control_type: str or ~azure.mgmt.containerregistry.v2018_09_01.models.SourceControlType :param repository_url: Required. The full URL to the source code - respository + repository :type repository_url: str :param branch: The branch name of the source code. :type branch: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties_py3.py index b98beec8ab31..b6a92008f6f6 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_properties_py3.py @@ -22,7 +22,7 @@ class SourceProperties(Model): :type source_control_type: str or ~azure.mgmt.containerregistry.v2018_09_01.models.SourceControlType :param repository_url: Required. The full URL to the source code - respository + repository :type repository_url: str :param branch: The branch name of the source code. :type branch: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters.py index 8233824065bf..83177663cb75 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters.py @@ -19,7 +19,7 @@ class SourceUpdateParameters(Model): values include: 'Github', 'VisualStudioTeamService' :type source_control_type: str or ~azure.mgmt.containerregistry.v2018_09_01.models.SourceControlType - :param repository_url: The full URL to the source code respository + :param repository_url: The full URL to the source code repository :type repository_url: str :param branch: The branch name of the source code. :type branch: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters_py3.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters_py3.py index 80002e5624ab..c0c88596783b 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters_py3.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/models/source_update_parameters_py3.py @@ -19,7 +19,7 @@ class SourceUpdateParameters(Model): values include: 'Github', 'VisualStudioTeamService' :type source_control_type: str or ~azure.mgmt.containerregistry.v2018_09_01.models.SourceControlType - :param repository_url: The full URL to the source code respository + :param repository_url: The full URL to the source code repository :type repository_url: str :param branch: The branch name of the source code. :type branch: str 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 index a22dea97ed0b..2a1a4e7417e3 100644 --- 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 @@ -13,23 +13,30 @@ class VirtualNetworkRule(Model): - """The virtual network rule for a container registry. + """Virtual network rule. All required parameters must be populated in order to send to Azure. - :param id: Required. Resource ID of a subnet, for example: + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Action + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - :type id: str + :type virtual_network_resource_id: str """ _validation = { - 'id': {'required': True}, + 'virtual_network_resource_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, } def __init__(self, **kwargs): super(VirtualNetworkRule, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.action = kwargs.get('action', "Allow") + self.virtual_network_resource_id = kwargs.get('virtual_network_resource_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 index 476e8cf718ed..36e56939ac65 100644 --- 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 @@ -13,23 +13,30 @@ class VirtualNetworkRule(Model): - """The virtual network rule for a container registry. + """Virtual network rule. All required parameters must be populated in order to send to Azure. - :param id: Required. Resource ID of a subnet, for example: + :param action: The action of virtual network rule. Possible values + include: 'Allow'. Default value: "Allow" . + :type action: str or + ~azure.mgmt.containerregistry.v2018_09_01.models.Action + :param virtual_network_resource_id: Required. Resource ID of a subnet, for + example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. - :type id: str + :type virtual_network_resource_id: str """ _validation = { - 'id': {'required': True}, + 'virtual_network_resource_id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, id: str, **kwargs) -> None: + def __init__(self, *, virtual_network_resource_id: str, action="Allow", **kwargs) -> None: super(VirtualNetworkRule, self).__init__(**kwargs) - self.id = id + self.action = action + self.virtual_network_resource_id = virtual_network_resource_id