azure_mgmt_network 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_network.rb +91 -82
- data/lib/generated/azure_mgmt_network/application_gateways.rb +17 -20
- data/lib/generated/azure_mgmt_network/bgp_service_communities.rb +216 -0
- data/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +9 -12
- data/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +9 -12
- data/lib/generated/azure_mgmt_network/express_route_circuits.rb +21 -24
- data/lib/generated/azure_mgmt_network/express_route_service_providers.rb +3 -6
- data/lib/generated/azure_mgmt_network/load_balancers.rb +11 -14
- data/lib/generated/azure_mgmt_network/local_network_gateways.rb +9 -12
- data/lib/generated/azure_mgmt_network/models/{network_operation_status.rb → access.rb} +4 -5
- data/lib/generated/azure_mgmt_network/models/{error.rb → bgp_service_community.rb} +39 -36
- data/lib/generated/azure_mgmt_network/models/bgp_service_community_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_network/models/bgp_settings.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/bgpcommunity.rb +84 -0
- data/lib/generated/azure_mgmt_network/models/connection_reset_shared_key.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/express_route_circuit.rb +1 -0
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb +1 -0
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb +13 -1
- data/lib/generated/azure_mgmt_network/models/patch_route_filter.rb +144 -0
- data/lib/generated/azure_mgmt_network/models/patch_route_filter_rule.rb +136 -0
- data/lib/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +13 -14
- data/lib/generated/azure_mgmt_network/models/route_filter.rb +141 -0
- data/lib/generated/azure_mgmt_network/models/route_filter_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_network/models/route_filter_rule.rb +146 -0
- data/lib/generated/azure_mgmt_network/models/route_filter_rule_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_network/network_interfaces.rb +251 -254
- data/lib/generated/azure_mgmt_network/network_management_client.rb +60 -53
- data/lib/generated/azure_mgmt_network/network_security_groups.rb +11 -14
- data/lib/generated/azure_mgmt_network/public_ipaddresses.rb +11 -14
- data/lib/generated/azure_mgmt_network/route_filter_rules.rb +773 -0
- data/lib/generated/azure_mgmt_network/route_filters.rb +942 -0
- data/lib/generated/azure_mgmt_network/route_tables.rb +11 -14
- data/lib/generated/azure_mgmt_network/routes.rb +9 -12
- data/lib/generated/azure_mgmt_network/security_rules.rb +9 -12
- data/lib/generated/azure_mgmt_network/subnets.rb +9 -12
- data/lib/generated/azure_mgmt_network/usages.rb +3 -6
- data/lib/generated/azure_mgmt_network/version.rb +1 -1
- data/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +15 -18
- data/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +13 -16
- data/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +9 -12
- data/lib/generated/azure_mgmt_network/virtual_networks.rb +13 -16
- metadata +17 -8
- data/lib/generated/azure_mgmt_network/models/azure_async_operation_result.rb +0 -64
- data/lib/generated/azure_mgmt_network/models/error_details.rb +0 -65
@@ -22,9 +22,6 @@ module Azure::ARM::Network
|
|
22
22
|
# for every service call.
|
23
23
|
attr_accessor :subscription_id
|
24
24
|
|
25
|
-
# @return [String] Client API version.
|
26
|
-
attr_reader :api_version
|
27
|
-
|
28
25
|
# @return [String] Gets or sets the preferred language for the response.
|
29
26
|
attr_accessor :accept_language
|
30
27
|
|
@@ -39,61 +36,70 @@ module Azure::ARM::Network
|
|
39
36
|
# @return [ApplicationGateways] application_gateways
|
40
37
|
attr_reader :application_gateways
|
41
38
|
|
42
|
-
# @return [ExpressRouteCircuitAuthorizations]
|
43
|
-
# express_route_circuit_authorizations
|
44
|
-
attr_reader :express_route_circuit_authorizations
|
45
|
-
|
46
|
-
# @return [ExpressRouteCircuitPeerings] express_route_circuit_peerings
|
47
|
-
attr_reader :express_route_circuit_peerings
|
48
|
-
|
49
|
-
# @return [ExpressRouteCircuits] express_route_circuits
|
50
|
-
attr_reader :express_route_circuits
|
51
|
-
|
52
|
-
# @return [ExpressRouteServiceProviders] express_route_service_providers
|
53
|
-
attr_reader :express_route_service_providers
|
54
|
-
|
55
|
-
# @return [LoadBalancers] load_balancers
|
56
|
-
attr_reader :load_balancers
|
57
|
-
|
58
|
-
# @return [LocalNetworkGateways] local_network_gateways
|
59
|
-
attr_reader :local_network_gateways
|
60
|
-
|
61
|
-
# @return [NetworkInterfaces] network_interfaces
|
62
|
-
attr_reader :network_interfaces
|
63
|
-
|
64
|
-
# @return [NetworkSecurityGroups] network_security_groups
|
65
|
-
attr_reader :network_security_groups
|
66
|
-
|
67
|
-
# @return [PublicIPAddresses] public_ipaddresses
|
68
|
-
attr_reader :public_ipaddresses
|
69
|
-
|
70
39
|
# @return [RouteTables] route_tables
|
71
40
|
attr_reader :route_tables
|
72
41
|
|
73
42
|
# @return [Routes] routes
|
74
43
|
attr_reader :routes
|
75
44
|
|
45
|
+
# @return [PublicIPAddresses] public_ipaddresses
|
46
|
+
attr_reader :public_ipaddresses
|
47
|
+
|
48
|
+
# @return [NetworkSecurityGroups] network_security_groups
|
49
|
+
attr_reader :network_security_groups
|
50
|
+
|
76
51
|
# @return [SecurityRules] security_rules
|
77
52
|
attr_reader :security_rules
|
78
53
|
|
54
|
+
# @return [LoadBalancers] load_balancers
|
55
|
+
attr_reader :load_balancers
|
56
|
+
|
57
|
+
# @return [VirtualNetworks] virtual_networks
|
58
|
+
attr_reader :virtual_networks
|
59
|
+
|
79
60
|
# @return [Subnets] subnets
|
80
61
|
attr_reader :subnets
|
81
62
|
|
82
63
|
# @return [VirtualNetworkPeerings] virtual_network_peerings
|
83
64
|
attr_reader :virtual_network_peerings
|
84
65
|
|
66
|
+
# @return [NetworkInterfaces] network_interfaces
|
67
|
+
attr_reader :network_interfaces
|
68
|
+
|
85
69
|
# @return [Usages] usages
|
86
70
|
attr_reader :usages
|
87
71
|
|
72
|
+
# @return [VirtualNetworkGateways] virtual_network_gateways
|
73
|
+
attr_reader :virtual_network_gateways
|
74
|
+
|
88
75
|
# @return [VirtualNetworkGatewayConnections]
|
89
76
|
# virtual_network_gateway_connections
|
90
77
|
attr_reader :virtual_network_gateway_connections
|
91
78
|
|
92
|
-
# @return [
|
93
|
-
attr_reader :
|
79
|
+
# @return [LocalNetworkGateways] local_network_gateways
|
80
|
+
attr_reader :local_network_gateways
|
94
81
|
|
95
|
-
# @return [
|
96
|
-
|
82
|
+
# @return [ExpressRouteCircuitAuthorizations]
|
83
|
+
# express_route_circuit_authorizations
|
84
|
+
attr_reader :express_route_circuit_authorizations
|
85
|
+
|
86
|
+
# @return [ExpressRouteCircuitPeerings] express_route_circuit_peerings
|
87
|
+
attr_reader :express_route_circuit_peerings
|
88
|
+
|
89
|
+
# @return [ExpressRouteCircuits] express_route_circuits
|
90
|
+
attr_reader :express_route_circuits
|
91
|
+
|
92
|
+
# @return [ExpressRouteServiceProviders] express_route_service_providers
|
93
|
+
attr_reader :express_route_service_providers
|
94
|
+
|
95
|
+
# @return [RouteFilters] route_filters
|
96
|
+
attr_reader :route_filters
|
97
|
+
|
98
|
+
# @return [RouteFilterRules] route_filter_rules
|
99
|
+
attr_reader :route_filter_rules
|
100
|
+
|
101
|
+
# @return [BgpServiceCommunities] bgp_service_communities
|
102
|
+
attr_reader :bgp_service_communities
|
97
103
|
|
98
104
|
#
|
99
105
|
# Creates initializes a new instance of the NetworkManagementClient class.
|
@@ -101,34 +107,35 @@ module Azure::ARM::Network
|
|
101
107
|
# @param base_url [String] the base URI of the service.
|
102
108
|
# @param options [Array] filters to be applied to the HTTP requests.
|
103
109
|
#
|
104
|
-
def initialize(credentials, base_url = nil, options = nil)
|
110
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
105
111
|
super(credentials, options)
|
106
112
|
@base_url = base_url || 'https://management.azure.com'
|
107
113
|
|
108
|
-
fail ArgumentError, 'credentials
|
109
|
-
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
|
114
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
110
115
|
@credentials = credentials
|
111
116
|
|
112
117
|
@application_gateways = ApplicationGateways.new(self)
|
113
|
-
@express_route_circuit_authorizations = ExpressRouteCircuitAuthorizations.new(self)
|
114
|
-
@express_route_circuit_peerings = ExpressRouteCircuitPeerings.new(self)
|
115
|
-
@express_route_circuits = ExpressRouteCircuits.new(self)
|
116
|
-
@express_route_service_providers = ExpressRouteServiceProviders.new(self)
|
117
|
-
@load_balancers = LoadBalancers.new(self)
|
118
|
-
@local_network_gateways = LocalNetworkGateways.new(self)
|
119
|
-
@network_interfaces = NetworkInterfaces.new(self)
|
120
|
-
@network_security_groups = NetworkSecurityGroups.new(self)
|
121
|
-
@public_ipaddresses = PublicIPAddresses.new(self)
|
122
118
|
@route_tables = RouteTables.new(self)
|
123
119
|
@routes = Routes.new(self)
|
120
|
+
@public_ipaddresses = PublicIPAddresses.new(self)
|
121
|
+
@network_security_groups = NetworkSecurityGroups.new(self)
|
124
122
|
@security_rules = SecurityRules.new(self)
|
123
|
+
@load_balancers = LoadBalancers.new(self)
|
124
|
+
@virtual_networks = VirtualNetworks.new(self)
|
125
125
|
@subnets = Subnets.new(self)
|
126
126
|
@virtual_network_peerings = VirtualNetworkPeerings.new(self)
|
127
|
+
@network_interfaces = NetworkInterfaces.new(self)
|
127
128
|
@usages = Usages.new(self)
|
128
|
-
@virtual_network_gateway_connections = VirtualNetworkGatewayConnections.new(self)
|
129
129
|
@virtual_network_gateways = VirtualNetworkGateways.new(self)
|
130
|
-
@
|
131
|
-
@
|
130
|
+
@virtual_network_gateway_connections = VirtualNetworkGatewayConnections.new(self)
|
131
|
+
@local_network_gateways = LocalNetworkGateways.new(self)
|
132
|
+
@express_route_circuit_authorizations = ExpressRouteCircuitAuthorizations.new(self)
|
133
|
+
@express_route_circuit_peerings = ExpressRouteCircuitPeerings.new(self)
|
134
|
+
@express_route_circuits = ExpressRouteCircuits.new(self)
|
135
|
+
@express_route_service_providers = ExpressRouteServiceProviders.new(self)
|
136
|
+
@route_filters = RouteFilters.new(self)
|
137
|
+
@route_filter_rules = RouteFilterRules.new(self)
|
138
|
+
@bgp_service_communities = BgpServiceCommunities.new(self)
|
132
139
|
@accept_language = 'en-US'
|
133
140
|
@long_running_operation_retry_timeout = 30
|
134
141
|
@generate_client_request_id = true
|
@@ -137,7 +144,7 @@ module Azure::ARM::Network
|
|
137
144
|
|
138
145
|
#
|
139
146
|
# Makes a request and returns the body of the response.
|
140
|
-
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
147
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
141
148
|
# @param path [String] the path, relative to {base_url}.
|
142
149
|
# @param options [Hash{String=>String}] specifying any request options like :body.
|
143
150
|
# @return [Hash{String=>String}] containing the body of the response.
|
@@ -234,7 +241,7 @@ module Azure::ARM::Network
|
|
234
241
|
#
|
235
242
|
def check_dns_name_availability_async(location, domain_name_label = nil, custom_headers = nil)
|
236
243
|
fail ArgumentError, 'location is nil' if location.nil?
|
237
|
-
|
244
|
+
api_version = '2016-09-01'
|
238
245
|
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
239
246
|
|
240
247
|
|
@@ -291,7 +298,7 @@ module Azure::ARM::Network
|
|
291
298
|
def add_telemetry
|
292
299
|
sdk_information = 'azure_mgmt_network'
|
293
300
|
if defined? Azure::ARM::Network::VERSION
|
294
|
-
sdk_information = "#{sdk_information}/#{Azure::ARM::Network::VERSION}"
|
301
|
+
sdk_information = "#{sdk_information}/#{Azure::ARM::Network::VERSION}"
|
295
302
|
end
|
296
303
|
add_user_agent_information(sdk_information)
|
297
304
|
end
|
@@ -5,10 +5,7 @@
|
|
5
5
|
|
6
6
|
module Azure::ARM::Network
|
7
7
|
#
|
8
|
-
#
|
9
|
-
# services that interact with Microsoft Azure Networks service to manage your
|
10
|
-
# network resources. The API has entities that capture the relationship
|
11
|
-
# between an end user and the Microsoft Azure Networks service.
|
8
|
+
# Composite Swagger for Network Client
|
12
9
|
#
|
13
10
|
class NetworkSecurityGroups
|
14
11
|
include Azure::ARM::Network::Models
|
@@ -113,7 +110,7 @@ module Azure::ARM::Network
|
|
113
110
|
def get_async(resource_group_name, network_security_group_name, expand = nil, custom_headers = nil)
|
114
111
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
115
112
|
fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
|
116
|
-
|
113
|
+
api_version = '2016-09-01'
|
117
114
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
118
115
|
|
119
116
|
|
@@ -129,7 +126,7 @@ module Azure::ARM::Network
|
|
129
126
|
options = {
|
130
127
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
131
128
|
path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id},
|
132
|
-
query_params: {'api-version' =>
|
129
|
+
query_params: {'api-version' => api_version,'$expand' => expand},
|
133
130
|
headers: request_headers.merge(custom_headers || {}),
|
134
131
|
base_url: request_url
|
135
132
|
}
|
@@ -244,7 +241,7 @@ module Azure::ARM::Network
|
|
244
241
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
245
242
|
#
|
246
243
|
def list_all_async(custom_headers = nil)
|
247
|
-
|
244
|
+
api_version = '2016-09-01'
|
248
245
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
249
246
|
|
250
247
|
|
@@ -260,7 +257,7 @@ module Azure::ARM::Network
|
|
260
257
|
options = {
|
261
258
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
262
259
|
path_params: {'subscriptionId' => @client.subscription_id},
|
263
|
-
query_params: {'api-version' =>
|
260
|
+
query_params: {'api-version' => api_version},
|
264
261
|
headers: request_headers.merge(custom_headers || {}),
|
265
262
|
base_url: request_url
|
266
263
|
}
|
@@ -331,7 +328,7 @@ module Azure::ARM::Network
|
|
331
328
|
#
|
332
329
|
def list_async(resource_group_name, custom_headers = nil)
|
333
330
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
334
|
-
|
331
|
+
api_version = '2016-09-01'
|
335
332
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
336
333
|
|
337
334
|
|
@@ -347,7 +344,7 @@ module Azure::ARM::Network
|
|
347
344
|
options = {
|
348
345
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
349
346
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
350
|
-
query_params: {'api-version' =>
|
347
|
+
query_params: {'api-version' => api_version},
|
351
348
|
headers: request_headers.merge(custom_headers || {}),
|
352
349
|
base_url: request_url
|
353
350
|
}
|
@@ -424,7 +421,7 @@ module Azure::ARM::Network
|
|
424
421
|
def begin_delete_async(resource_group_name, network_security_group_name, custom_headers = nil)
|
425
422
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
426
423
|
fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
|
427
|
-
|
424
|
+
api_version = '2016-09-01'
|
428
425
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
429
426
|
|
430
427
|
|
@@ -440,7 +437,7 @@ module Azure::ARM::Network
|
|
440
437
|
options = {
|
441
438
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
442
439
|
path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id},
|
443
|
-
query_params: {'api-version' =>
|
440
|
+
query_params: {'api-version' => api_version},
|
444
441
|
headers: request_headers.merge(custom_headers || {}),
|
445
442
|
base_url: request_url
|
446
443
|
}
|
@@ -515,7 +512,7 @@ module Azure::ARM::Network
|
|
515
512
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
516
513
|
fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
|
517
514
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
518
|
-
|
515
|
+
api_version = '2016-09-01'
|
519
516
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
520
517
|
|
521
518
|
|
@@ -539,7 +536,7 @@ module Azure::ARM::Network
|
|
539
536
|
options = {
|
540
537
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
541
538
|
path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id},
|
542
|
-
query_params: {'api-version' =>
|
539
|
+
query_params: {'api-version' => api_version},
|
543
540
|
body: request_content,
|
544
541
|
headers: request_headers.merge(custom_headers || {}),
|
545
542
|
base_url: request_url
|
@@ -5,10 +5,7 @@
|
|
5
5
|
|
6
6
|
module Azure::ARM::Network
|
7
7
|
#
|
8
|
-
#
|
9
|
-
# services that interact with Microsoft Azure Networks service to manage your
|
10
|
-
# network resources. The API has entities that capture the relationship
|
11
|
-
# between an end user and the Microsoft Azure Networks service.
|
8
|
+
# Composite Swagger for Network Client
|
12
9
|
#
|
13
10
|
class PublicIPAddresses
|
14
11
|
include Azure::ARM::Network::Models
|
@@ -108,7 +105,7 @@ module Azure::ARM::Network
|
|
108
105
|
def get_async(resource_group_name, public_ip_address_name, expand = nil, custom_headers = nil)
|
109
106
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
110
107
|
fail ArgumentError, 'public_ip_address_name is nil' if public_ip_address_name.nil?
|
111
|
-
|
108
|
+
api_version = '2016-09-01'
|
112
109
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
113
110
|
|
114
111
|
|
@@ -124,7 +121,7 @@ module Azure::ARM::Network
|
|
124
121
|
options = {
|
125
122
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
126
123
|
path_params: {'resourceGroupName' => resource_group_name,'publicIpAddressName' => public_ip_address_name,'subscriptionId' => @client.subscription_id},
|
127
|
-
query_params: {'api-version' =>
|
124
|
+
query_params: {'api-version' => api_version,'$expand' => expand},
|
128
125
|
headers: request_headers.merge(custom_headers || {}),
|
129
126
|
base_url: request_url
|
130
127
|
}
|
@@ -237,7 +234,7 @@ module Azure::ARM::Network
|
|
237
234
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
238
235
|
#
|
239
236
|
def list_all_async(custom_headers = nil)
|
240
|
-
|
237
|
+
api_version = '2016-09-01'
|
241
238
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
242
239
|
|
243
240
|
|
@@ -253,7 +250,7 @@ module Azure::ARM::Network
|
|
253
250
|
options = {
|
254
251
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
255
252
|
path_params: {'subscriptionId' => @client.subscription_id},
|
256
|
-
query_params: {'api-version' =>
|
253
|
+
query_params: {'api-version' => api_version},
|
257
254
|
headers: request_headers.merge(custom_headers || {}),
|
258
255
|
base_url: request_url
|
259
256
|
}
|
@@ -324,7 +321,7 @@ module Azure::ARM::Network
|
|
324
321
|
#
|
325
322
|
def list_async(resource_group_name, custom_headers = nil)
|
326
323
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
327
|
-
|
324
|
+
api_version = '2016-09-01'
|
328
325
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
329
326
|
|
330
327
|
|
@@ -340,7 +337,7 @@ module Azure::ARM::Network
|
|
340
337
|
options = {
|
341
338
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
342
339
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
343
|
-
query_params: {'api-version' =>
|
340
|
+
query_params: {'api-version' => api_version},
|
344
341
|
headers: request_headers.merge(custom_headers || {}),
|
345
342
|
base_url: request_url
|
346
343
|
}
|
@@ -414,7 +411,7 @@ module Azure::ARM::Network
|
|
414
411
|
def begin_delete_async(resource_group_name, public_ip_address_name, custom_headers = nil)
|
415
412
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
416
413
|
fail ArgumentError, 'public_ip_address_name is nil' if public_ip_address_name.nil?
|
417
|
-
|
414
|
+
api_version = '2016-09-01'
|
418
415
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
419
416
|
|
420
417
|
|
@@ -430,7 +427,7 @@ module Azure::ARM::Network
|
|
430
427
|
options = {
|
431
428
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
432
429
|
path_params: {'resourceGroupName' => resource_group_name,'publicIpAddressName' => public_ip_address_name,'subscriptionId' => @client.subscription_id},
|
433
|
-
query_params: {'api-version' =>
|
430
|
+
query_params: {'api-version' => api_version},
|
434
431
|
headers: request_headers.merge(custom_headers || {}),
|
435
432
|
base_url: request_url
|
436
433
|
}
|
@@ -502,7 +499,7 @@ module Azure::ARM::Network
|
|
502
499
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
503
500
|
fail ArgumentError, 'public_ip_address_name is nil' if public_ip_address_name.nil?
|
504
501
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
505
|
-
|
502
|
+
api_version = '2016-09-01'
|
506
503
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
507
504
|
|
508
505
|
|
@@ -526,7 +523,7 @@ module Azure::ARM::Network
|
|
526
523
|
options = {
|
527
524
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
528
525
|
path_params: {'resourceGroupName' => resource_group_name,'publicIpAddressName' => public_ip_address_name,'subscriptionId' => @client.subscription_id},
|
529
|
-
query_params: {'api-version' =>
|
526
|
+
query_params: {'api-version' => api_version},
|
530
527
|
body: request_content,
|
531
528
|
headers: request_headers.merge(custom_headers || {}),
|
532
529
|
base_url: request_url
|
@@ -0,0 +1,773 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Network
|
7
|
+
#
|
8
|
+
# Composite Swagger for Network Client
|
9
|
+
#
|
10
|
+
class RouteFilterRules
|
11
|
+
include Azure::ARM::Network::Models
|
12
|
+
include MsRestAzure
|
13
|
+
|
14
|
+
#
|
15
|
+
# Creates and initializes a new instance of the RouteFilterRules class.
|
16
|
+
# @param client service class for accessing basic functionality.
|
17
|
+
#
|
18
|
+
def initialize(client)
|
19
|
+
@client = client
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [NetworkManagementClient] reference to the NetworkManagementClient
|
23
|
+
attr_reader :client
|
24
|
+
|
25
|
+
#
|
26
|
+
# Deletes the specified rule from a route filter.
|
27
|
+
#
|
28
|
+
# @param resource_group_name [String] The name of the resource group.
|
29
|
+
# @param route_filter_name [String] The name of the route filter.
|
30
|
+
# @param rule_name [String] The name of the rule.
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
def delete(resource_group_name, route_filter_name, rule_name, custom_headers = nil)
|
35
|
+
response = delete_async(resource_group_name, route_filter_name, rule_name, custom_headers).value!
|
36
|
+
nil
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# @param resource_group_name [String] The name of the resource group.
|
41
|
+
# @param route_filter_name [String] The name of the route filter.
|
42
|
+
# @param rule_name [String] The name of the rule.
|
43
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
44
|
+
# will be added to the HTTP request.
|
45
|
+
#
|
46
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
47
|
+
# response.
|
48
|
+
#
|
49
|
+
def delete_async(resource_group_name, route_filter_name, rule_name, custom_headers = nil)
|
50
|
+
# Send request
|
51
|
+
promise = begin_delete_async(resource_group_name, route_filter_name, rule_name, custom_headers)
|
52
|
+
|
53
|
+
promise = promise.then do |response|
|
54
|
+
# Defining deserialization method.
|
55
|
+
deserialize_method = lambda do |parsed_response|
|
56
|
+
end
|
57
|
+
|
58
|
+
# Waiting for response.
|
59
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
60
|
+
end
|
61
|
+
|
62
|
+
promise
|
63
|
+
end
|
64
|
+
|
65
|
+
#
|
66
|
+
# Gets the specified rule from a route filter.
|
67
|
+
#
|
68
|
+
# @param resource_group_name [String] The name of the resource group.
|
69
|
+
# @param route_filter_name [String] The name of the route filter.
|
70
|
+
# @param rule_name [String] The name of the rule.
|
71
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
72
|
+
# will be added to the HTTP request.
|
73
|
+
#
|
74
|
+
# @return [RouteFilterRule] operation results.
|
75
|
+
#
|
76
|
+
def get(resource_group_name, route_filter_name, rule_name, custom_headers = nil)
|
77
|
+
response = get_async(resource_group_name, route_filter_name, rule_name, custom_headers).value!
|
78
|
+
response.body unless response.nil?
|
79
|
+
end
|
80
|
+
|
81
|
+
#
|
82
|
+
# Gets the specified rule from a route filter.
|
83
|
+
#
|
84
|
+
# @param resource_group_name [String] The name of the resource group.
|
85
|
+
# @param route_filter_name [String] The name of the route filter.
|
86
|
+
# @param rule_name [String] The name of the rule.
|
87
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
88
|
+
# will be added to the HTTP request.
|
89
|
+
#
|
90
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
91
|
+
#
|
92
|
+
def get_with_http_info(resource_group_name, route_filter_name, rule_name, custom_headers = nil)
|
93
|
+
get_async(resource_group_name, route_filter_name, rule_name, custom_headers).value!
|
94
|
+
end
|
95
|
+
|
96
|
+
#
|
97
|
+
# Gets the specified rule from a route filter.
|
98
|
+
#
|
99
|
+
# @param resource_group_name [String] The name of the resource group.
|
100
|
+
# @param route_filter_name [String] The name of the route filter.
|
101
|
+
# @param rule_name [String] The name of the rule.
|
102
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
103
|
+
# to the HTTP request.
|
104
|
+
#
|
105
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
106
|
+
#
|
107
|
+
def get_async(resource_group_name, route_filter_name, rule_name, custom_headers = nil)
|
108
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
109
|
+
fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil?
|
110
|
+
fail ArgumentError, 'rule_name is nil' if rule_name.nil?
|
111
|
+
api_version = '2016-12-01'
|
112
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
113
|
+
|
114
|
+
|
115
|
+
request_headers = {}
|
116
|
+
|
117
|
+
# Set Headers
|
118
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
119
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
120
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'
|
121
|
+
|
122
|
+
request_url = @base_url || @client.base_url
|
123
|
+
|
124
|
+
options = {
|
125
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
126
|
+
path_params: {'resourceGroupName' => resource_group_name,'routeFilterName' => route_filter_name,'ruleName' => rule_name,'subscriptionId' => @client.subscription_id},
|
127
|
+
query_params: {'api-version' => api_version},
|
128
|
+
headers: request_headers.merge(custom_headers || {}),
|
129
|
+
base_url: request_url
|
130
|
+
}
|
131
|
+
promise = @client.make_request_async(:get, path_template, options)
|
132
|
+
|
133
|
+
promise = promise.then do |result|
|
134
|
+
http_response = result.response
|
135
|
+
status_code = http_response.status
|
136
|
+
response_content = http_response.body
|
137
|
+
unless status_code == 200
|
138
|
+
error_model = JSON.load(response_content)
|
139
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
140
|
+
end
|
141
|
+
|
142
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
143
|
+
# Deserialize Response
|
144
|
+
if status_code == 200
|
145
|
+
begin
|
146
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
147
|
+
result_mapper = RouteFilterRule.mapper()
|
148
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
149
|
+
rescue Exception => e
|
150
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
result
|
155
|
+
end
|
156
|
+
|
157
|
+
promise.execute
|
158
|
+
end
|
159
|
+
|
160
|
+
#
|
161
|
+
# Creates or updates a route in the specified route filter.
|
162
|
+
#
|
163
|
+
# @param resource_group_name [String] The name of the resource group.
|
164
|
+
# @param route_filter_name [String] The name of the route filter.
|
165
|
+
# @param rule_name [String] The name of the route filter rule.
|
166
|
+
# @param route_filter_rule_parameters [RouteFilterRule] Parameters supplied to
|
167
|
+
# the create or update route filter rule operation.
|
168
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
169
|
+
# will be added to the HTTP request.
|
170
|
+
#
|
171
|
+
# @return [RouteFilterRule] operation results.
|
172
|
+
#
|
173
|
+
def create_or_update(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
174
|
+
response = create_or_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers).value!
|
175
|
+
response.body unless response.nil?
|
176
|
+
end
|
177
|
+
|
178
|
+
#
|
179
|
+
# @param resource_group_name [String] The name of the resource group.
|
180
|
+
# @param route_filter_name [String] The name of the route filter.
|
181
|
+
# @param rule_name [String] The name of the route filter rule.
|
182
|
+
# @param route_filter_rule_parameters [RouteFilterRule] Parameters supplied to
|
183
|
+
# the create or update route filter rule operation.
|
184
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
185
|
+
# will be added to the HTTP request.
|
186
|
+
#
|
187
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
188
|
+
# response.
|
189
|
+
#
|
190
|
+
def create_or_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
191
|
+
# Send request
|
192
|
+
promise = begin_create_or_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers)
|
193
|
+
|
194
|
+
promise = promise.then do |response|
|
195
|
+
# Defining deserialization method.
|
196
|
+
deserialize_method = lambda do |parsed_response|
|
197
|
+
result_mapper = RouteFilterRule.mapper()
|
198
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
199
|
+
end
|
200
|
+
|
201
|
+
# Waiting for response.
|
202
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
203
|
+
end
|
204
|
+
|
205
|
+
promise
|
206
|
+
end
|
207
|
+
|
208
|
+
#
|
209
|
+
# Updates a route in the specified route filter.
|
210
|
+
#
|
211
|
+
# @param resource_group_name [String] The name of the resource group.
|
212
|
+
# @param route_filter_name [String] The name of the route filter.
|
213
|
+
# @param rule_name [String] The name of the route filter rule.
|
214
|
+
# @param route_filter_rule_parameters [PatchRouteFilterRule] Parameters
|
215
|
+
# supplied to the update route filter rule operation.
|
216
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
217
|
+
# will be added to the HTTP request.
|
218
|
+
#
|
219
|
+
# @return [RouteFilterRule] operation results.
|
220
|
+
#
|
221
|
+
def update(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
222
|
+
response = update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers).value!
|
223
|
+
response.body unless response.nil?
|
224
|
+
end
|
225
|
+
|
226
|
+
#
|
227
|
+
# @param resource_group_name [String] The name of the resource group.
|
228
|
+
# @param route_filter_name [String] The name of the route filter.
|
229
|
+
# @param rule_name [String] The name of the route filter rule.
|
230
|
+
# @param route_filter_rule_parameters [PatchRouteFilterRule] Parameters
|
231
|
+
# supplied to the update route filter rule operation.
|
232
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
233
|
+
# will be added to the HTTP request.
|
234
|
+
#
|
235
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
236
|
+
# response.
|
237
|
+
#
|
238
|
+
def update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
239
|
+
# Send request
|
240
|
+
promise = begin_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers)
|
241
|
+
|
242
|
+
promise = promise.then do |response|
|
243
|
+
# Defining deserialization method.
|
244
|
+
deserialize_method = lambda do |parsed_response|
|
245
|
+
result_mapper = RouteFilterRule.mapper()
|
246
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
247
|
+
end
|
248
|
+
|
249
|
+
# Waiting for response.
|
250
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
251
|
+
end
|
252
|
+
|
253
|
+
promise
|
254
|
+
end
|
255
|
+
|
256
|
+
#
|
257
|
+
# Gets all RouteFilterRules in a route filter.
|
258
|
+
#
|
259
|
+
# @param resource_group_name [String] The name of the resource group.
|
260
|
+
# @param route_filter_name [String] The name of the route filter.
|
261
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
262
|
+
# will be added to the HTTP request.
|
263
|
+
#
|
264
|
+
# @return [Array<RouteFilterRule>] operation results.
|
265
|
+
#
|
266
|
+
def list_by_route_filter(resource_group_name, route_filter_name, custom_headers = nil)
|
267
|
+
first_page = list_by_route_filter_as_lazy(resource_group_name, route_filter_name, custom_headers)
|
268
|
+
first_page.get_all_items
|
269
|
+
end
|
270
|
+
|
271
|
+
#
|
272
|
+
# Gets all RouteFilterRules in a route filter.
|
273
|
+
#
|
274
|
+
# @param resource_group_name [String] The name of the resource group.
|
275
|
+
# @param route_filter_name [String] The name of the route filter.
|
276
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
277
|
+
# will be added to the HTTP request.
|
278
|
+
#
|
279
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
280
|
+
#
|
281
|
+
def list_by_route_filter_with_http_info(resource_group_name, route_filter_name, custom_headers = nil)
|
282
|
+
list_by_route_filter_async(resource_group_name, route_filter_name, custom_headers).value!
|
283
|
+
end
|
284
|
+
|
285
|
+
#
|
286
|
+
# Gets all RouteFilterRules in a route filter.
|
287
|
+
#
|
288
|
+
# @param resource_group_name [String] The name of the resource group.
|
289
|
+
# @param route_filter_name [String] The name of the route filter.
|
290
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
291
|
+
# to the HTTP request.
|
292
|
+
#
|
293
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
294
|
+
#
|
295
|
+
def list_by_route_filter_async(resource_group_name, route_filter_name, custom_headers = nil)
|
296
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
297
|
+
fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil?
|
298
|
+
api_version = '2016-12-01'
|
299
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
300
|
+
|
301
|
+
|
302
|
+
request_headers = {}
|
303
|
+
|
304
|
+
# Set Headers
|
305
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
306
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
307
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules'
|
308
|
+
|
309
|
+
request_url = @base_url || @client.base_url
|
310
|
+
|
311
|
+
options = {
|
312
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
313
|
+
path_params: {'resourceGroupName' => resource_group_name,'routeFilterName' => route_filter_name,'subscriptionId' => @client.subscription_id},
|
314
|
+
query_params: {'api-version' => api_version},
|
315
|
+
headers: request_headers.merge(custom_headers || {}),
|
316
|
+
base_url: request_url
|
317
|
+
}
|
318
|
+
promise = @client.make_request_async(:get, path_template, options)
|
319
|
+
|
320
|
+
promise = promise.then do |result|
|
321
|
+
http_response = result.response
|
322
|
+
status_code = http_response.status
|
323
|
+
response_content = http_response.body
|
324
|
+
unless status_code == 200
|
325
|
+
error_model = JSON.load(response_content)
|
326
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
327
|
+
end
|
328
|
+
|
329
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
330
|
+
# Deserialize Response
|
331
|
+
if status_code == 200
|
332
|
+
begin
|
333
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
334
|
+
result_mapper = RouteFilterRuleListResult.mapper()
|
335
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
336
|
+
rescue Exception => e
|
337
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
result
|
342
|
+
end
|
343
|
+
|
344
|
+
promise.execute
|
345
|
+
end
|
346
|
+
|
347
|
+
#
|
348
|
+
# Deletes the specified rule from a route filter.
|
349
|
+
#
|
350
|
+
# @param resource_group_name [String] The name of the resource group.
|
351
|
+
# @param route_filter_name [String] The name of the route filter.
|
352
|
+
# @param rule_name [String] The name of the rule.
|
353
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
354
|
+
# will be added to the HTTP request.
|
355
|
+
#
|
356
|
+
#
|
357
|
+
def begin_delete(resource_group_name, route_filter_name, rule_name, custom_headers = nil)
|
358
|
+
response = begin_delete_async(resource_group_name, route_filter_name, rule_name, custom_headers).value!
|
359
|
+
nil
|
360
|
+
end
|
361
|
+
|
362
|
+
#
|
363
|
+
# Deletes the specified rule from a route filter.
|
364
|
+
#
|
365
|
+
# @param resource_group_name [String] The name of the resource group.
|
366
|
+
# @param route_filter_name [String] The name of the route filter.
|
367
|
+
# @param rule_name [String] The name of the rule.
|
368
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
369
|
+
# will be added to the HTTP request.
|
370
|
+
#
|
371
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
372
|
+
#
|
373
|
+
def begin_delete_with_http_info(resource_group_name, route_filter_name, rule_name, custom_headers = nil)
|
374
|
+
begin_delete_async(resource_group_name, route_filter_name, rule_name, custom_headers).value!
|
375
|
+
end
|
376
|
+
|
377
|
+
#
|
378
|
+
# Deletes the specified rule from a route filter.
|
379
|
+
#
|
380
|
+
# @param resource_group_name [String] The name of the resource group.
|
381
|
+
# @param route_filter_name [String] The name of the route filter.
|
382
|
+
# @param rule_name [String] The name of the rule.
|
383
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
384
|
+
# to the HTTP request.
|
385
|
+
#
|
386
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
387
|
+
#
|
388
|
+
def begin_delete_async(resource_group_name, route_filter_name, rule_name, custom_headers = nil)
|
389
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
390
|
+
fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil?
|
391
|
+
fail ArgumentError, 'rule_name is nil' if rule_name.nil?
|
392
|
+
api_version = '2016-12-01'
|
393
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
394
|
+
|
395
|
+
|
396
|
+
request_headers = {}
|
397
|
+
|
398
|
+
# Set Headers
|
399
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
400
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
401
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'
|
402
|
+
|
403
|
+
request_url = @base_url || @client.base_url
|
404
|
+
|
405
|
+
options = {
|
406
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
407
|
+
path_params: {'resourceGroupName' => resource_group_name,'routeFilterName' => route_filter_name,'ruleName' => rule_name,'subscriptionId' => @client.subscription_id},
|
408
|
+
query_params: {'api-version' => api_version},
|
409
|
+
headers: request_headers.merge(custom_headers || {}),
|
410
|
+
base_url: request_url
|
411
|
+
}
|
412
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
413
|
+
|
414
|
+
promise = promise.then do |result|
|
415
|
+
http_response = result.response
|
416
|
+
status_code = http_response.status
|
417
|
+
response_content = http_response.body
|
418
|
+
unless status_code == 202 || status_code == 200 || status_code == 204
|
419
|
+
error_model = JSON.load(response_content)
|
420
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
421
|
+
end
|
422
|
+
|
423
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
424
|
+
|
425
|
+
result
|
426
|
+
end
|
427
|
+
|
428
|
+
promise.execute
|
429
|
+
end
|
430
|
+
|
431
|
+
#
|
432
|
+
# Creates or updates a route in the specified route filter.
|
433
|
+
#
|
434
|
+
# @param resource_group_name [String] The name of the resource group.
|
435
|
+
# @param route_filter_name [String] The name of the route filter.
|
436
|
+
# @param rule_name [String] The name of the route filter rule.
|
437
|
+
# @param route_filter_rule_parameters [RouteFilterRule] Parameters supplied to
|
438
|
+
# the create or update route filter rule operation.
|
439
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
440
|
+
# will be added to the HTTP request.
|
441
|
+
#
|
442
|
+
# @return [RouteFilterRule] operation results.
|
443
|
+
#
|
444
|
+
def begin_create_or_update(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
445
|
+
response = begin_create_or_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers).value!
|
446
|
+
response.body unless response.nil?
|
447
|
+
end
|
448
|
+
|
449
|
+
#
|
450
|
+
# Creates or updates a route in the specified route filter.
|
451
|
+
#
|
452
|
+
# @param resource_group_name [String] The name of the resource group.
|
453
|
+
# @param route_filter_name [String] The name of the route filter.
|
454
|
+
# @param rule_name [String] The name of the route filter rule.
|
455
|
+
# @param route_filter_rule_parameters [RouteFilterRule] Parameters supplied to
|
456
|
+
# the create or update route filter rule operation.
|
457
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
458
|
+
# will be added to the HTTP request.
|
459
|
+
#
|
460
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
461
|
+
#
|
462
|
+
def begin_create_or_update_with_http_info(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
463
|
+
begin_create_or_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers).value!
|
464
|
+
end
|
465
|
+
|
466
|
+
#
|
467
|
+
# Creates or updates a route in the specified route filter.
|
468
|
+
#
|
469
|
+
# @param resource_group_name [String] The name of the resource group.
|
470
|
+
# @param route_filter_name [String] The name of the route filter.
|
471
|
+
# @param rule_name [String] The name of the route filter rule.
|
472
|
+
# @param route_filter_rule_parameters [RouteFilterRule] Parameters supplied to
|
473
|
+
# the create or update route filter rule operation.
|
474
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
475
|
+
# to the HTTP request.
|
476
|
+
#
|
477
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
478
|
+
#
|
479
|
+
def begin_create_or_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
480
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
481
|
+
fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil?
|
482
|
+
fail ArgumentError, 'rule_name is nil' if rule_name.nil?
|
483
|
+
fail ArgumentError, 'route_filter_rule_parameters is nil' if route_filter_rule_parameters.nil?
|
484
|
+
api_version = '2016-12-01'
|
485
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
486
|
+
|
487
|
+
|
488
|
+
request_headers = {}
|
489
|
+
|
490
|
+
# Set Headers
|
491
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
492
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
493
|
+
|
494
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
495
|
+
|
496
|
+
# Serialize Request
|
497
|
+
request_mapper = RouteFilterRule.mapper()
|
498
|
+
request_content = @client.serialize(request_mapper, route_filter_rule_parameters, 'route_filter_rule_parameters')
|
499
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
500
|
+
|
501
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'
|
502
|
+
|
503
|
+
request_url = @base_url || @client.base_url
|
504
|
+
|
505
|
+
options = {
|
506
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
507
|
+
path_params: {'resourceGroupName' => resource_group_name,'routeFilterName' => route_filter_name,'ruleName' => rule_name,'subscriptionId' => @client.subscription_id},
|
508
|
+
query_params: {'api-version' => api_version},
|
509
|
+
body: request_content,
|
510
|
+
headers: request_headers.merge(custom_headers || {}),
|
511
|
+
base_url: request_url
|
512
|
+
}
|
513
|
+
promise = @client.make_request_async(:put, path_template, options)
|
514
|
+
|
515
|
+
promise = promise.then do |result|
|
516
|
+
http_response = result.response
|
517
|
+
status_code = http_response.status
|
518
|
+
response_content = http_response.body
|
519
|
+
unless status_code == 200 || status_code == 201
|
520
|
+
error_model = JSON.load(response_content)
|
521
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
522
|
+
end
|
523
|
+
|
524
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
525
|
+
# Deserialize Response
|
526
|
+
if status_code == 200
|
527
|
+
begin
|
528
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
529
|
+
result_mapper = RouteFilterRule.mapper()
|
530
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
531
|
+
rescue Exception => e
|
532
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
533
|
+
end
|
534
|
+
end
|
535
|
+
# Deserialize Response
|
536
|
+
if status_code == 201
|
537
|
+
begin
|
538
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
539
|
+
result_mapper = RouteFilterRule.mapper()
|
540
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
541
|
+
rescue Exception => e
|
542
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
543
|
+
end
|
544
|
+
end
|
545
|
+
|
546
|
+
result
|
547
|
+
end
|
548
|
+
|
549
|
+
promise.execute
|
550
|
+
end
|
551
|
+
|
552
|
+
#
|
553
|
+
# Updates a route in the specified route filter.
|
554
|
+
#
|
555
|
+
# @param resource_group_name [String] The name of the resource group.
|
556
|
+
# @param route_filter_name [String] The name of the route filter.
|
557
|
+
# @param rule_name [String] The name of the route filter rule.
|
558
|
+
# @param route_filter_rule_parameters [PatchRouteFilterRule] Parameters
|
559
|
+
# supplied to the update route filter rule operation.
|
560
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
561
|
+
# will be added to the HTTP request.
|
562
|
+
#
|
563
|
+
# @return [RouteFilterRule] operation results.
|
564
|
+
#
|
565
|
+
def begin_update(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
566
|
+
response = begin_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers).value!
|
567
|
+
response.body unless response.nil?
|
568
|
+
end
|
569
|
+
|
570
|
+
#
|
571
|
+
# Updates a route in the specified route filter.
|
572
|
+
#
|
573
|
+
# @param resource_group_name [String] The name of the resource group.
|
574
|
+
# @param route_filter_name [String] The name of the route filter.
|
575
|
+
# @param rule_name [String] The name of the route filter rule.
|
576
|
+
# @param route_filter_rule_parameters [PatchRouteFilterRule] Parameters
|
577
|
+
# supplied to the update route filter rule operation.
|
578
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
579
|
+
# will be added to the HTTP request.
|
580
|
+
#
|
581
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
582
|
+
#
|
583
|
+
def begin_update_with_http_info(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
584
|
+
begin_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers).value!
|
585
|
+
end
|
586
|
+
|
587
|
+
#
|
588
|
+
# Updates a route in the specified route filter.
|
589
|
+
#
|
590
|
+
# @param resource_group_name [String] The name of the resource group.
|
591
|
+
# @param route_filter_name [String] The name of the route filter.
|
592
|
+
# @param rule_name [String] The name of the route filter rule.
|
593
|
+
# @param route_filter_rule_parameters [PatchRouteFilterRule] Parameters
|
594
|
+
# supplied to the update route filter rule operation.
|
595
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
596
|
+
# to the HTTP request.
|
597
|
+
#
|
598
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
599
|
+
#
|
600
|
+
def begin_update_async(resource_group_name, route_filter_name, rule_name, route_filter_rule_parameters, custom_headers = nil)
|
601
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
602
|
+
fail ArgumentError, 'route_filter_name is nil' if route_filter_name.nil?
|
603
|
+
fail ArgumentError, 'rule_name is nil' if rule_name.nil?
|
604
|
+
fail ArgumentError, 'route_filter_rule_parameters is nil' if route_filter_rule_parameters.nil?
|
605
|
+
api_version = '2016-12-01'
|
606
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
607
|
+
|
608
|
+
|
609
|
+
request_headers = {}
|
610
|
+
|
611
|
+
# Set Headers
|
612
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
613
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
614
|
+
|
615
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
616
|
+
|
617
|
+
# Serialize Request
|
618
|
+
request_mapper = PatchRouteFilterRule.mapper()
|
619
|
+
request_content = @client.serialize(request_mapper, route_filter_rule_parameters, 'route_filter_rule_parameters')
|
620
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
621
|
+
|
622
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'
|
623
|
+
|
624
|
+
request_url = @base_url || @client.base_url
|
625
|
+
|
626
|
+
options = {
|
627
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
628
|
+
path_params: {'resourceGroupName' => resource_group_name,'routeFilterName' => route_filter_name,'ruleName' => rule_name,'subscriptionId' => @client.subscription_id},
|
629
|
+
query_params: {'api-version' => api_version},
|
630
|
+
body: request_content,
|
631
|
+
headers: request_headers.merge(custom_headers || {}),
|
632
|
+
base_url: request_url
|
633
|
+
}
|
634
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
635
|
+
|
636
|
+
promise = promise.then do |result|
|
637
|
+
http_response = result.response
|
638
|
+
status_code = http_response.status
|
639
|
+
response_content = http_response.body
|
640
|
+
unless status_code == 200
|
641
|
+
error_model = JSON.load(response_content)
|
642
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
643
|
+
end
|
644
|
+
|
645
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
646
|
+
# Deserialize Response
|
647
|
+
if status_code == 200
|
648
|
+
begin
|
649
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
650
|
+
result_mapper = RouteFilterRule.mapper()
|
651
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
652
|
+
rescue Exception => e
|
653
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
654
|
+
end
|
655
|
+
end
|
656
|
+
|
657
|
+
result
|
658
|
+
end
|
659
|
+
|
660
|
+
promise.execute
|
661
|
+
end
|
662
|
+
|
663
|
+
#
|
664
|
+
# Gets all RouteFilterRules in a route filter.
|
665
|
+
#
|
666
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
667
|
+
# to List operation.
|
668
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
669
|
+
# will be added to the HTTP request.
|
670
|
+
#
|
671
|
+
# @return [RouteFilterRuleListResult] operation results.
|
672
|
+
#
|
673
|
+
def list_by_route_filter_next(next_page_link, custom_headers = nil)
|
674
|
+
response = list_by_route_filter_next_async(next_page_link, custom_headers).value!
|
675
|
+
response.body unless response.nil?
|
676
|
+
end
|
677
|
+
|
678
|
+
#
|
679
|
+
# Gets all RouteFilterRules in a route filter.
|
680
|
+
#
|
681
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
682
|
+
# to List operation.
|
683
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
684
|
+
# will be added to the HTTP request.
|
685
|
+
#
|
686
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
687
|
+
#
|
688
|
+
def list_by_route_filter_next_with_http_info(next_page_link, custom_headers = nil)
|
689
|
+
list_by_route_filter_next_async(next_page_link, custom_headers).value!
|
690
|
+
end
|
691
|
+
|
692
|
+
#
|
693
|
+
# Gets all RouteFilterRules in a route filter.
|
694
|
+
#
|
695
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
696
|
+
# to List operation.
|
697
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
698
|
+
# to the HTTP request.
|
699
|
+
#
|
700
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
701
|
+
#
|
702
|
+
def list_by_route_filter_next_async(next_page_link, custom_headers = nil)
|
703
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
704
|
+
|
705
|
+
|
706
|
+
request_headers = {}
|
707
|
+
|
708
|
+
# Set Headers
|
709
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
710
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
711
|
+
path_template = '{nextLink}'
|
712
|
+
|
713
|
+
request_url = @base_url || @client.base_url
|
714
|
+
|
715
|
+
options = {
|
716
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
717
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
718
|
+
headers: request_headers.merge(custom_headers || {}),
|
719
|
+
base_url: request_url
|
720
|
+
}
|
721
|
+
promise = @client.make_request_async(:get, path_template, options)
|
722
|
+
|
723
|
+
promise = promise.then do |result|
|
724
|
+
http_response = result.response
|
725
|
+
status_code = http_response.status
|
726
|
+
response_content = http_response.body
|
727
|
+
unless status_code == 200
|
728
|
+
error_model = JSON.load(response_content)
|
729
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
730
|
+
end
|
731
|
+
|
732
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
733
|
+
# Deserialize Response
|
734
|
+
if status_code == 200
|
735
|
+
begin
|
736
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
737
|
+
result_mapper = RouteFilterRuleListResult.mapper()
|
738
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
739
|
+
rescue Exception => e
|
740
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
741
|
+
end
|
742
|
+
end
|
743
|
+
|
744
|
+
result
|
745
|
+
end
|
746
|
+
|
747
|
+
promise.execute
|
748
|
+
end
|
749
|
+
|
750
|
+
#
|
751
|
+
# Gets all RouteFilterRules in a route filter.
|
752
|
+
#
|
753
|
+
# @param resource_group_name [String] The name of the resource group.
|
754
|
+
# @param route_filter_name [String] The name of the route filter.
|
755
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
756
|
+
# will be added to the HTTP request.
|
757
|
+
#
|
758
|
+
# @return [RouteFilterRuleListResult] which provide lazy access to pages of the
|
759
|
+
# response.
|
760
|
+
#
|
761
|
+
def list_by_route_filter_as_lazy(resource_group_name, route_filter_name, custom_headers = nil)
|
762
|
+
response = list_by_route_filter_async(resource_group_name, route_filter_name, custom_headers).value!
|
763
|
+
unless response.nil?
|
764
|
+
page = response.body
|
765
|
+
page.next_method = Proc.new do |next_page_link|
|
766
|
+
list_by_route_filter_next_async(next_page_link, custom_headers)
|
767
|
+
end
|
768
|
+
page
|
769
|
+
end
|
770
|
+
end
|
771
|
+
|
772
|
+
end
|
773
|
+
end
|