Skip to content

Commit 8c79281

Browse files
authored
[AutoPR servicebus/resource-manager] Service Bus: moved VNet and IpFilter rules from 2018-preview to 2017 API version (#3626)
* Generated from d7bcecddf6db2cf2857de2ed818a5b3a33bf4b5f moved VNet and IpFilter rules from 2018-preview to 2017 API version * Packaging update of azure-mgmt-servicebus * Generated from cf8138058fa1001ab7532759064a35de1860aed5 added the readonly enum for type of replication of Alias(Geo DR) * Generated from fedce30b02d58fee823a40fd8cfb34fe8ddbd514 Removed the type property of DisasterRecoveryConfig
1 parent acc1fb5 commit 8c79281

11 files changed

+805
-1
lines changed

azure-mgmt-servicebus/MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
include *.rst
2+
include azure/__init__.py
3+
include azure/mgmt/__init__.py
4+

azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
from .eventhub_py3 import Eventhub
4242
from .arm_disaster_recovery_py3 import ArmDisasterRecovery
4343
from .migration_config_properties_py3 import MigrationConfigProperties
44+
from .ip_filter_rule_py3 import IpFilterRule
45+
from .virtual_network_rule_py3 import VirtualNetworkRule
4446
except (SyntaxError, ImportError):
4547
from .tracked_resource import TrackedResource
4648
from .resource import Resource
@@ -73,9 +75,13 @@
7375
from .eventhub import Eventhub
7476
from .arm_disaster_recovery import ArmDisasterRecovery
7577
from .migration_config_properties import MigrationConfigProperties
78+
from .ip_filter_rule import IpFilterRule
79+
from .virtual_network_rule import VirtualNetworkRule
7680
from .operation_paged import OperationPaged
7781
from .sb_namespace_paged import SBNamespacePaged
7882
from .sb_authorization_rule_paged import SBAuthorizationRulePaged
83+
from .ip_filter_rule_paged import IpFilterRulePaged
84+
from .virtual_network_rule_paged import VirtualNetworkRulePaged
7985
from .arm_disaster_recovery_paged import ArmDisasterRecoveryPaged
8086
from .migration_config_properties_paged import MigrationConfigPropertiesPaged
8187
from .sb_queue_paged import SBQueuePaged
@@ -95,6 +101,7 @@
95101
EncodingCaptureDescription,
96102
ProvisioningStateDR,
97103
RoleDisasterRecovery,
104+
IPAction,
98105
)
99106

100107
__all__ = [
@@ -129,9 +136,13 @@
129136
'Eventhub',
130137
'ArmDisasterRecovery',
131138
'MigrationConfigProperties',
139+
'IpFilterRule',
140+
'VirtualNetworkRule',
132141
'OperationPaged',
133142
'SBNamespacePaged',
134143
'SBAuthorizationRulePaged',
144+
'IpFilterRulePaged',
145+
'VirtualNetworkRulePaged',
135146
'ArmDisasterRecoveryPaged',
136147
'MigrationConfigPropertiesPaged',
137148
'SBQueuePaged',
@@ -150,4 +161,5 @@
150161
'EncodingCaptureDescription',
151162
'ProvisioningStateDR',
152163
'RoleDisasterRecovery',
164+
'IPAction',
153165
]
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .resource import Resource
13+
14+
15+
class IpFilterRule(Resource):
16+
"""Single item in a List or Get IpFilterRules operation.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:ivar id: Resource Id
22+
:vartype id: str
23+
:ivar name: Resource name
24+
:vartype name: str
25+
:ivar type: Resource type
26+
:vartype type: str
27+
:param ip_mask: IP Mask
28+
:type ip_mask: str
29+
:param action: The IP Filter Action. Possible values include: 'Accept',
30+
'Reject'
31+
:type action: str or ~azure.mgmt.servicebus.models.IPAction
32+
:param filter_name: IP Filter name
33+
:type filter_name: str
34+
"""
35+
36+
_validation = {
37+
'id': {'readonly': True},
38+
'name': {'readonly': True},
39+
'type': {'readonly': True},
40+
}
41+
42+
_attribute_map = {
43+
'id': {'key': 'id', 'type': 'str'},
44+
'name': {'key': 'name', 'type': 'str'},
45+
'type': {'key': 'type', 'type': 'str'},
46+
'ip_mask': {'key': 'properties.ipMask', 'type': 'str'},
47+
'action': {'key': 'properties.action', 'type': 'str'},
48+
'filter_name': {'key': 'properties.filterName', 'type': 'str'},
49+
}
50+
51+
def __init__(self, **kwargs):
52+
super(IpFilterRule, self).__init__(**kwargs)
53+
self.ip_mask = kwargs.get('ip_mask', None)
54+
self.action = kwargs.get('action', None)
55+
self.filter_name = kwargs.get('filter_name', None)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.paging import Paged
13+
14+
15+
class IpFilterRulePaged(Paged):
16+
"""
17+
A paging container for iterating over a list of :class:`IpFilterRule <azure.mgmt.servicebus.models.IpFilterRule>` object
18+
"""
19+
20+
_attribute_map = {
21+
'next_link': {'key': 'nextLink', 'type': 'str'},
22+
'current_page': {'key': 'value', 'type': '[IpFilterRule]'}
23+
}
24+
25+
def __init__(self, *args, **kwargs):
26+
27+
super(IpFilterRulePaged, self).__init__(*args, **kwargs)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .resource_py3 import Resource
13+
14+
15+
class IpFilterRule(Resource):
16+
"""Single item in a List or Get IpFilterRules operation.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:ivar id: Resource Id
22+
:vartype id: str
23+
:ivar name: Resource name
24+
:vartype name: str
25+
:ivar type: Resource type
26+
:vartype type: str
27+
:param ip_mask: IP Mask
28+
:type ip_mask: str
29+
:param action: The IP Filter Action. Possible values include: 'Accept',
30+
'Reject'
31+
:type action: str or ~azure.mgmt.servicebus.models.IPAction
32+
:param filter_name: IP Filter name
33+
:type filter_name: str
34+
"""
35+
36+
_validation = {
37+
'id': {'readonly': True},
38+
'name': {'readonly': True},
39+
'type': {'readonly': True},
40+
}
41+
42+
_attribute_map = {
43+
'id': {'key': 'id', 'type': 'str'},
44+
'name': {'key': 'name', 'type': 'str'},
45+
'type': {'key': 'type', 'type': 'str'},
46+
'ip_mask': {'key': 'properties.ipMask', 'type': 'str'},
47+
'action': {'key': 'properties.action', 'type': 'str'},
48+
'filter_name': {'key': 'properties.filterName', 'type': 'str'},
49+
}
50+
51+
def __init__(self, *, ip_mask: str=None, action=None, filter_name: str=None, **kwargs) -> None:
52+
super(IpFilterRule, self).__init__(**kwargs)
53+
self.ip_mask = ip_mask
54+
self.action = action
55+
self.filter_name = filter_name

azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,9 @@ class RoleDisasterRecovery(str, Enum):
8686
primary = "Primary"
8787
primary_not_replicating = "PrimaryNotReplicating"
8888
secondary = "Secondary"
89+
90+
91+
class IPAction(str, Enum):
92+
93+
accept = "Accept"
94+
reject = "Reject"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .resource import Resource
13+
14+
15+
class VirtualNetworkRule(Resource):
16+
"""Single item in a List or Get VirtualNetworkRules operation.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:ivar id: Resource Id
22+
:vartype id: str
23+
:ivar name: Resource name
24+
:vartype name: str
25+
:ivar type: Resource type
26+
:vartype type: str
27+
:param virtual_network_subnet_id: Resource ID of Virtual Network Subnet
28+
:type virtual_network_subnet_id: str
29+
"""
30+
31+
_validation = {
32+
'id': {'readonly': True},
33+
'name': {'readonly': True},
34+
'type': {'readonly': True},
35+
}
36+
37+
_attribute_map = {
38+
'id': {'key': 'id', 'type': 'str'},
39+
'name': {'key': 'name', 'type': 'str'},
40+
'type': {'key': 'type', 'type': 'str'},
41+
'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'},
42+
}
43+
44+
def __init__(self, **kwargs):
45+
super(VirtualNetworkRule, self).__init__(**kwargs)
46+
self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.paging import Paged
13+
14+
15+
class VirtualNetworkRulePaged(Paged):
16+
"""
17+
A paging container for iterating over a list of :class:`VirtualNetworkRule <azure.mgmt.servicebus.models.VirtualNetworkRule>` object
18+
"""
19+
20+
_attribute_map = {
21+
'next_link': {'key': 'nextLink', 'type': 'str'},
22+
'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'}
23+
}
24+
25+
def __init__(self, *args, **kwargs):
26+
27+
super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .resource_py3 import Resource
13+
14+
15+
class VirtualNetworkRule(Resource):
16+
"""Single item in a List or Get VirtualNetworkRules operation.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:ivar id: Resource Id
22+
:vartype id: str
23+
:ivar name: Resource name
24+
:vartype name: str
25+
:ivar type: Resource type
26+
:vartype type: str
27+
:param virtual_network_subnet_id: Resource ID of Virtual Network Subnet
28+
:type virtual_network_subnet_id: str
29+
"""
30+
31+
_validation = {
32+
'id': {'readonly': True},
33+
'name': {'readonly': True},
34+
'type': {'readonly': True},
35+
}
36+
37+
_attribute_map = {
38+
'id': {'key': 'id', 'type': 'str'},
39+
'name': {'key': 'name', 'type': 'str'},
40+
'type': {'key': 'type', 'type': 'str'},
41+
'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'},
42+
}
43+
44+
def __init__(self, *, virtual_network_subnet_id: str=None, **kwargs) -> None:
45+
super(VirtualNetworkRule, self).__init__(**kwargs)
46+
self.virtual_network_subnet_id = virtual_network_subnet_id

0 commit comments

Comments
 (0)