Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] eventhub/resource-manager #4529

Merged
merged 8 commits into from
Apr 9, 2019
8 changes: 8 additions & 0 deletions azure-mgmt-eventhub/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Release History
===============

2.5.0 (2019-04-09)
++++++++++++++++++

**Features**

- Added operation NamespacesOperations.create_or_update_network_rule_set for the 2017-04-01 API version
- Added operation NamespacesOperations.get_network_rule_set for the 2017-04-01 API version

2.4.0 (2019-03-06)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
from .messaging_regions_properties_py3 import MessagingRegionsProperties
from .messaging_regions_py3 import MessagingRegions
from .messaging_plan_py3 import MessagingPlan
from .subnet_py3 import Subnet
from .nw_rule_set_ip_rules_py3 import NWRuleSetIpRules
from .nw_rule_set_virtual_network_rules_py3 import NWRuleSetVirtualNetworkRules
from .network_rule_set_py3 import NetworkRuleSet
except (SyntaxError, ImportError):
from .tracked_resource import TrackedResource
from .resource import Resource
Expand All @@ -51,6 +55,10 @@
from .messaging_regions_properties import MessagingRegionsProperties
from .messaging_regions import MessagingRegions
from .messaging_plan import MessagingPlan
from .subnet import Subnet
from .nw_rule_set_ip_rules import NWRuleSetIpRules
from .nw_rule_set_virtual_network_rules import NWRuleSetVirtualNetworkRules
from .network_rule_set import NetworkRuleSet
from .operation_paged import OperationPaged
from .eh_namespace_paged import EHNamespacePaged
from .authorization_rule_paged import AuthorizationRulePaged
Expand All @@ -68,6 +76,8 @@
UnavailableReason,
ProvisioningStateDR,
RoleDisasterRecovery,
NetworkRuleIPAction,
DefaultAction,
)

__all__ = [
Expand All @@ -91,6 +101,10 @@
'MessagingRegionsProperties',
'MessagingRegions',
'MessagingPlan',
'Subnet',
'NWRuleSetIpRules',
'NWRuleSetVirtualNetworkRules',
'NetworkRuleSet',
'OperationPaged',
'EHNamespacePaged',
'AuthorizationRulePaged',
Expand All @@ -107,4 +121,6 @@
'UnavailableReason',
'ProvisioningStateDR',
'RoleDisasterRecovery',
'NetworkRuleIPAction',
'DefaultAction',
]
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,14 @@ class RoleDisasterRecovery(str, Enum):
primary = "Primary"
primary_not_replicating = "PrimaryNotReplicating"
secondary = "Secondary"


class NetworkRuleIPAction(str, Enum):

allow = "Allow"


class DefaultAction(str, Enum):

allow = "Allow"
deny = "Deny"
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 .resource import Resource


class NetworkRuleSet(Resource):
"""Description of NetworkRuleSet resource.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param default_action: Default Action for Network Rule Set. Possible
values include: 'Allow', 'Deny'
:type default_action: str or
~azure.mgmt.eventhub.v2017_04_01.models.DefaultAction
:param virtual_network_rules: List VirtualNetwork Rules
:type virtual_network_rules:
list[~azure.mgmt.eventhub.v2017_04_01.models.NWRuleSetVirtualNetworkRules]
:param ip_rules: List of IpRules
:type ip_rules:
list[~azure.mgmt.eventhub.v2017_04_01.models.NWRuleSetIpRules]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'default_action': {'key': 'properties.defaultAction', 'type': 'str'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'},
'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'},
}

def __init__(self, **kwargs):
super(NetworkRuleSet, self).__init__(**kwargs)
self.default_action = kwargs.get('default_action', None)
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
@@ -0,0 +1,58 @@
# 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 .resource_py3 import Resource


class NetworkRuleSet(Resource):
"""Description of NetworkRuleSet resource.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param default_action: Default Action for Network Rule Set. Possible
values include: 'Allow', 'Deny'
:type default_action: str or
~azure.mgmt.eventhub.v2017_04_01.models.DefaultAction
:param virtual_network_rules: List VirtualNetwork Rules
:type virtual_network_rules:
list[~azure.mgmt.eventhub.v2017_04_01.models.NWRuleSetVirtualNetworkRules]
:param ip_rules: List of IpRules
:type ip_rules:
list[~azure.mgmt.eventhub.v2017_04_01.models.NWRuleSetIpRules]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'default_action': {'key': 'properties.defaultAction', 'type': 'str'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'},
'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'},
}

def __init__(self, *, default_action=None, 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
@@ -0,0 +1,34 @@
# 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 NWRuleSetIpRules(Model):
"""Description of NetWorkRuleSet - IpRules resource.

:param ip_mask: IP Mask
:type ip_mask: str
:param action: The IP Filter Action. Possible values include: 'Allow'.
Default value: "Allow" .
:type action: str or
~azure.mgmt.eventhub.v2017_04_01.models.NetworkRuleIPAction
"""

_attribute_map = {
'ip_mask': {'key': 'ipMask', 'type': 'str'},
'action': {'key': 'action', 'type': 'str'},
}

def __init__(self, **kwargs):
super(NWRuleSetIpRules, self).__init__(**kwargs)
self.ip_mask = kwargs.get('ip_mask', None)
self.action = kwargs.get('action', "Allow")
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 NWRuleSetIpRules(Model):
"""Description of NetWorkRuleSet - IpRules resource.

:param ip_mask: IP Mask
:type ip_mask: str
:param action: The IP Filter Action. Possible values include: 'Allow'.
Default value: "Allow" .
:type action: str or
~azure.mgmt.eventhub.v2017_04_01.models.NetworkRuleIPAction
"""

_attribute_map = {
'ip_mask': {'key': 'ipMask', 'type': 'str'},
'action': {'key': 'action', 'type': 'str'},
}

def __init__(self, *, ip_mask: str=None, action="Allow", **kwargs) -> None:
super(NWRuleSetIpRules, self).__init__(**kwargs)
self.ip_mask = ip_mask
self.action = action
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 NWRuleSetVirtualNetworkRules(Model):
"""Description of VirtualNetworkRules - NetworkRules resource.

:param subnet: Subnet properties
:type subnet: ~azure.mgmt.eventhub.v2017_04_01.models.Subnet
:param ignore_missing_vnet_service_endpoint: Value that indicates whether
to ignore missing VNet Service Endpoint
:type ignore_missing_vnet_service_endpoint: bool
"""

_attribute_map = {
'subnet': {'key': 'subnet', 'type': 'Subnet'},
'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs)
self.subnet = kwargs.get('subnet', None)
self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 NWRuleSetVirtualNetworkRules(Model):
"""Description of VirtualNetworkRules - NetworkRules resource.

:param subnet: Subnet properties
:type subnet: ~azure.mgmt.eventhub.v2017_04_01.models.Subnet
:param ignore_missing_vnet_service_endpoint: Value that indicates whether
to ignore missing VNet Service Endpoint
:type ignore_missing_vnet_service_endpoint: bool
"""

_attribute_map = {
'subnet': {'key': 'subnet', 'type': 'Subnet'},
'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'},
}

def __init__(self, *, subnet=None, ignore_missing_vnet_service_endpoint: bool=None, **kwargs) -> None:
super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs)
self.subnet = subnet
self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 Subnet(Model):
"""Properties supplied for Subnet.

All required parameters must be populated in order to send to Azure.

:param id: Required. Resource ID of Virtual Network Subnet
:type id: str
"""

_validation = {
'id': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}

def __init__(self, **kwargs):
super(Subnet, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
Loading