Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -102,6 +104,7 @@
SkuTier,
ProvisioningState,
DefaultAction,
Action,
PasswordName,
RegistryUsageUnit,
PolicyStatus,
Expand All @@ -124,6 +127,7 @@
'Status',
'StorageAccountProperties',
'VirtualNetworkRule',
'IPRule',
'NetworkRuleSet',
'Registry',
'RegistryUpdateParameters',
Expand Down Expand Up @@ -161,6 +165,7 @@
'SkuTier',
'ProvisioningState',
'DefaultAction',
'Action',
'PasswordName',
'RegistryUsageUnit',
'PolicyStatus',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class DefaultAction(str, Enum):
deny = "Deny"


class Action(str, Enum):

allow = "Allow"


class PasswordName(str, Enum):

password = "password"
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -160,6 +162,7 @@
SkuTier,
ProvisioningState,
DefaultAction,
Action,
PasswordName,
RegistryUsageUnit,
PolicyStatus,
Expand Down Expand Up @@ -190,6 +193,7 @@
'Status',
'StorageAccountProperties',
'VirtualNetworkRule',
'IPRule',
'NetworkRuleSet',
'Registry',
'RegistryUpdateParameters',
Expand Down Expand Up @@ -258,6 +262,7 @@
'SkuTier',
'ProvisioningState',
'DefaultAction',
'Action',
'PasswordName',
'RegistryUsageUnit',
'PolicyStatus',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class DefaultAction(str, Enum):
deny = "Deny"


class Action(str, Enum):

allow = "Allow"


class PasswordName(str, Enum):

password = "password"
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Loading