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,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 VirtualNetworks
|
14
14
|
include Azure::ARM::Network::Models
|
@@ -26,7 +26,7 @@ module Azure::ARM::Network
|
|
26
26
|
attr_reader :client
|
27
27
|
|
28
28
|
#
|
29
|
-
#
|
29
|
+
# Deletes the specified virtual network.
|
30
30
|
#
|
31
31
|
# @param resource_group_name [String] The name of the resource group.
|
32
32
|
# @param virtual_network_name [String] The name of the virtual network.
|
@@ -64,44 +64,48 @@ module Azure::ARM::Network
|
|
64
64
|
end
|
65
65
|
|
66
66
|
#
|
67
|
-
#
|
67
|
+
# Gets the specified virtual network by resource group.
|
68
68
|
#
|
69
69
|
# @param resource_group_name [String] The name of the resource group.
|
70
70
|
# @param virtual_network_name [String] The name of the virtual network.
|
71
|
+
# @param expand [String] Expands referenced resources.
|
71
72
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
72
73
|
# will be added to the HTTP request.
|
73
74
|
#
|
75
|
+
# @return [VirtualNetwork] operation results.
|
74
76
|
#
|
75
|
-
def
|
76
|
-
response =
|
77
|
-
nil
|
77
|
+
def get(resource_group_name, virtual_network_name, expand = nil, custom_headers = nil)
|
78
|
+
response = get_async(resource_group_name, virtual_network_name, expand, custom_headers).value!
|
79
|
+
response.body unless response.nil?
|
78
80
|
end
|
79
81
|
|
80
82
|
#
|
81
|
-
#
|
83
|
+
# Gets the specified virtual network by resource group.
|
82
84
|
#
|
83
85
|
# @param resource_group_name [String] The name of the resource group.
|
84
86
|
# @param virtual_network_name [String] The name of the virtual network.
|
87
|
+
# @param expand [String] Expands referenced resources.
|
85
88
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
86
89
|
# will be added to the HTTP request.
|
87
90
|
#
|
88
91
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
89
92
|
#
|
90
|
-
def
|
91
|
-
|
93
|
+
def get_with_http_info(resource_group_name, virtual_network_name, expand = nil, custom_headers = nil)
|
94
|
+
get_async(resource_group_name, virtual_network_name, expand, custom_headers).value!
|
92
95
|
end
|
93
96
|
|
94
97
|
#
|
95
|
-
#
|
98
|
+
# Gets the specified virtual network by resource group.
|
96
99
|
#
|
97
100
|
# @param resource_group_name [String] The name of the resource group.
|
98
101
|
# @param virtual_network_name [String] The name of the virtual network.
|
102
|
+
# @param expand [String] Expands referenced resources.
|
99
103
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
100
104
|
# to the HTTP request.
|
101
105
|
#
|
102
106
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
103
107
|
#
|
104
|
-
def
|
108
|
+
def get_async(resource_group_name, virtual_network_name, expand = nil, custom_headers = nil)
|
105
109
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
106
110
|
fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
|
107
111
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -120,22 +124,32 @@ module Azure::ARM::Network
|
|
120
124
|
options = {
|
121
125
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
122
126
|
path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'subscriptionId' => @client.subscription_id},
|
123
|
-
query_params: {'api-version' => @client.api_version},
|
127
|
+
query_params: {'api-version' => @client.api_version,'$expand' => expand},
|
124
128
|
headers: request_headers.merge(custom_headers || {}),
|
125
129
|
base_url: request_url
|
126
130
|
}
|
127
|
-
promise = @client.make_request_async(:
|
131
|
+
promise = @client.make_request_async(:get, path_template, options)
|
128
132
|
|
129
133
|
promise = promise.then do |result|
|
130
134
|
http_response = result.response
|
131
135
|
status_code = http_response.status
|
132
136
|
response_content = http_response.body
|
133
|
-
unless status_code ==
|
137
|
+
unless status_code == 200
|
134
138
|
error_model = JSON.load(response_content)
|
135
139
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
136
140
|
end
|
137
141
|
|
138
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 = VirtualNetwork.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
|
139
153
|
|
140
154
|
result
|
141
155
|
end
|
@@ -144,53 +158,85 @@ module Azure::ARM::Network
|
|
144
158
|
end
|
145
159
|
|
146
160
|
#
|
147
|
-
#
|
148
|
-
# virtual network.
|
161
|
+
# Creates or updates a virtual network in the specified resource group.
|
149
162
|
#
|
150
163
|
# @param resource_group_name [String] The name of the resource group.
|
151
164
|
# @param virtual_network_name [String] The name of the virtual network.
|
152
|
-
# @param
|
165
|
+
# @param parameters [VirtualNetwork] Parameters supplied to the create or
|
166
|
+
# update virtual network operation
|
153
167
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
154
168
|
# will be added to the HTTP request.
|
155
169
|
#
|
156
170
|
# @return [VirtualNetwork] operation results.
|
157
171
|
#
|
158
|
-
def
|
159
|
-
response =
|
172
|
+
def create_or_update(resource_group_name, virtual_network_name, parameters, custom_headers = nil)
|
173
|
+
response = create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers).value!
|
160
174
|
response.body unless response.nil?
|
161
175
|
end
|
162
176
|
|
163
|
-
#
|
164
|
-
# The Get VirtualNetwork operation retrieves information about the specified
|
165
|
-
# virtual network.
|
166
177
|
#
|
167
178
|
# @param resource_group_name [String] The name of the resource group.
|
168
179
|
# @param virtual_network_name [String] The name of the virtual network.
|
169
|
-
# @param
|
180
|
+
# @param parameters [VirtualNetwork] Parameters supplied to the create or
|
181
|
+
# update virtual network operation
|
182
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
183
|
+
# will be added to the HTTP request.
|
184
|
+
#
|
185
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
186
|
+
# response.
|
187
|
+
#
|
188
|
+
def create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers = nil)
|
189
|
+
# Send request
|
190
|
+
promise = begin_create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers)
|
191
|
+
|
192
|
+
promise = promise.then do |response|
|
193
|
+
# Defining deserialization method.
|
194
|
+
deserialize_method = lambda do |parsed_response|
|
195
|
+
result_mapper = VirtualNetwork.mapper()
|
196
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
197
|
+
end
|
198
|
+
|
199
|
+
# Waiting for response.
|
200
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
201
|
+
end
|
202
|
+
|
203
|
+
promise
|
204
|
+
end
|
205
|
+
|
206
|
+
#
|
207
|
+
# Gets all virtual networks in a subscription.
|
208
|
+
#
|
209
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
210
|
+
# will be added to the HTTP request.
|
211
|
+
#
|
212
|
+
# @return [Array<VirtualNetwork>] operation results.
|
213
|
+
#
|
214
|
+
def list_all(custom_headers = nil)
|
215
|
+
first_page = list_all_as_lazy(custom_headers)
|
216
|
+
first_page.get_all_items
|
217
|
+
end
|
218
|
+
|
219
|
+
#
|
220
|
+
# Gets all virtual networks in a subscription.
|
221
|
+
#
|
170
222
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
171
223
|
# will be added to the HTTP request.
|
172
224
|
#
|
173
225
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
174
226
|
#
|
175
|
-
def
|
176
|
-
|
227
|
+
def list_all_with_http_info(custom_headers = nil)
|
228
|
+
list_all_async(custom_headers).value!
|
177
229
|
end
|
178
230
|
|
179
231
|
#
|
180
|
-
#
|
181
|
-
# virtual network.
|
232
|
+
# Gets all virtual networks in a subscription.
|
182
233
|
#
|
183
|
-
# @param resource_group_name [String] The name of the resource group.
|
184
|
-
# @param virtual_network_name [String] The name of the virtual network.
|
185
|
-
# @param expand [String] expand references resources.
|
186
234
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
187
235
|
# to the HTTP request.
|
188
236
|
#
|
189
237
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
190
238
|
#
|
191
|
-
def
|
192
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
193
|
-
fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
|
239
|
+
def list_all_async(custom_headers = nil)
|
194
240
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
195
241
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
196
242
|
|
@@ -200,14 +246,14 @@ module Azure::ARM::Network
|
|
200
246
|
# Set Headers
|
201
247
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
202
248
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
203
|
-
path_template = '/subscriptions/{subscriptionId}/
|
249
|
+
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks'
|
204
250
|
|
205
251
|
request_url = @base_url || @client.base_url
|
206
252
|
|
207
253
|
options = {
|
208
254
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
209
|
-
path_params: {'
|
210
|
-
query_params: {'api-version' => @client.api_version
|
255
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
256
|
+
query_params: {'api-version' => @client.api_version},
|
211
257
|
headers: request_headers.merge(custom_headers || {}),
|
212
258
|
base_url: request_url
|
213
259
|
}
|
@@ -227,7 +273,7 @@ module Azure::ARM::Network
|
|
227
273
|
if status_code == 200
|
228
274
|
begin
|
229
275
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
230
|
-
result_mapper =
|
276
|
+
result_mapper = VirtualNetworkListResult.mapper()
|
231
277
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
232
278
|
rescue Exception => e
|
233
279
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -241,104 +287,43 @@ module Azure::ARM::Network
|
|
241
287
|
end
|
242
288
|
|
243
289
|
#
|
244
|
-
#
|
245
|
-
# specified resource group.
|
290
|
+
# Gets all virtual networks in a resource group.
|
246
291
|
#
|
247
292
|
# @param resource_group_name [String] The name of the resource group.
|
248
|
-
# @param virtual_network_name [String] The name of the virtual network.
|
249
|
-
# @param parameters [VirtualNetwork] Parameters supplied to the create/update
|
250
|
-
# Virtual Network operation
|
251
293
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
252
294
|
# will be added to the HTTP request.
|
253
295
|
#
|
254
|
-
# @return [VirtualNetwork] operation results.
|
255
|
-
#
|
256
|
-
def create_or_update(resource_group_name, virtual_network_name, parameters, custom_headers = nil)
|
257
|
-
response = create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers).value!
|
258
|
-
response.body unless response.nil?
|
259
|
-
end
|
260
|
-
|
261
|
-
#
|
262
|
-
# @param resource_group_name [String] The name of the resource group.
|
263
|
-
# @param virtual_network_name [String] The name of the virtual network.
|
264
|
-
# @param parameters [VirtualNetwork] Parameters supplied to the create/update
|
265
|
-
# Virtual Network operation
|
266
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
267
|
-
# will be added to the HTTP request.
|
268
|
-
#
|
269
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
270
|
-
# response.
|
271
|
-
#
|
272
|
-
def create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers = nil)
|
273
|
-
# Send request
|
274
|
-
promise = begin_create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers)
|
275
|
-
|
276
|
-
promise = promise.then do |response|
|
277
|
-
# Defining deserialization method.
|
278
|
-
deserialize_method = lambda do |parsed_response|
|
279
|
-
result_mapper = VirtualNetwork.mapper()
|
280
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
281
|
-
end
|
282
|
-
|
283
|
-
# Waiting for response.
|
284
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
285
|
-
end
|
286
|
-
|
287
|
-
promise
|
288
|
-
end
|
289
|
-
|
290
|
-
#
|
291
|
-
# The Put VirtualNetwork operation creates/updates a virtual network in the
|
292
|
-
# specified resource group.
|
293
|
-
#
|
294
|
-
# @param resource_group_name [String] The name of the resource group.
|
295
|
-
# @param virtual_network_name [String] The name of the virtual network.
|
296
|
-
# @param parameters [VirtualNetwork] Parameters supplied to the create/update
|
297
|
-
# Virtual Network operation
|
298
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
299
|
-
# will be added to the HTTP request.
|
300
|
-
#
|
301
|
-
# @return [VirtualNetwork] operation results.
|
296
|
+
# @return [Array<VirtualNetwork>] operation results.
|
302
297
|
#
|
303
|
-
def
|
304
|
-
|
305
|
-
|
298
|
+
def list(resource_group_name, custom_headers = nil)
|
299
|
+
first_page = list_as_lazy(resource_group_name, custom_headers)
|
300
|
+
first_page.get_all_items
|
306
301
|
end
|
307
302
|
|
308
303
|
#
|
309
|
-
#
|
310
|
-
# specified resource group.
|
304
|
+
# Gets all virtual networks in a resource group.
|
311
305
|
#
|
312
306
|
# @param resource_group_name [String] The name of the resource group.
|
313
|
-
# @param virtual_network_name [String] The name of the virtual network.
|
314
|
-
# @param parameters [VirtualNetwork] Parameters supplied to the create/update
|
315
|
-
# Virtual Network operation
|
316
307
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
317
308
|
# will be added to the HTTP request.
|
318
309
|
#
|
319
310
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
320
311
|
#
|
321
|
-
def
|
322
|
-
|
312
|
+
def list_with_http_info(resource_group_name, custom_headers = nil)
|
313
|
+
list_async(resource_group_name, custom_headers).value!
|
323
314
|
end
|
324
315
|
|
325
316
|
#
|
326
|
-
#
|
327
|
-
# specified resource group.
|
317
|
+
# Gets all virtual networks in a resource group.
|
328
318
|
#
|
329
319
|
# @param resource_group_name [String] The name of the resource group.
|
330
|
-
# @param virtual_network_name [String] The name of the virtual network.
|
331
|
-
# @param parameters [VirtualNetwork] Parameters supplied to the create/update
|
332
|
-
# Virtual Network operation
|
333
320
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
334
321
|
# to the HTTP request.
|
335
322
|
#
|
336
323
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
337
324
|
#
|
338
|
-
def
|
325
|
+
def list_async(resource_group_name, custom_headers = nil)
|
339
326
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
340
|
-
fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
|
341
|
-
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
342
327
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
343
328
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
344
329
|
|
@@ -348,33 +333,24 @@ module Azure::ARM::Network
|
|
348
333
|
# Set Headers
|
349
334
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
350
335
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
351
|
-
|
352
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
353
|
-
|
354
|
-
# Serialize Request
|
355
|
-
request_mapper = VirtualNetwork.mapper()
|
356
|
-
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
357
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
358
|
-
|
359
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'
|
336
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks'
|
360
337
|
|
361
338
|
request_url = @base_url || @client.base_url
|
362
339
|
|
363
340
|
options = {
|
364
341
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
365
|
-
path_params: {'resourceGroupName' => resource_group_name,'
|
342
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
366
343
|
query_params: {'api-version' => @client.api_version},
|
367
|
-
body: request_content,
|
368
344
|
headers: request_headers.merge(custom_headers || {}),
|
369
345
|
base_url: request_url
|
370
346
|
}
|
371
|
-
promise = @client.make_request_async(:
|
347
|
+
promise = @client.make_request_async(:get, path_template, options)
|
372
348
|
|
373
349
|
promise = promise.then do |result|
|
374
350
|
http_response = result.response
|
375
351
|
status_code = http_response.status
|
376
352
|
response_content = http_response.body
|
377
|
-
unless status_code == 200
|
353
|
+
unless status_code == 200
|
378
354
|
error_model = JSON.load(response_content)
|
379
355
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
380
356
|
end
|
@@ -384,17 +360,7 @@ module Azure::ARM::Network
|
|
384
360
|
if status_code == 200
|
385
361
|
begin
|
386
362
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
387
|
-
result_mapper =
|
388
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
389
|
-
rescue Exception => e
|
390
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
391
|
-
end
|
392
|
-
end
|
393
|
-
# Deserialize Response
|
394
|
-
if status_code == 201
|
395
|
-
begin
|
396
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
397
|
-
result_mapper = VirtualNetwork.mapper()
|
363
|
+
result_mapper = VirtualNetworkListResult.mapper()
|
398
364
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
399
365
|
rescue Exception => e
|
400
366
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -408,59 +374,50 @@ module Azure::ARM::Network
|
|
408
374
|
end
|
409
375
|
|
410
376
|
#
|
411
|
-
#
|
412
|
-
#
|
413
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
414
|
-
# will be added to the HTTP request.
|
415
|
-
#
|
416
|
-
# @return [VirtualNetworkListResult] which provide lazy access to pages of the
|
417
|
-
# response.
|
418
|
-
#
|
419
|
-
def list_all_as_lazy(custom_headers = nil)
|
420
|
-
response = list_all_async(custom_headers).value!
|
421
|
-
unless response.nil?
|
422
|
-
page = response.body
|
423
|
-
page.next_method = Proc.new do |next_page_link|
|
424
|
-
list_all_next_async(next_page_link, custom_headers)
|
425
|
-
end
|
426
|
-
page
|
427
|
-
end
|
428
|
-
end
|
429
|
-
|
430
|
-
#
|
431
|
-
# The list VirtualNetwork returns all Virtual Networks in a subscription
|
377
|
+
# Checks whether a private IP address is available for use.
|
432
378
|
#
|
379
|
+
# @param resource_group_name [String] The name of the resource group.
|
380
|
+
# @param virtual_network_name [String] The name of the virtual network.
|
381
|
+
# @param ip_address [String] The private IP address to be verified.
|
433
382
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
434
383
|
# will be added to the HTTP request.
|
435
384
|
#
|
436
|
-
# @return [
|
385
|
+
# @return [IPAddressAvailabilityResult] operation results.
|
437
386
|
#
|
438
|
-
def
|
439
|
-
|
440
|
-
|
387
|
+
def check_ipaddress_availability(resource_group_name, virtual_network_name, ip_address = nil, custom_headers = nil)
|
388
|
+
response = check_ipaddress_availability_async(resource_group_name, virtual_network_name, ip_address, custom_headers).value!
|
389
|
+
response.body unless response.nil?
|
441
390
|
end
|
442
391
|
|
443
392
|
#
|
444
|
-
#
|
393
|
+
# Checks whether a private IP address is available for use.
|
445
394
|
#
|
395
|
+
# @param resource_group_name [String] The name of the resource group.
|
396
|
+
# @param virtual_network_name [String] The name of the virtual network.
|
397
|
+
# @param ip_address [String] The private IP address to be verified.
|
446
398
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
447
399
|
# will be added to the HTTP request.
|
448
400
|
#
|
449
401
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
450
402
|
#
|
451
|
-
def
|
452
|
-
|
403
|
+
def check_ipaddress_availability_with_http_info(resource_group_name, virtual_network_name, ip_address = nil, custom_headers = nil)
|
404
|
+
check_ipaddress_availability_async(resource_group_name, virtual_network_name, ip_address, custom_headers).value!
|
453
405
|
end
|
454
406
|
|
455
407
|
#
|
456
|
-
#
|
408
|
+
# Checks whether a private IP address is available for use.
|
457
409
|
#
|
410
|
+
# @param resource_group_name [String] The name of the resource group.
|
411
|
+
# @param virtual_network_name [String] The name of the virtual network.
|
412
|
+
# @param ip_address [String] The private IP address to be verified.
|
458
413
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
459
414
|
# to the HTTP request.
|
460
415
|
#
|
461
416
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
462
417
|
#
|
463
|
-
def
|
418
|
+
def check_ipaddress_availability_async(resource_group_name, virtual_network_name, ip_address = nil, custom_headers = nil)
|
419
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
420
|
+
fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
|
464
421
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
465
422
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
466
423
|
|
@@ -470,14 +427,14 @@ module Azure::ARM::Network
|
|
470
427
|
# Set Headers
|
471
428
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
472
429
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
473
|
-
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks'
|
430
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability'
|
474
431
|
|
475
432
|
request_url = @base_url || @client.base_url
|
476
433
|
|
477
434
|
options = {
|
478
435
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
479
|
-
path_params: {'subscriptionId' => @client.subscription_id},
|
480
|
-
query_params: {'api-version' => @client.api_version},
|
436
|
+
path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'subscriptionId' => @client.subscription_id},
|
437
|
+
query_params: {'ipAddress' => ip_address,'api-version' => @client.api_version},
|
481
438
|
headers: request_headers.merge(custom_headers || {}),
|
482
439
|
base_url: request_url
|
483
440
|
}
|
@@ -497,7 +454,7 @@ module Azure::ARM::Network
|
|
497
454
|
if status_code == 200
|
498
455
|
begin
|
499
456
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
500
|
-
result_mapper =
|
457
|
+
result_mapper = IPAddressAvailabilityResult.mapper()
|
501
458
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
502
459
|
rescue Exception => e
|
503
460
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -511,64 +468,46 @@ module Azure::ARM::Network
|
|
511
468
|
end
|
512
469
|
|
513
470
|
#
|
514
|
-
#
|
515
|
-
#
|
516
|
-
# @param resource_group_name [String] The name of the resource group.
|
517
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
518
|
-
# will be added to the HTTP request.
|
519
|
-
#
|
520
|
-
# @return [VirtualNetworkListResult] which provide lazy access to pages of the
|
521
|
-
# response.
|
522
|
-
#
|
523
|
-
def list_as_lazy(resource_group_name, custom_headers = nil)
|
524
|
-
response = list_async(resource_group_name, custom_headers).value!
|
525
|
-
unless response.nil?
|
526
|
-
page = response.body
|
527
|
-
page.next_method = Proc.new do |next_page_link|
|
528
|
-
list_next_async(next_page_link, custom_headers)
|
529
|
-
end
|
530
|
-
page
|
531
|
-
end
|
532
|
-
end
|
533
|
-
|
534
|
-
#
|
535
|
-
# The list VirtualNetwork returns all Virtual Networks in a resource group
|
471
|
+
# Deletes the specified virtual network.
|
536
472
|
#
|
537
473
|
# @param resource_group_name [String] The name of the resource group.
|
474
|
+
# @param virtual_network_name [String] The name of the virtual network.
|
538
475
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
539
476
|
# will be added to the HTTP request.
|
540
477
|
#
|
541
|
-
# @return [Array<VirtualNetwork>] operation results.
|
542
478
|
#
|
543
|
-
def
|
544
|
-
|
545
|
-
|
479
|
+
def begin_delete(resource_group_name, virtual_network_name, custom_headers = nil)
|
480
|
+
response = begin_delete_async(resource_group_name, virtual_network_name, custom_headers).value!
|
481
|
+
nil
|
546
482
|
end
|
547
483
|
|
548
484
|
#
|
549
|
-
#
|
485
|
+
# Deletes the specified virtual network.
|
550
486
|
#
|
551
487
|
# @param resource_group_name [String] The name of the resource group.
|
488
|
+
# @param virtual_network_name [String] The name of the virtual network.
|
552
489
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
553
490
|
# will be added to the HTTP request.
|
554
491
|
#
|
555
492
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
556
493
|
#
|
557
|
-
def
|
558
|
-
|
494
|
+
def begin_delete_with_http_info(resource_group_name, virtual_network_name, custom_headers = nil)
|
495
|
+
begin_delete_async(resource_group_name, virtual_network_name, custom_headers).value!
|
559
496
|
end
|
560
497
|
|
561
498
|
#
|
562
|
-
#
|
499
|
+
# Deletes the specified virtual network.
|
563
500
|
#
|
564
501
|
# @param resource_group_name [String] The name of the resource group.
|
502
|
+
# @param virtual_network_name [String] The name of the virtual network.
|
565
503
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
566
504
|
# to the HTTP request.
|
567
505
|
#
|
568
506
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
569
507
|
#
|
570
|
-
def
|
508
|
+
def begin_delete_async(resource_group_name, virtual_network_name, custom_headers = nil)
|
571
509
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
510
|
+
fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
|
572
511
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
573
512
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
574
513
|
|
@@ -578,39 +517,29 @@ module Azure::ARM::Network
|
|
578
517
|
# Set Headers
|
579
518
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
580
519
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
581
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks'
|
520
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'
|
582
521
|
|
583
522
|
request_url = @base_url || @client.base_url
|
584
523
|
|
585
524
|
options = {
|
586
525
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
587
|
-
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
526
|
+
path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'subscriptionId' => @client.subscription_id},
|
588
527
|
query_params: {'api-version' => @client.api_version},
|
589
528
|
headers: request_headers.merge(custom_headers || {}),
|
590
529
|
base_url: request_url
|
591
530
|
}
|
592
|
-
promise = @client.make_request_async(:
|
531
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
593
532
|
|
594
533
|
promise = promise.then do |result|
|
595
534
|
http_response = result.response
|
596
535
|
status_code = http_response.status
|
597
536
|
response_content = http_response.body
|
598
|
-
unless status_code == 200
|
537
|
+
unless status_code == 202 || status_code == 204 || status_code == 200
|
599
538
|
error_model = JSON.load(response_content)
|
600
539
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
601
540
|
end
|
602
541
|
|
603
542
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
604
|
-
# Deserialize Response
|
605
|
-
if status_code == 200
|
606
|
-
begin
|
607
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
608
|
-
result_mapper = VirtualNetworkListResult.mapper()
|
609
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
610
|
-
rescue Exception => e
|
611
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
612
|
-
end
|
613
|
-
end
|
614
543
|
|
615
544
|
result
|
616
545
|
end
|
@@ -619,50 +548,54 @@ module Azure::ARM::Network
|
|
619
548
|
end
|
620
549
|
|
621
550
|
#
|
622
|
-
#
|
551
|
+
# Creates or updates a virtual network in the specified resource group.
|
623
552
|
#
|
624
553
|
# @param resource_group_name [String] The name of the resource group.
|
625
554
|
# @param virtual_network_name [String] The name of the virtual network.
|
626
|
-
# @param
|
555
|
+
# @param parameters [VirtualNetwork] Parameters supplied to the create or
|
556
|
+
# update virtual network operation
|
627
557
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
628
558
|
# will be added to the HTTP request.
|
629
559
|
#
|
630
|
-
# @return [
|
560
|
+
# @return [VirtualNetwork] operation results.
|
631
561
|
#
|
632
|
-
def
|
633
|
-
response =
|
562
|
+
def begin_create_or_update(resource_group_name, virtual_network_name, parameters, custom_headers = nil)
|
563
|
+
response = begin_create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers).value!
|
634
564
|
response.body unless response.nil?
|
635
565
|
end
|
636
566
|
|
637
567
|
#
|
638
|
-
#
|
568
|
+
# Creates or updates a virtual network in the specified resource group.
|
639
569
|
#
|
640
570
|
# @param resource_group_name [String] The name of the resource group.
|
641
571
|
# @param virtual_network_name [String] The name of the virtual network.
|
642
|
-
# @param
|
572
|
+
# @param parameters [VirtualNetwork] Parameters supplied to the create or
|
573
|
+
# update virtual network operation
|
643
574
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
644
575
|
# will be added to the HTTP request.
|
645
576
|
#
|
646
577
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
647
578
|
#
|
648
|
-
def
|
649
|
-
|
579
|
+
def begin_create_or_update_with_http_info(resource_group_name, virtual_network_name, parameters, custom_headers = nil)
|
580
|
+
begin_create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers).value!
|
650
581
|
end
|
651
582
|
|
652
583
|
#
|
653
|
-
#
|
584
|
+
# Creates or updates a virtual network in the specified resource group.
|
654
585
|
#
|
655
586
|
# @param resource_group_name [String] The name of the resource group.
|
656
587
|
# @param virtual_network_name [String] The name of the virtual network.
|
657
|
-
# @param
|
588
|
+
# @param parameters [VirtualNetwork] Parameters supplied to the create or
|
589
|
+
# update virtual network operation
|
658
590
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
659
591
|
# to the HTTP request.
|
660
592
|
#
|
661
593
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
662
594
|
#
|
663
|
-
def
|
595
|
+
def begin_create_or_update_async(resource_group_name, virtual_network_name, parameters, custom_headers = nil)
|
664
596
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
665
597
|
fail ArgumentError, 'virtual_network_name is nil' if virtual_network_name.nil?
|
598
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
666
599
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
667
600
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
668
601
|
|
@@ -672,24 +605,33 @@ module Azure::ARM::Network
|
|
672
605
|
# Set Headers
|
673
606
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
674
607
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
675
|
-
|
608
|
+
|
609
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
610
|
+
|
611
|
+
# Serialize Request
|
612
|
+
request_mapper = VirtualNetwork.mapper()
|
613
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
614
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
615
|
+
|
616
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'
|
676
617
|
|
677
618
|
request_url = @base_url || @client.base_url
|
678
619
|
|
679
620
|
options = {
|
680
621
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
681
622
|
path_params: {'resourceGroupName' => resource_group_name,'virtualNetworkName' => virtual_network_name,'subscriptionId' => @client.subscription_id},
|
682
|
-
query_params: {'
|
623
|
+
query_params: {'api-version' => @client.api_version},
|
624
|
+
body: request_content,
|
683
625
|
headers: request_headers.merge(custom_headers || {}),
|
684
626
|
base_url: request_url
|
685
627
|
}
|
686
|
-
promise = @client.make_request_async(:
|
628
|
+
promise = @client.make_request_async(:put, path_template, options)
|
687
629
|
|
688
630
|
promise = promise.then do |result|
|
689
631
|
http_response = result.response
|
690
632
|
status_code = http_response.status
|
691
633
|
response_content = http_response.body
|
692
|
-
unless status_code == 200
|
634
|
+
unless status_code == 200 || status_code == 201
|
693
635
|
error_model = JSON.load(response_content)
|
694
636
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
695
637
|
end
|
@@ -699,7 +641,17 @@ module Azure::ARM::Network
|
|
699
641
|
if status_code == 200
|
700
642
|
begin
|
701
643
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
702
|
-
result_mapper =
|
644
|
+
result_mapper = VirtualNetwork.mapper()
|
645
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
646
|
+
rescue Exception => e
|
647
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
648
|
+
end
|
649
|
+
end
|
650
|
+
# Deserialize Response
|
651
|
+
if status_code == 201
|
652
|
+
begin
|
653
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
654
|
+
result_mapper = VirtualNetwork.mapper()
|
703
655
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
704
656
|
rescue Exception => e
|
705
657
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -713,10 +665,10 @@ module Azure::ARM::Network
|
|
713
665
|
end
|
714
666
|
|
715
667
|
#
|
716
|
-
#
|
668
|
+
# Gets all virtual networks in a subscription.
|
717
669
|
#
|
718
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
719
|
-
#
|
670
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
671
|
+
# to List operation.
|
720
672
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
721
673
|
# will be added to the HTTP request.
|
722
674
|
#
|
@@ -728,10 +680,10 @@ module Azure::ARM::Network
|
|
728
680
|
end
|
729
681
|
|
730
682
|
#
|
731
|
-
#
|
683
|
+
# Gets all virtual networks in a subscription.
|
732
684
|
#
|
733
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
734
|
-
#
|
685
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
686
|
+
# to List operation.
|
735
687
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
736
688
|
# will be added to the HTTP request.
|
737
689
|
#
|
@@ -742,10 +694,10 @@ module Azure::ARM::Network
|
|
742
694
|
end
|
743
695
|
|
744
696
|
#
|
745
|
-
#
|
697
|
+
# Gets all virtual networks in a subscription.
|
746
698
|
#
|
747
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
748
|
-
#
|
699
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
700
|
+
# to List operation.
|
749
701
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
750
702
|
# to the HTTP request.
|
751
703
|
#
|
@@ -800,10 +752,10 @@ module Azure::ARM::Network
|
|
800
752
|
end
|
801
753
|
|
802
754
|
#
|
803
|
-
#
|
755
|
+
# Gets all virtual networks in a resource group.
|
804
756
|
#
|
805
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
806
|
-
#
|
757
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
758
|
+
# to List operation.
|
807
759
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
808
760
|
# will be added to the HTTP request.
|
809
761
|
#
|
@@ -815,10 +767,10 @@ module Azure::ARM::Network
|
|
815
767
|
end
|
816
768
|
|
817
769
|
#
|
818
|
-
#
|
770
|
+
# Gets all virtual networks in a resource group.
|
819
771
|
#
|
820
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
821
|
-
#
|
772
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
773
|
+
# to List operation.
|
822
774
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
823
775
|
# will be added to the HTTP request.
|
824
776
|
#
|
@@ -829,10 +781,10 @@ module Azure::ARM::Network
|
|
829
781
|
end
|
830
782
|
|
831
783
|
#
|
832
|
-
#
|
784
|
+
# Gets all virtual networks in a resource group.
|
833
785
|
#
|
834
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
835
|
-
#
|
786
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
787
|
+
# to List operation.
|
836
788
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
837
789
|
# to the HTTP request.
|
838
790
|
#
|
@@ -886,5 +838,46 @@ module Azure::ARM::Network
|
|
886
838
|
promise.execute
|
887
839
|
end
|
888
840
|
|
841
|
+
#
|
842
|
+
# Gets all virtual networks in a subscription.
|
843
|
+
#
|
844
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
845
|
+
# will be added to the HTTP request.
|
846
|
+
#
|
847
|
+
# @return [VirtualNetworkListResult] which provide lazy access to pages of the
|
848
|
+
# response.
|
849
|
+
#
|
850
|
+
def list_all_as_lazy(custom_headers = nil)
|
851
|
+
response = list_all_async(custom_headers).value!
|
852
|
+
unless response.nil?
|
853
|
+
page = response.body
|
854
|
+
page.next_method = Proc.new do |next_page_link|
|
855
|
+
list_all_next_async(next_page_link, custom_headers)
|
856
|
+
end
|
857
|
+
page
|
858
|
+
end
|
859
|
+
end
|
860
|
+
|
861
|
+
#
|
862
|
+
# Gets all virtual networks in a resource group.
|
863
|
+
#
|
864
|
+
# @param resource_group_name [String] The name of the resource group.
|
865
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
866
|
+
# will be added to the HTTP request.
|
867
|
+
#
|
868
|
+
# @return [VirtualNetworkListResult] which provide lazy access to pages of the
|
869
|
+
# response.
|
870
|
+
#
|
871
|
+
def list_as_lazy(resource_group_name, custom_headers = nil)
|
872
|
+
response = list_async(resource_group_name, custom_headers).value!
|
873
|
+
unless response.nil?
|
874
|
+
page = response.body
|
875
|
+
page.next_method = Proc.new do |next_page_link|
|
876
|
+
list_next_async(next_page_link, custom_headers)
|
877
|
+
end
|
878
|
+
page
|
879
|
+
end
|
880
|
+
end
|
881
|
+
|
889
882
|
end
|
890
883
|
end
|