azure_mgmt_network 0.7.0 → 0.8.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 +59 -52
- data/lib/generated/azure_mgmt_network/application_gateways.rb +426 -308
- data/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +181 -199
- data/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +175 -193
- data/lib/generated/azure_mgmt_network/express_route_circuits.rb +458 -497
- data/lib/generated/azure_mgmt_network/express_route_service_providers.rb +36 -43
- data/lib/generated/azure_mgmt_network/load_balancers.rb +225 -242
- data/lib/generated/azure_mgmt_network/local_network_gateways.rb +168 -191
- data/lib/generated/azure_mgmt_network/models/address_space.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/application_gateway.rb +42 -28
- data/lib/generated/azure_mgmt_network/models/application_gateway_authentication_certificate.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health.rb +52 -0
- data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb +66 -0
- data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb +65 -0
- data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb +67 -0
- data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb +18 -0
- data/lib/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +16 -13
- data/lib/generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/application_gateway_firewall_mode.rb +16 -0
- data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +13 -12
- data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/application_gateway_http_listener.rb +16 -14
- data/lib/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +7 -6
- data/lib/generated/azure_mgmt_network/models/application_gateway_list_result.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/application_gateway_operational_state.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/application_gateway_path_rule.rb +9 -9
- data/lib/generated/azure_mgmt_network/models/application_gateway_probe.rb +19 -12
- data/lib/generated/azure_mgmt_network/models/application_gateway_protocol.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +14 -11
- data/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/application_gateway_sku.rb +11 -8
- data/lib/generated/azure_mgmt_network/models/application_gateway_sku_name.rb +3 -1
- data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +12 -9
- data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb +4 -3
- data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_protocol.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/application_gateway_tier.rb +2 -1
- data/lib/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb +10 -9
- data/lib/generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb +57 -0
- data/lib/generated/azure_mgmt_network/models/authorization_list_result.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/authorization_use_status.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/azure_async_operation_result.rb +4 -3
- data/lib/generated/azure_mgmt_network/models/backend_address_pool.rb +11 -11
- data/lib/generated/azure_mgmt_network/models/bgp_settings.rb +7 -6
- data/lib/generated/azure_mgmt_network/models/connection_reset_shared_key.rb +8 -3
- data/lib/generated/azure_mgmt_network/models/connection_shared_key.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/dhcp_options.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/dns_name_availability_result.rb +3 -3
- data/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb +5 -6
- data/lib/generated/azure_mgmt_network/models/effective_network_security_group_association.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb +20 -17
- data/lib/generated/azure_mgmt_network/models/effective_route.rb +16 -13
- data/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/effective_route_source.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/effective_route_state.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/error.rb +2 -1
- data/lib/generated/azure_mgmt_network/models/error_details.rb +2 -1
- data/lib/generated/azure_mgmt_network/models/express_route_circuit.rb +20 -21
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb +10 -9
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb +26 -24
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb +10 -10
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_state.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_type.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku.rb +9 -7
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/express_route_circuit_stats.rb +2 -2
- data/lib/generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +5 -4
- data/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/express_route_service_provider.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/frontend_ipconfiguration.rb +18 -19
- data/lib/generated/azure_mgmt_network/models/inbound_nat_pool.rb +19 -27
- data/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb +25 -33
- data/lib/generated/azure_mgmt_network/models/ipaddress_availability_result.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/ipallocation_method.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/ipconfiguration.rb +12 -13
- data/lib/generated/azure_mgmt_network/models/ipversion.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/load_balancer.rb +31 -16
- data/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb +29 -38
- data/lib/generated/azure_mgmt_network/models/load_distribution.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/local_network_gateway.rb +11 -10
- data/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/network_interface.rb +31 -20
- data/lib/generated/azure_mgmt_network/models/network_interface_dns_settings.rb +18 -8
- data/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb +19 -16
- data/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/network_operation_status.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/network_security_group.rb +15 -15
- data/lib/generated/azure_mgmt_network/models/network_security_group_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/outbound_nat_rule.rb +12 -14
- data/lib/generated/azure_mgmt_network/models/probe.rb +27 -28
- data/lib/generated/azure_mgmt_network/models/probe_protocol.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/processor_architecture.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/public_ipaddress.rb +15 -15
- data/lib/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +15 -14
- data/lib/generated/azure_mgmt_network/models/public_ipaddress_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/resource_navigation_link.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/route.rb +13 -13
- data/lib/generated/azure_mgmt_network/models/route_list_result.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/route_next_hop_type.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/route_table.rb +8 -7
- data/lib/generated/azure_mgmt_network/models/route_table_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/security_rule.rb +33 -36
- data/lib/generated/azure_mgmt_network/models/security_rule_access.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/security_rule_direction.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/security_rule_list_result.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/security_rule_protocol.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/service_provider_provisioning_state.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/subnet.rb +14 -15
- data/lib/generated/azure_mgmt_network/models/subnet_list_result.rb +4 -4
- data/lib/generated/azure_mgmt_network/models/transport_protocol.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/tunnel_connection_health.rb +92 -0
- data/lib/generated/azure_mgmt_network/models/usage.rb +7 -7
- data/lib/generated/azure_mgmt_network/models/usage_name.rb +4 -5
- data/lib/generated/azure_mgmt_network/models/usages_list_result.rb +3 -3
- data/lib/generated/azure_mgmt_network/models/virtual_network.rb +15 -16
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb +26 -23
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb +45 -18
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +6 -5
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb +15 -14
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb +12 -10
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_type.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/virtual_network_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/virtual_network_peering.rb +21 -23
- data/lib/generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb +6 -6
- data/lib/generated/azure_mgmt_network/models/virtual_network_peering_state.rb +1 -1
- data/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb +5 -5
- data/lib/generated/azure_mgmt_network/models/vpn_client_parameters.rb +5 -4
- data/lib/generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +10 -9
- data/lib/generated/azure_mgmt_network/models/vpn_client_root_certificate.rb +10 -8
- data/lib/generated/azure_mgmt_network/models/vpn_type.rb +1 -1
- data/lib/generated/azure_mgmt_network/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_network/network_interfaces.rb +443 -478
- data/lib/generated/azure_mgmt_network/network_management_client.rb +20 -7
- data/lib/generated/azure_mgmt_network/network_security_groups.rb +224 -249
- data/lib/generated/azure_mgmt_network/public_ipaddresses.rb +220 -241
- data/lib/generated/azure_mgmt_network/route_tables.rb +219 -226
- data/lib/generated/azure_mgmt_network/routes.rb +171 -181
- data/lib/generated/azure_mgmt_network/security_rules.rb +175 -193
- data/lib/generated/azure_mgmt_network/subnets.rb +177 -181
- data/lib/generated/azure_mgmt_network/usages.rb +34 -34
- data/lib/generated/azure_mgmt_network/version.rb +2 -2
- data/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +335 -358
- data/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +246 -289
- data/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +177 -191
- data/lib/generated/azure_mgmt_network/virtual_networks.rb +242 -249
- metadata +12 -5
- data/lib/generated/azure_mgmt_network/models/connection_shared_key_result.rb +0 -44
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -17,12 +17,12 @@ module Azure::ARM::Network
|
|
17
17
|
# @return Credentials needed for the client to connect to Azure.
|
18
18
|
attr_reader :credentials
|
19
19
|
|
20
|
-
# @return [String]
|
20
|
+
# @return [String] The subscription credentials which uniquely identify the
|
21
21
|
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
22
22
|
# for every service call.
|
23
23
|
attr_accessor :subscription_id
|
24
24
|
|
25
|
-
# @return [String] Client
|
25
|
+
# @return [String] Client API version.
|
26
26
|
attr_reader :api_version
|
27
27
|
|
28
28
|
# @return [String] Gets or sets the preferred language for the response.
|
@@ -128,10 +128,11 @@ module Azure::ARM::Network
|
|
128
128
|
@virtual_network_gateway_connections = VirtualNetworkGatewayConnections.new(self)
|
129
129
|
@virtual_network_gateways = VirtualNetworkGateways.new(self)
|
130
130
|
@virtual_networks = VirtualNetworks.new(self)
|
131
|
-
@api_version = '2016-
|
131
|
+
@api_version = '2016-09-01'
|
132
132
|
@accept_language = 'en-US'
|
133
133
|
@long_running_operation_retry_timeout = 30
|
134
134
|
@generate_client_request_id = true
|
135
|
+
add_telemetry
|
135
136
|
end
|
136
137
|
|
137
138
|
#
|
@@ -192,7 +193,7 @@ module Azure::ARM::Network
|
|
192
193
|
#
|
193
194
|
# Checks whether a domain name in the cloudapp.net zone is available for use.
|
194
195
|
#
|
195
|
-
# @param location [String] The location of the domain name
|
196
|
+
# @param location [String] The location of the domain name.
|
196
197
|
# @param domain_name_label [String] The domain name to be verified. It must
|
197
198
|
# conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
|
198
199
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -208,7 +209,7 @@ module Azure::ARM::Network
|
|
208
209
|
#
|
209
210
|
# Checks whether a domain name in the cloudapp.net zone is available for use.
|
210
211
|
#
|
211
|
-
# @param location [String] The location of the domain name
|
212
|
+
# @param location [String] The location of the domain name.
|
212
213
|
# @param domain_name_label [String] The domain name to be verified. It must
|
213
214
|
# conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
|
214
215
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -223,7 +224,7 @@ module Azure::ARM::Network
|
|
223
224
|
#
|
224
225
|
# Checks whether a domain name in the cloudapp.net zone is available for use.
|
225
226
|
#
|
226
|
-
# @param location [String] The location of the domain name
|
227
|
+
# @param location [String] The location of the domain name.
|
227
228
|
# @param domain_name_label [String] The domain name to be verified. It must
|
228
229
|
# conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
|
229
230
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -282,5 +283,17 @@ module Azure::ARM::Network
|
|
282
283
|
promise.execute
|
283
284
|
end
|
284
285
|
|
286
|
+
|
287
|
+
private
|
288
|
+
#
|
289
|
+
# Adds telemetry information.
|
290
|
+
#
|
291
|
+
def add_telemetry
|
292
|
+
sdk_information = 'azure_mgmt_network'
|
293
|
+
if defined? Azure::ARM::Network::VERSION
|
294
|
+
sdk_information = "#{sdk_information}/#{Azure::ARM::Network::VERSION}"
|
295
|
+
end
|
296
|
+
add_user_agent_information(sdk_information)
|
297
|
+
end
|
285
298
|
end
|
286
299
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::Network
|
7
7
|
#
|
8
8
|
# The Microsoft Azure Network management API provides a RESTful set of web
|
9
|
-
# services that interact with Microsoft Azure Networks service to manage
|
10
|
-
#
|
11
|
-
#
|
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.
|
12
12
|
#
|
13
13
|
class NetworkSecurityGroups
|
14
14
|
include Azure::ARM::Network::Models
|
@@ -26,8 +26,7 @@ module Azure::ARM::Network
|
|
26
26
|
attr_reader :client
|
27
27
|
|
28
28
|
#
|
29
|
-
#
|
30
|
-
# security group
|
29
|
+
# Deletes the specified network security group.
|
31
30
|
#
|
32
31
|
# @param resource_group_name [String] The name of the resource group.
|
33
32
|
# @param network_security_group_name [String] The name of the network security
|
@@ -67,99 +66,12 @@ module Azure::ARM::Network
|
|
67
66
|
end
|
68
67
|
|
69
68
|
#
|
70
|
-
#
|
71
|
-
# security group
|
69
|
+
# Gets the specified network security group.
|
72
70
|
#
|
73
71
|
# @param resource_group_name [String] The name of the resource group.
|
74
72
|
# @param network_security_group_name [String] The name of the network security
|
75
73
|
# group.
|
76
|
-
# @param
|
77
|
-
# will be added to the HTTP request.
|
78
|
-
#
|
79
|
-
#
|
80
|
-
def begin_delete(resource_group_name, network_security_group_name, custom_headers = nil)
|
81
|
-
response = begin_delete_async(resource_group_name, network_security_group_name, custom_headers).value!
|
82
|
-
nil
|
83
|
-
end
|
84
|
-
|
85
|
-
#
|
86
|
-
# The Delete NetworkSecurityGroup operation deletes the specified network
|
87
|
-
# security group
|
88
|
-
#
|
89
|
-
# @param resource_group_name [String] The name of the resource group.
|
90
|
-
# @param network_security_group_name [String] The name of the network security
|
91
|
-
# group.
|
92
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
93
|
-
# will be added to the HTTP request.
|
94
|
-
#
|
95
|
-
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
96
|
-
#
|
97
|
-
def begin_delete_with_http_info(resource_group_name, network_security_group_name, custom_headers = nil)
|
98
|
-
begin_delete_async(resource_group_name, network_security_group_name, custom_headers).value!
|
99
|
-
end
|
100
|
-
|
101
|
-
#
|
102
|
-
# The Delete NetworkSecurityGroup operation deletes the specified network
|
103
|
-
# security group
|
104
|
-
#
|
105
|
-
# @param resource_group_name [String] The name of the resource group.
|
106
|
-
# @param network_security_group_name [String] The name of the network security
|
107
|
-
# group.
|
108
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
109
|
-
# to the HTTP request.
|
110
|
-
#
|
111
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
112
|
-
#
|
113
|
-
def begin_delete_async(resource_group_name, network_security_group_name, custom_headers = nil)
|
114
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
115
|
-
fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
|
116
|
-
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
117
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
118
|
-
|
119
|
-
|
120
|
-
request_headers = {}
|
121
|
-
|
122
|
-
# Set Headers
|
123
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
124
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
125
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'
|
126
|
-
|
127
|
-
request_url = @base_url || @client.base_url
|
128
|
-
|
129
|
-
options = {
|
130
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
131
|
-
path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id},
|
132
|
-
query_params: {'api-version' => @client.api_version},
|
133
|
-
headers: request_headers.merge(custom_headers || {}),
|
134
|
-
base_url: request_url
|
135
|
-
}
|
136
|
-
promise = @client.make_request_async(:delete, path_template, options)
|
137
|
-
|
138
|
-
promise = promise.then do |result|
|
139
|
-
http_response = result.response
|
140
|
-
status_code = http_response.status
|
141
|
-
response_content = http_response.body
|
142
|
-
unless status_code == 202 || status_code == 200 || status_code == 204
|
143
|
-
error_model = JSON.load(response_content)
|
144
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
145
|
-
end
|
146
|
-
|
147
|
-
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
148
|
-
|
149
|
-
result
|
150
|
-
end
|
151
|
-
|
152
|
-
promise.execute
|
153
|
-
end
|
154
|
-
|
155
|
-
#
|
156
|
-
# The Get NetworkSecurityGroups operation retrieves information about the
|
157
|
-
# specified network security group.
|
158
|
-
#
|
159
|
-
# @param resource_group_name [String] The name of the resource group.
|
160
|
-
# @param network_security_group_name [String] The name of the network security
|
161
|
-
# group.
|
162
|
-
# @param expand [String] expand references resources.
|
74
|
+
# @param expand [String] Expands referenced resources.
|
163
75
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
164
76
|
# will be added to the HTTP request.
|
165
77
|
#
|
@@ -171,13 +83,12 @@ module Azure::ARM::Network
|
|
171
83
|
end
|
172
84
|
|
173
85
|
#
|
174
|
-
#
|
175
|
-
# specified network security group.
|
86
|
+
# Gets the specified network security group.
|
176
87
|
#
|
177
88
|
# @param resource_group_name [String] The name of the resource group.
|
178
89
|
# @param network_security_group_name [String] The name of the network security
|
179
90
|
# group.
|
180
|
-
# @param expand [String]
|
91
|
+
# @param expand [String] Expands referenced resources.
|
181
92
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
182
93
|
# will be added to the HTTP request.
|
183
94
|
#
|
@@ -188,13 +99,12 @@ module Azure::ARM::Network
|
|
188
99
|
end
|
189
100
|
|
190
101
|
#
|
191
|
-
#
|
192
|
-
# specified network security group.
|
102
|
+
# Gets the specified network security group.
|
193
103
|
#
|
194
104
|
# @param resource_group_name [String] The name of the resource group.
|
195
105
|
# @param network_security_group_name [String] The name of the network security
|
196
106
|
# group.
|
197
|
-
# @param expand [String]
|
107
|
+
# @param expand [String] Expands referenced resources.
|
198
108
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
199
109
|
# to the HTTP request.
|
200
110
|
#
|
@@ -253,14 +163,13 @@ module Azure::ARM::Network
|
|
253
163
|
end
|
254
164
|
|
255
165
|
#
|
256
|
-
#
|
257
|
-
# group in the specified resource group.
|
166
|
+
# Creates or updates a network security group in the specified resource group.
|
258
167
|
#
|
259
168
|
# @param resource_group_name [String] The name of the resource group.
|
260
169
|
# @param network_security_group_name [String] The name of the network security
|
261
170
|
# group.
|
262
|
-
# @param parameters [NetworkSecurityGroup] Parameters supplied to the
|
263
|
-
#
|
171
|
+
# @param parameters [NetworkSecurityGroup] Parameters supplied to the create or
|
172
|
+
# update network security group operation.
|
264
173
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
265
174
|
# will be added to the HTTP request.
|
266
175
|
#
|
@@ -275,8 +184,8 @@ module Azure::ARM::Network
|
|
275
184
|
# @param resource_group_name [String] The name of the resource group.
|
276
185
|
# @param network_security_group_name [String] The name of the network security
|
277
186
|
# group.
|
278
|
-
# @param parameters [NetworkSecurityGroup] Parameters supplied to the
|
279
|
-
#
|
187
|
+
# @param parameters [NetworkSecurityGroup] Parameters supplied to the create or
|
188
|
+
# update network security group operation.
|
280
189
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
281
190
|
# will be added to the HTTP request.
|
282
191
|
#
|
@@ -302,60 +211,39 @@ module Azure::ARM::Network
|
|
302
211
|
end
|
303
212
|
|
304
213
|
#
|
305
|
-
#
|
306
|
-
# group in the specified resource group.
|
214
|
+
# Gets all network security groups in a subscription.
|
307
215
|
#
|
308
|
-
# @param resource_group_name [String] The name of the resource group.
|
309
|
-
# @param network_security_group_name [String] The name of the network security
|
310
|
-
# group.
|
311
|
-
# @param parameters [NetworkSecurityGroup] Parameters supplied to the
|
312
|
-
# create/update Network Security Group operation
|
313
216
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
314
217
|
# will be added to the HTTP request.
|
315
218
|
#
|
316
|
-
# @return [NetworkSecurityGroup] operation results.
|
219
|
+
# @return [Array<NetworkSecurityGroup>] operation results.
|
317
220
|
#
|
318
|
-
def
|
319
|
-
|
320
|
-
|
221
|
+
def list_all(custom_headers = nil)
|
222
|
+
first_page = list_all_as_lazy(custom_headers)
|
223
|
+
first_page.get_all_items
|
321
224
|
end
|
322
225
|
|
323
226
|
#
|
324
|
-
#
|
325
|
-
# group in the specified resource group.
|
227
|
+
# Gets all network security groups in a subscription.
|
326
228
|
#
|
327
|
-
# @param resource_group_name [String] The name of the resource group.
|
328
|
-
# @param network_security_group_name [String] The name of the network security
|
329
|
-
# group.
|
330
|
-
# @param parameters [NetworkSecurityGroup] Parameters supplied to the
|
331
|
-
# create/update Network Security Group operation
|
332
229
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
333
230
|
# will be added to the HTTP request.
|
334
231
|
#
|
335
232
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
336
233
|
#
|
337
|
-
def
|
338
|
-
|
234
|
+
def list_all_with_http_info(custom_headers = nil)
|
235
|
+
list_all_async(custom_headers).value!
|
339
236
|
end
|
340
237
|
|
341
238
|
#
|
342
|
-
#
|
343
|
-
# group in the specified resource group.
|
239
|
+
# Gets all network security groups in a subscription.
|
344
240
|
#
|
345
|
-
# @param resource_group_name [String] The name of the resource group.
|
346
|
-
# @param network_security_group_name [String] The name of the network security
|
347
|
-
# group.
|
348
|
-
# @param parameters [NetworkSecurityGroup] Parameters supplied to the
|
349
|
-
# create/update Network Security Group operation
|
350
241
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
351
242
|
# to the HTTP request.
|
352
243
|
#
|
353
244
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
354
245
|
#
|
355
|
-
def
|
356
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
357
|
-
fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
|
358
|
-
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
246
|
+
def list_all_async(custom_headers = nil)
|
359
247
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
360
248
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
361
249
|
|
@@ -365,53 +253,34 @@ module Azure::ARM::Network
|
|
365
253
|
# Set Headers
|
366
254
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
367
255
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
368
|
-
|
369
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
370
|
-
|
371
|
-
# Serialize Request
|
372
|
-
request_mapper = NetworkSecurityGroup.mapper()
|
373
|
-
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
374
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
375
|
-
|
376
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'
|
256
|
+
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups'
|
377
257
|
|
378
258
|
request_url = @base_url || @client.base_url
|
379
259
|
|
380
260
|
options = {
|
381
261
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
382
|
-
path_params: {'
|
262
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
383
263
|
query_params: {'api-version' => @client.api_version},
|
384
|
-
body: request_content,
|
385
264
|
headers: request_headers.merge(custom_headers || {}),
|
386
265
|
base_url: request_url
|
387
266
|
}
|
388
|
-
promise = @client.make_request_async(:
|
267
|
+
promise = @client.make_request_async(:get, path_template, options)
|
389
268
|
|
390
269
|
promise = promise.then do |result|
|
391
270
|
http_response = result.response
|
392
271
|
status_code = http_response.status
|
393
272
|
response_content = http_response.body
|
394
|
-
unless status_code ==
|
273
|
+
unless status_code == 200
|
395
274
|
error_model = JSON.load(response_content)
|
396
275
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
397
276
|
end
|
398
277
|
|
399
278
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
400
279
|
# Deserialize Response
|
401
|
-
if status_code == 201
|
402
|
-
begin
|
403
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
404
|
-
result_mapper = NetworkSecurityGroup.mapper()
|
405
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
406
|
-
rescue Exception => e
|
407
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
408
|
-
end
|
409
|
-
end
|
410
|
-
# Deserialize Response
|
411
280
|
if status_code == 200
|
412
281
|
begin
|
413
282
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
414
|
-
result_mapper =
|
283
|
+
result_mapper = NetworkSecurityGroupListResult.mapper()
|
415
284
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
416
285
|
rescue Exception => e
|
417
286
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -425,63 +294,43 @@ module Azure::ARM::Network
|
|
425
294
|
end
|
426
295
|
|
427
296
|
#
|
428
|
-
#
|
429
|
-
# subscription
|
430
|
-
#
|
431
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
432
|
-
# will be added to the HTTP request.
|
433
|
-
#
|
434
|
-
# @return [NetworkSecurityGroupListResult] which provide lazy access to pages
|
435
|
-
# of the response.
|
436
|
-
#
|
437
|
-
def list_all_as_lazy(custom_headers = nil)
|
438
|
-
response = list_all_async(custom_headers).value!
|
439
|
-
unless response.nil?
|
440
|
-
page = response.body
|
441
|
-
page.next_method = Proc.new do |next_page_link|
|
442
|
-
list_all_next_async(next_page_link, custom_headers)
|
443
|
-
end
|
444
|
-
page
|
445
|
-
end
|
446
|
-
end
|
447
|
-
|
448
|
-
#
|
449
|
-
# The list NetworkSecurityGroups returns all network security groups in a
|
450
|
-
# subscription
|
297
|
+
# Gets all network security groups in a resource group.
|
451
298
|
#
|
299
|
+
# @param resource_group_name [String] The name of the resource group.
|
452
300
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
453
301
|
# will be added to the HTTP request.
|
454
302
|
#
|
455
303
|
# @return [Array<NetworkSecurityGroup>] operation results.
|
456
304
|
#
|
457
|
-
def
|
458
|
-
first_page =
|
305
|
+
def list(resource_group_name, custom_headers = nil)
|
306
|
+
first_page = list_as_lazy(resource_group_name, custom_headers)
|
459
307
|
first_page.get_all_items
|
460
308
|
end
|
461
309
|
|
462
310
|
#
|
463
|
-
#
|
464
|
-
# subscription
|
311
|
+
# Gets all network security groups in a resource group.
|
465
312
|
#
|
313
|
+
# @param resource_group_name [String] The name of the resource group.
|
466
314
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
467
315
|
# will be added to the HTTP request.
|
468
316
|
#
|
469
317
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
470
318
|
#
|
471
|
-
def
|
472
|
-
|
319
|
+
def list_with_http_info(resource_group_name, custom_headers = nil)
|
320
|
+
list_async(resource_group_name, custom_headers).value!
|
473
321
|
end
|
474
322
|
|
475
323
|
#
|
476
|
-
#
|
477
|
-
# subscription
|
324
|
+
# Gets all network security groups in a resource group.
|
478
325
|
#
|
326
|
+
# @param resource_group_name [String] The name of the resource group.
|
479
327
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
480
328
|
# to the HTTP request.
|
481
329
|
#
|
482
330
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
483
331
|
#
|
484
|
-
def
|
332
|
+
def list_async(resource_group_name, custom_headers = nil)
|
333
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
485
334
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
486
335
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
487
336
|
|
@@ -491,13 +340,13 @@ module Azure::ARM::Network
|
|
491
340
|
# Set Headers
|
492
341
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
493
342
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
494
|
-
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups'
|
343
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups'
|
495
344
|
|
496
345
|
request_url = @base_url || @client.base_url
|
497
346
|
|
498
347
|
options = {
|
499
348
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
500
|
-
path_params: {'subscriptionId' => @client.subscription_id},
|
349
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
501
350
|
query_params: {'api-version' => @client.api_version},
|
502
351
|
headers: request_headers.merge(custom_headers || {}),
|
503
352
|
base_url: request_url
|
@@ -532,68 +381,140 @@ module Azure::ARM::Network
|
|
532
381
|
end
|
533
382
|
|
534
383
|
#
|
535
|
-
#
|
536
|
-
# resource group
|
384
|
+
# Deletes the specified network security group.
|
537
385
|
#
|
538
386
|
# @param resource_group_name [String] The name of the resource group.
|
387
|
+
# @param network_security_group_name [String] The name of the network security
|
388
|
+
# group.
|
539
389
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
540
390
|
# will be added to the HTTP request.
|
541
391
|
#
|
542
|
-
# @return [NetworkSecurityGroupListResult] which provide lazy access to pages
|
543
|
-
# of the response.
|
544
392
|
#
|
545
|
-
def
|
546
|
-
response =
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
393
|
+
def begin_delete(resource_group_name, network_security_group_name, custom_headers = nil)
|
394
|
+
response = begin_delete_async(resource_group_name, network_security_group_name, custom_headers).value!
|
395
|
+
nil
|
396
|
+
end
|
397
|
+
|
398
|
+
#
|
399
|
+
# Deletes the specified network security group.
|
400
|
+
#
|
401
|
+
# @param resource_group_name [String] The name of the resource group.
|
402
|
+
# @param network_security_group_name [String] The name of the network security
|
403
|
+
# group.
|
404
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
405
|
+
# will be added to the HTTP request.
|
406
|
+
#
|
407
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
408
|
+
#
|
409
|
+
def begin_delete_with_http_info(resource_group_name, network_security_group_name, custom_headers = nil)
|
410
|
+
begin_delete_async(resource_group_name, network_security_group_name, custom_headers).value!
|
411
|
+
end
|
412
|
+
|
413
|
+
#
|
414
|
+
# Deletes the specified network security group.
|
415
|
+
#
|
416
|
+
# @param resource_group_name [String] The name of the resource group.
|
417
|
+
# @param network_security_group_name [String] The name of the network security
|
418
|
+
# group.
|
419
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
420
|
+
# to the HTTP request.
|
421
|
+
#
|
422
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
423
|
+
#
|
424
|
+
def begin_delete_async(resource_group_name, network_security_group_name, custom_headers = nil)
|
425
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
426
|
+
fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
|
427
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
428
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
429
|
+
|
430
|
+
|
431
|
+
request_headers = {}
|
432
|
+
|
433
|
+
# Set Headers
|
434
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
435
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
436
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'
|
437
|
+
|
438
|
+
request_url = @base_url || @client.base_url
|
439
|
+
|
440
|
+
options = {
|
441
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
442
|
+
path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id},
|
443
|
+
query_params: {'api-version' => @client.api_version},
|
444
|
+
headers: request_headers.merge(custom_headers || {}),
|
445
|
+
base_url: request_url
|
446
|
+
}
|
447
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
448
|
+
|
449
|
+
promise = promise.then do |result|
|
450
|
+
http_response = result.response
|
451
|
+
status_code = http_response.status
|
452
|
+
response_content = http_response.body
|
453
|
+
unless status_code == 202 || status_code == 200 || status_code == 204
|
454
|
+
error_model = JSON.load(response_content)
|
455
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
551
456
|
end
|
552
|
-
|
457
|
+
|
458
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
459
|
+
|
460
|
+
result
|
553
461
|
end
|
462
|
+
|
463
|
+
promise.execute
|
554
464
|
end
|
555
465
|
|
556
466
|
#
|
557
|
-
#
|
558
|
-
# resource group
|
467
|
+
# Creates or updates a network security group in the specified resource group.
|
559
468
|
#
|
560
469
|
# @param resource_group_name [String] The name of the resource group.
|
470
|
+
# @param network_security_group_name [String] The name of the network security
|
471
|
+
# group.
|
472
|
+
# @param parameters [NetworkSecurityGroup] Parameters supplied to the create or
|
473
|
+
# update network security group operation.
|
561
474
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
562
475
|
# will be added to the HTTP request.
|
563
476
|
#
|
564
|
-
# @return [
|
477
|
+
# @return [NetworkSecurityGroup] operation results.
|
565
478
|
#
|
566
|
-
def
|
567
|
-
|
568
|
-
|
479
|
+
def begin_create_or_update(resource_group_name, network_security_group_name, parameters, custom_headers = nil)
|
480
|
+
response = begin_create_or_update_async(resource_group_name, network_security_group_name, parameters, custom_headers).value!
|
481
|
+
response.body unless response.nil?
|
569
482
|
end
|
570
483
|
|
571
484
|
#
|
572
|
-
#
|
573
|
-
# resource group
|
485
|
+
# Creates or updates a network security group in the specified resource group.
|
574
486
|
#
|
575
487
|
# @param resource_group_name [String] The name of the resource group.
|
488
|
+
# @param network_security_group_name [String] The name of the network security
|
489
|
+
# group.
|
490
|
+
# @param parameters [NetworkSecurityGroup] Parameters supplied to the create or
|
491
|
+
# update network security group operation.
|
576
492
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
577
493
|
# will be added to the HTTP request.
|
578
494
|
#
|
579
495
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
580
496
|
#
|
581
|
-
def
|
582
|
-
|
497
|
+
def begin_create_or_update_with_http_info(resource_group_name, network_security_group_name, parameters, custom_headers = nil)
|
498
|
+
begin_create_or_update_async(resource_group_name, network_security_group_name, parameters, custom_headers).value!
|
583
499
|
end
|
584
500
|
|
585
501
|
#
|
586
|
-
#
|
587
|
-
# resource group
|
502
|
+
# Creates or updates a network security group in the specified resource group.
|
588
503
|
#
|
589
504
|
# @param resource_group_name [String] The name of the resource group.
|
505
|
+
# @param network_security_group_name [String] The name of the network security
|
506
|
+
# group.
|
507
|
+
# @param parameters [NetworkSecurityGroup] Parameters supplied to the create or
|
508
|
+
# update network security group operation.
|
590
509
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
591
510
|
# to the HTTP request.
|
592
511
|
#
|
593
512
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
594
513
|
#
|
595
|
-
def
|
514
|
+
def begin_create_or_update_async(resource_group_name, network_security_group_name, parameters, custom_headers = nil)
|
596
515
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
516
|
+
fail ArgumentError, 'network_security_group_name is nil' if network_security_group_name.nil?
|
517
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
597
518
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
598
519
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
599
520
|
|
@@ -603,34 +524,53 @@ module Azure::ARM::Network
|
|
603
524
|
# Set Headers
|
604
525
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
605
526
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
606
|
-
|
527
|
+
|
528
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
529
|
+
|
530
|
+
# Serialize Request
|
531
|
+
request_mapper = NetworkSecurityGroup.mapper()
|
532
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
533
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
534
|
+
|
535
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'
|
607
536
|
|
608
537
|
request_url = @base_url || @client.base_url
|
609
538
|
|
610
539
|
options = {
|
611
540
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
612
|
-
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
541
|
+
path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id},
|
613
542
|
query_params: {'api-version' => @client.api_version},
|
543
|
+
body: request_content,
|
614
544
|
headers: request_headers.merge(custom_headers || {}),
|
615
545
|
base_url: request_url
|
616
546
|
}
|
617
|
-
promise = @client.make_request_async(:
|
547
|
+
promise = @client.make_request_async(:put, path_template, options)
|
618
548
|
|
619
549
|
promise = promise.then do |result|
|
620
550
|
http_response = result.response
|
621
551
|
status_code = http_response.status
|
622
552
|
response_content = http_response.body
|
623
|
-
unless status_code == 200
|
553
|
+
unless status_code == 201 || status_code == 200
|
624
554
|
error_model = JSON.load(response_content)
|
625
555
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
626
556
|
end
|
627
557
|
|
628
558
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
629
559
|
# Deserialize Response
|
560
|
+
if status_code == 201
|
561
|
+
begin
|
562
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
563
|
+
result_mapper = NetworkSecurityGroup.mapper()
|
564
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
565
|
+
rescue Exception => e
|
566
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
567
|
+
end
|
568
|
+
end
|
569
|
+
# Deserialize Response
|
630
570
|
if status_code == 200
|
631
571
|
begin
|
632
572
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
633
|
-
result_mapper =
|
573
|
+
result_mapper = NetworkSecurityGroup.mapper()
|
634
574
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
635
575
|
rescue Exception => e
|
636
576
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -644,11 +584,10 @@ module Azure::ARM::Network
|
|
644
584
|
end
|
645
585
|
|
646
586
|
#
|
647
|
-
#
|
648
|
-
# subscription
|
587
|
+
# Gets all network security groups in a subscription.
|
649
588
|
#
|
650
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
651
|
-
#
|
589
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
590
|
+
# to List operation.
|
652
591
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
653
592
|
# will be added to the HTTP request.
|
654
593
|
#
|
@@ -660,11 +599,10 @@ module Azure::ARM::Network
|
|
660
599
|
end
|
661
600
|
|
662
601
|
#
|
663
|
-
#
|
664
|
-
# subscription
|
602
|
+
# Gets all network security groups in a subscription.
|
665
603
|
#
|
666
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
667
|
-
#
|
604
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
605
|
+
# to List operation.
|
668
606
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
669
607
|
# will be added to the HTTP request.
|
670
608
|
#
|
@@ -675,11 +613,10 @@ module Azure::ARM::Network
|
|
675
613
|
end
|
676
614
|
|
677
615
|
#
|
678
|
-
#
|
679
|
-
# subscription
|
616
|
+
# Gets all network security groups in a subscription.
|
680
617
|
#
|
681
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
682
|
-
#
|
618
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
619
|
+
# to List operation.
|
683
620
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
684
621
|
# to the HTTP request.
|
685
622
|
#
|
@@ -734,11 +671,10 @@ module Azure::ARM::Network
|
|
734
671
|
end
|
735
672
|
|
736
673
|
#
|
737
|
-
#
|
738
|
-
# resource group
|
674
|
+
# Gets all network security groups in a resource group.
|
739
675
|
#
|
740
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
741
|
-
#
|
676
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
677
|
+
# to List operation.
|
742
678
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
743
679
|
# will be added to the HTTP request.
|
744
680
|
#
|
@@ -750,11 +686,10 @@ module Azure::ARM::Network
|
|
750
686
|
end
|
751
687
|
|
752
688
|
#
|
753
|
-
#
|
754
|
-
# resource group
|
689
|
+
# Gets all network security groups in a resource group.
|
755
690
|
#
|
756
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
757
|
-
#
|
691
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
692
|
+
# to List operation.
|
758
693
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
759
694
|
# will be added to the HTTP request.
|
760
695
|
#
|
@@ -765,11 +700,10 @@ module Azure::ARM::Network
|
|
765
700
|
end
|
766
701
|
|
767
702
|
#
|
768
|
-
#
|
769
|
-
# resource group
|
703
|
+
# Gets all network security groups in a resource group.
|
770
704
|
#
|
771
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
772
|
-
#
|
705
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
706
|
+
# to List operation.
|
773
707
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
774
708
|
# to the HTTP request.
|
775
709
|
#
|
@@ -823,5 +757,46 @@ module Azure::ARM::Network
|
|
823
757
|
promise.execute
|
824
758
|
end
|
825
759
|
|
760
|
+
#
|
761
|
+
# Gets all network security groups in a subscription.
|
762
|
+
#
|
763
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
764
|
+
# will be added to the HTTP request.
|
765
|
+
#
|
766
|
+
# @return [NetworkSecurityGroupListResult] which provide lazy access to pages
|
767
|
+
# of the response.
|
768
|
+
#
|
769
|
+
def list_all_as_lazy(custom_headers = nil)
|
770
|
+
response = list_all_async(custom_headers).value!
|
771
|
+
unless response.nil?
|
772
|
+
page = response.body
|
773
|
+
page.next_method = Proc.new do |next_page_link|
|
774
|
+
list_all_next_async(next_page_link, custom_headers)
|
775
|
+
end
|
776
|
+
page
|
777
|
+
end
|
778
|
+
end
|
779
|
+
|
780
|
+
#
|
781
|
+
# Gets all network security groups in a resource group.
|
782
|
+
#
|
783
|
+
# @param resource_group_name [String] The name of the resource group.
|
784
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
785
|
+
# will be added to the HTTP request.
|
786
|
+
#
|
787
|
+
# @return [NetworkSecurityGroupListResult] which provide lazy access to pages
|
788
|
+
# of the response.
|
789
|
+
#
|
790
|
+
def list_as_lazy(resource_group_name, custom_headers = nil)
|
791
|
+
response = list_async(resource_group_name, custom_headers).value!
|
792
|
+
unless response.nil?
|
793
|
+
page = response.body
|
794
|
+
page.next_method = Proc.new do |next_page_link|
|
795
|
+
list_next_async(next_page_link, custom_headers)
|
796
|
+
end
|
797
|
+
page
|
798
|
+
end
|
799
|
+
end
|
800
|
+
|
826
801
|
end
|
827
802
|
end
|