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.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_network.rb +59 -52
  3. data/lib/generated/azure_mgmt_network/application_gateways.rb +426 -308
  4. data/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +181 -199
  5. data/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +175 -193
  6. data/lib/generated/azure_mgmt_network/express_route_circuits.rb +458 -497
  7. data/lib/generated/azure_mgmt_network/express_route_service_providers.rb +36 -43
  8. data/lib/generated/azure_mgmt_network/load_balancers.rb +225 -242
  9. data/lib/generated/azure_mgmt_network/local_network_gateways.rb +168 -191
  10. data/lib/generated/azure_mgmt_network/models/address_space.rb +4 -4
  11. data/lib/generated/azure_mgmt_network/models/application_gateway.rb +42 -28
  12. data/lib/generated/azure_mgmt_network/models/application_gateway_authentication_certificate.rb +6 -6
  13. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address.rb +4 -4
  14. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_address_pool.rb +6 -6
  15. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health.rb +52 -0
  16. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_http_settings.rb +66 -0
  17. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_pool.rb +65 -0
  18. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server.rb +67 -0
  19. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_health_server_health.rb +18 -0
  20. data/lib/generated/azure_mgmt_network/models/application_gateway_backend_http_settings.rb +16 -13
  21. data/lib/generated/azure_mgmt_network/models/application_gateway_cookie_based_affinity.rb +1 -1
  22. data/lib/generated/azure_mgmt_network/models/application_gateway_firewall_mode.rb +16 -0
  23. data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_ipconfiguration.rb +13 -12
  24. data/lib/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb +6 -6
  25. data/lib/generated/azure_mgmt_network/models/application_gateway_http_listener.rb +16 -14
  26. data/lib/generated/azure_mgmt_network/models/application_gateway_ipconfiguration.rb +7 -6
  27. data/lib/generated/azure_mgmt_network/models/application_gateway_list_result.rb +4 -4
  28. data/lib/generated/azure_mgmt_network/models/application_gateway_operational_state.rb +1 -1
  29. data/lib/generated/azure_mgmt_network/models/application_gateway_path_rule.rb +9 -9
  30. data/lib/generated/azure_mgmt_network/models/application_gateway_probe.rb +19 -12
  31. data/lib/generated/azure_mgmt_network/models/application_gateway_protocol.rb +1 -1
  32. data/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule.rb +14 -11
  33. data/lib/generated/azure_mgmt_network/models/application_gateway_request_routing_rule_type.rb +1 -1
  34. data/lib/generated/azure_mgmt_network/models/application_gateway_sku.rb +11 -8
  35. data/lib/generated/azure_mgmt_network/models/application_gateway_sku_name.rb +3 -1
  36. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_certificate.rb +12 -9
  37. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_policy.rb +4 -3
  38. data/lib/generated/azure_mgmt_network/models/application_gateway_ssl_protocol.rb +1 -1
  39. data/lib/generated/azure_mgmt_network/models/application_gateway_tier.rb +2 -1
  40. data/lib/generated/azure_mgmt_network/models/application_gateway_url_path_map.rb +10 -9
  41. data/lib/generated/azure_mgmt_network/models/application_gateway_web_application_firewall_configuration.rb +57 -0
  42. data/lib/generated/azure_mgmt_network/models/authorization_list_result.rb +6 -6
  43. data/lib/generated/azure_mgmt_network/models/authorization_use_status.rb +1 -1
  44. data/lib/generated/azure_mgmt_network/models/azure_async_operation_result.rb +4 -3
  45. data/lib/generated/azure_mgmt_network/models/backend_address_pool.rb +11 -11
  46. data/lib/generated/azure_mgmt_network/models/bgp_settings.rb +7 -6
  47. data/lib/generated/azure_mgmt_network/models/connection_reset_shared_key.rb +8 -3
  48. data/lib/generated/azure_mgmt_network/models/connection_shared_key.rb +4 -4
  49. data/lib/generated/azure_mgmt_network/models/dhcp_options.rb +4 -4
  50. data/lib/generated/azure_mgmt_network/models/dns_name_availability_result.rb +3 -3
  51. data/lib/generated/azure_mgmt_network/models/effective_network_security_group.rb +5 -6
  52. data/lib/generated/azure_mgmt_network/models/effective_network_security_group_association.rb +4 -4
  53. data/lib/generated/azure_mgmt_network/models/effective_network_security_group_list_result.rb +5 -5
  54. data/lib/generated/azure_mgmt_network/models/effective_network_security_rule.rb +20 -17
  55. data/lib/generated/azure_mgmt_network/models/effective_route.rb +16 -13
  56. data/lib/generated/azure_mgmt_network/models/effective_route_list_result.rb +4 -4
  57. data/lib/generated/azure_mgmt_network/models/effective_route_source.rb +1 -1
  58. data/lib/generated/azure_mgmt_network/models/effective_route_state.rb +1 -1
  59. data/lib/generated/azure_mgmt_network/models/error.rb +2 -1
  60. data/lib/generated/azure_mgmt_network/models/error_details.rb +2 -1
  61. data/lib/generated/azure_mgmt_network/models/express_route_circuit.rb +20 -21
  62. data/lib/generated/azure_mgmt_network/models/express_route_circuit_arp_table.rb +6 -6
  63. data/lib/generated/azure_mgmt_network/models/express_route_circuit_authorization.rb +10 -9
  64. data/lib/generated/azure_mgmt_network/models/express_route_circuit_list_result.rb +5 -5
  65. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering.rb +26 -24
  66. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_advertised_public_prefix_state.rb +1 -1
  67. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_config.rb +10 -10
  68. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_list_result.rb +6 -6
  69. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_state.rb +1 -1
  70. data/lib/generated/azure_mgmt_network/models/express_route_circuit_peering_type.rb +1 -1
  71. data/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table.rb +4 -4
  72. data/lib/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb +5 -5
  73. data/lib/generated/azure_mgmt_network/models/express_route_circuit_service_provider_properties.rb +5 -5
  74. data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku.rb +9 -7
  75. data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_family.rb +1 -1
  76. data/lib/generated/azure_mgmt_network/models/express_route_circuit_sku_tier.rb +1 -1
  77. data/lib/generated/azure_mgmt_network/models/express_route_circuit_stats.rb +2 -2
  78. data/lib/generated/azure_mgmt_network/models/express_route_circuits_arp_table_list_result.rb +5 -4
  79. data/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_list_result.rb +5 -5
  80. data/lib/generated/azure_mgmt_network/models/express_route_circuits_routes_table_summary_list_result.rb +5 -5
  81. data/lib/generated/azure_mgmt_network/models/express_route_service_provider.rb +6 -6
  82. data/lib/generated/azure_mgmt_network/models/express_route_service_provider_bandwidths_offered.rb +4 -4
  83. data/lib/generated/azure_mgmt_network/models/express_route_service_provider_list_result.rb +5 -5
  84. data/lib/generated/azure_mgmt_network/models/frontend_ipconfiguration.rb +18 -19
  85. data/lib/generated/azure_mgmt_network/models/inbound_nat_pool.rb +19 -27
  86. data/lib/generated/azure_mgmt_network/models/inbound_nat_rule.rb +25 -33
  87. data/lib/generated/azure_mgmt_network/models/ipaddress_availability_result.rb +4 -4
  88. data/lib/generated/azure_mgmt_network/models/ipallocation_method.rb +1 -1
  89. data/lib/generated/azure_mgmt_network/models/ipconfiguration.rb +12 -13
  90. data/lib/generated/azure_mgmt_network/models/ipversion.rb +1 -1
  91. data/lib/generated/azure_mgmt_network/models/load_balancer.rb +31 -16
  92. data/lib/generated/azure_mgmt_network/models/load_balancer_list_result.rb +5 -5
  93. data/lib/generated/azure_mgmt_network/models/load_balancing_rule.rb +29 -38
  94. data/lib/generated/azure_mgmt_network/models/load_distribution.rb +1 -1
  95. data/lib/generated/azure_mgmt_network/models/local_network_gateway.rb +11 -10
  96. data/lib/generated/azure_mgmt_network/models/local_network_gateway_list_result.rb +5 -5
  97. data/lib/generated/azure_mgmt_network/models/network_interface.rb +31 -20
  98. data/lib/generated/azure_mgmt_network/models/network_interface_dns_settings.rb +18 -8
  99. data/lib/generated/azure_mgmt_network/models/network_interface_ipconfiguration.rb +19 -16
  100. data/lib/generated/azure_mgmt_network/models/network_interface_list_result.rb +5 -5
  101. data/lib/generated/azure_mgmt_network/models/network_operation_status.rb +1 -1
  102. data/lib/generated/azure_mgmt_network/models/network_security_group.rb +15 -15
  103. data/lib/generated/azure_mgmt_network/models/network_security_group_list_result.rb +5 -5
  104. data/lib/generated/azure_mgmt_network/models/outbound_nat_rule.rb +12 -14
  105. data/lib/generated/azure_mgmt_network/models/probe.rb +27 -28
  106. data/lib/generated/azure_mgmt_network/models/probe_protocol.rb +1 -1
  107. data/lib/generated/azure_mgmt_network/models/processor_architecture.rb +1 -1
  108. data/lib/generated/azure_mgmt_network/models/public_ipaddress.rb +15 -15
  109. data/lib/generated/azure_mgmt_network/models/public_ipaddress_dns_settings.rb +15 -14
  110. data/lib/generated/azure_mgmt_network/models/public_ipaddress_list_result.rb +5 -5
  111. data/lib/generated/azure_mgmt_network/models/resource_navigation_link.rb +6 -6
  112. data/lib/generated/azure_mgmt_network/models/route.rb +13 -13
  113. data/lib/generated/azure_mgmt_network/models/route_list_result.rb +4 -4
  114. data/lib/generated/azure_mgmt_network/models/route_next_hop_type.rb +1 -1
  115. data/lib/generated/azure_mgmt_network/models/route_table.rb +8 -7
  116. data/lib/generated/azure_mgmt_network/models/route_table_list_result.rb +5 -5
  117. data/lib/generated/azure_mgmt_network/models/security_rule.rb +33 -36
  118. data/lib/generated/azure_mgmt_network/models/security_rule_access.rb +1 -1
  119. data/lib/generated/azure_mgmt_network/models/security_rule_direction.rb +1 -1
  120. data/lib/generated/azure_mgmt_network/models/security_rule_list_result.rb +6 -6
  121. data/lib/generated/azure_mgmt_network/models/security_rule_protocol.rb +1 -1
  122. data/lib/generated/azure_mgmt_network/models/service_provider_provisioning_state.rb +1 -1
  123. data/lib/generated/azure_mgmt_network/models/subnet.rb +14 -15
  124. data/lib/generated/azure_mgmt_network/models/subnet_list_result.rb +4 -4
  125. data/lib/generated/azure_mgmt_network/models/transport_protocol.rb +1 -1
  126. data/lib/generated/azure_mgmt_network/models/tunnel_connection_health.rb +92 -0
  127. data/lib/generated/azure_mgmt_network/models/usage.rb +7 -7
  128. data/lib/generated/azure_mgmt_network/models/usage_name.rb +4 -5
  129. data/lib/generated/azure_mgmt_network/models/usages_list_result.rb +3 -3
  130. data/lib/generated/azure_mgmt_network/models/virtual_network.rb +15 -16
  131. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway.rb +26 -23
  132. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection.rb +45 -18
  133. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_list_result.rb +6 -5
  134. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_status.rb +1 -1
  135. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_connection_type.rb +1 -1
  136. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_ipconfiguration.rb +15 -14
  137. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_list_result.rb +5 -5
  138. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku.rb +12 -10
  139. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_name.rb +1 -1
  140. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_sku_tier.rb +1 -1
  141. data/lib/generated/azure_mgmt_network/models/virtual_network_gateway_type.rb +1 -1
  142. data/lib/generated/azure_mgmt_network/models/virtual_network_list_result.rb +5 -5
  143. data/lib/generated/azure_mgmt_network/models/virtual_network_peering.rb +21 -23
  144. data/lib/generated/azure_mgmt_network/models/virtual_network_peering_list_result.rb +6 -6
  145. data/lib/generated/azure_mgmt_network/models/virtual_network_peering_state.rb +1 -1
  146. data/lib/generated/azure_mgmt_network/models/vpn_client_configuration.rb +5 -5
  147. data/lib/generated/azure_mgmt_network/models/vpn_client_parameters.rb +5 -4
  148. data/lib/generated/azure_mgmt_network/models/vpn_client_revoked_certificate.rb +10 -9
  149. data/lib/generated/azure_mgmt_network/models/vpn_client_root_certificate.rb +10 -8
  150. data/lib/generated/azure_mgmt_network/models/vpn_type.rb +1 -1
  151. data/lib/generated/azure_mgmt_network/module_definition.rb +1 -1
  152. data/lib/generated/azure_mgmt_network/network_interfaces.rb +443 -478
  153. data/lib/generated/azure_mgmt_network/network_management_client.rb +20 -7
  154. data/lib/generated/azure_mgmt_network/network_security_groups.rb +224 -249
  155. data/lib/generated/azure_mgmt_network/public_ipaddresses.rb +220 -241
  156. data/lib/generated/azure_mgmt_network/route_tables.rb +219 -226
  157. data/lib/generated/azure_mgmt_network/routes.rb +171 -181
  158. data/lib/generated/azure_mgmt_network/security_rules.rb +175 -193
  159. data/lib/generated/azure_mgmt_network/subnets.rb +177 -181
  160. data/lib/generated/azure_mgmt_network/usages.rb +34 -34
  161. data/lib/generated/azure_mgmt_network/version.rb +2 -2
  162. data/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +335 -358
  163. data/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +246 -289
  164. data/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +177 -191
  165. data/lib/generated/azure_mgmt_network/virtual_networks.rb +242 -249
  166. metadata +12 -5
  167. data/lib/generated/azure_mgmt_network/models/connection_shared_key_result.rb +0 -44
@@ -1,23 +1,23 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.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
  module Models
8
8
  #
9
- # Response for ListSubnets Api service callRetrieves all subnet that
10
- # belongs to a virtual network
9
+ # Response for ListSubnets API service call. Retrieves all subnets that
10
+ # belong to a virtual network.
11
11
  #
12
12
  class VirtualNetworkPeeringListResult
13
13
 
14
14
  include MsRestAzure
15
15
 
16
- # @return [Array<VirtualNetworkPeering>] Gets the peerings in a virtual
17
- # network
16
+ # @return [Array<VirtualNetworkPeering>] The peerings in a virtual
17
+ # network.
18
18
  attr_accessor :value
19
19
 
20
- # @return [String] Gets the URL to get the next set of results.
20
+ # @return [String] The URL to get the next set of results.
21
21
  attr_accessor :next_link
22
22
 
23
23
  # return [Proc] with next page method call.
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.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
 
@@ -1,23 +1,23 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.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
  module Models
8
8
  #
9
- # VpnClientConfiguration for P2S client
9
+ # VpnClientConfiguration for P2S client.
10
10
  #
11
11
  class VpnClientConfiguration
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [AddressSpace] Gets or sets the reference of the Address space
16
- # resource which represents Address space for P2S VpnClient.
15
+ # @return [AddressSpace] The reference of the address space resource
16
+ # which represents Address space for P2S VpnClient.
17
17
  attr_accessor :vpn_client_address_pool
18
18
 
19
19
  # @return [Array<VpnClientRootCertificate>] VpnClientRootCertificate for
20
- # Virtual network gateway.
20
+ # virtual network gateway.
21
21
  attr_accessor :vpn_client_root_certificates
22
22
 
23
23
  # @return [Array<VpnClientRevokedCertificate>]
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.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
 
@@ -12,8 +12,9 @@ module Azure::ARM::Network
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [ProcessorArchitecture] VPN client Processor Architecture
16
- # -Amd64/X86. Possible values include: 'Amd64', 'X86'
15
+ # @return [ProcessorArchitecture] VPN client Processor Architecture.
16
+ # Possible values are: 'AMD64' and 'X86'. Possible values include:
17
+ # 'Amd64', 'X86'
17
18
  attr_accessor :processor_architecture
18
19
 
19
20
 
@@ -30,7 +31,7 @@ module Azure::ARM::Network
30
31
  class_name: 'VpnClientParameters',
31
32
  model_properties: {
32
33
  processor_architecture: {
33
- required: false,
34
+ required: true,
34
35
  serialized_name: 'ProcessorArchitecture',
35
36
  type: {
36
37
  name: 'String'
@@ -1,31 +1,31 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.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
  module Models
8
8
  #
9
- # VPN client revoked certificate of virtual network gateway
9
+ # VPN client revoked certificate of virtual network gateway.
10
10
  #
11
11
  class VpnClientRevokedCertificate < MsRestAzure::SubResource
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Gets or sets the revoked Vpn client certificate
16
- # thumbprint
15
+ # @return [String] The revoked VPN client certificate thumbprint.
17
16
  attr_accessor :thumbprint
18
17
 
19
- # @return [String] Gets provisioning state of the VPN client revoked
20
- # certificate resource Updating/Deleting/Failed
18
+ # @return [String] The provisioning state of the VPN client revoked
19
+ # certificate resource. Possible values are: 'Updating', 'Deleting', and
20
+ # 'Failed'.
21
21
  attr_accessor :provisioning_state
22
22
 
23
- # @return [String] Gets name of the resource that is unique within a
24
- # resource group. This name can be used to access the resource
23
+ # @return [String] The name of the resource that is unique within a
24
+ # resource group. This name can be used to access the resource.
25
25
  attr_accessor :name
26
26
 
27
27
  # @return [String] A unique read-only string that changes whenever the
28
- # resource is updated
28
+ # resource is updated.
29
29
  attr_accessor :etag
30
30
 
31
31
 
@@ -57,6 +57,7 @@ module Azure::ARM::Network
57
57
  },
58
58
  provisioning_state: {
59
59
  required: false,
60
+ read_only: true,
60
61
  serialized_name: 'properties.provisioningState',
61
62
  type: {
62
63
  name: 'String'
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.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
 
@@ -12,19 +12,20 @@ module Azure::ARM::Network
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Gets or sets the certificate public data
15
+ # @return [String] The certificate public data.
16
16
  attr_accessor :public_cert_data
17
17
 
18
- # @return [String] Gets provisioning state of the VPN client root
19
- # certificate resource Updating/Deleting/Failed
18
+ # @return [String] The provisioning state of the VPN client root
19
+ # certificate resource. Possible values are: 'Updating', 'Deleting', and
20
+ # 'Failed'.
20
21
  attr_accessor :provisioning_state
21
22
 
22
- # @return [String] Gets name of the resource that is unique within a
23
- # resource group. This name can be used to access the resource
23
+ # @return [String] The name of the resource that is unique within a
24
+ # resource group. This name can be used to access the resource.
24
25
  attr_accessor :name
25
26
 
26
27
  # @return [String] A unique read-only string that changes whenever the
27
- # resource is updated
28
+ # resource is updated.
28
29
  attr_accessor :etag
29
30
 
30
31
 
@@ -48,7 +49,7 @@ module Azure::ARM::Network
48
49
  }
49
50
  },
50
51
  public_cert_data: {
51
- required: false,
52
+ required: true,
52
53
  serialized_name: 'properties.publicCertData',
53
54
  type: {
54
55
  name: 'String'
@@ -56,6 +57,7 @@ module Azure::ARM::Network
56
57
  },
57
58
  provisioning_state: {
58
59
  required: false,
60
+ read_only: true,
59
61
  serialized_name: 'properties.provisioningState',
60
62
  type: {
61
63
  name: 'String'
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.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
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.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
 
@@ -1,14 +1,14 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.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
- # your network resources. The API has entities that capture the
11
- # relationship between an end user and the Microsoft Azure Networks service.
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 NetworkInterfaces
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
- # The delete netwokInterface operation deletes the specified netwokInterface.
29
+ # Deletes the specified network interface.
30
30
  #
31
31
  # @param resource_group_name [String] The name of the resource group.
32
32
  # @param network_interface_name [String] The name of the network interface.
@@ -64,92 +64,11 @@ module Azure::ARM::Network
64
64
  end
65
65
 
66
66
  #
67
- # The delete netwokInterface operation deletes the specified netwokInterface.
67
+ # Gets information about the specified network interface.
68
68
  #
69
69
  # @param resource_group_name [String] The name of the resource group.
70
70
  # @param network_interface_name [String] The name of the network interface.
71
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
72
- # will be added to the HTTP request.
73
- #
74
- #
75
- def begin_delete(resource_group_name, network_interface_name, custom_headers = nil)
76
- response = begin_delete_async(resource_group_name, network_interface_name, custom_headers).value!
77
- nil
78
- end
79
-
80
- #
81
- # The delete netwokInterface operation deletes the specified netwokInterface.
82
- #
83
- # @param resource_group_name [String] The name of the resource group.
84
- # @param network_interface_name [String] The name of the network interface.
85
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
86
- # will be added to the HTTP request.
87
- #
88
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
89
- #
90
- def begin_delete_with_http_info(resource_group_name, network_interface_name, custom_headers = nil)
91
- begin_delete_async(resource_group_name, network_interface_name, custom_headers).value!
92
- end
93
-
94
- #
95
- # The delete netwokInterface operation deletes the specified netwokInterface.
96
- #
97
- # @param resource_group_name [String] The name of the resource group.
98
- # @param network_interface_name [String] The name of the network interface.
99
- # @param [Hash{String => String}] A hash of custom headers that will be added
100
- # to the HTTP request.
101
- #
102
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
103
- #
104
- def begin_delete_async(resource_group_name, network_interface_name, custom_headers = nil)
105
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
106
- fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
107
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
108
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
109
-
110
-
111
- request_headers = {}
112
-
113
- # Set Headers
114
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
115
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
116
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'
117
-
118
- request_url = @base_url || @client.base_url
119
-
120
- options = {
121
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
122
- path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
123
- query_params: {'api-version' => @client.api_version},
124
- headers: request_headers.merge(custom_headers || {}),
125
- base_url: request_url
126
- }
127
- promise = @client.make_request_async(:delete, path_template, options)
128
-
129
- promise = promise.then do |result|
130
- http_response = result.response
131
- status_code = http_response.status
132
- response_content = http_response.body
133
- unless status_code == 204 || status_code == 202 || status_code == 200
134
- error_model = JSON.load(response_content)
135
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
136
- end
137
-
138
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
139
-
140
- result
141
- end
142
-
143
- promise.execute
144
- end
145
-
146
- #
147
- # The Get network interface operation retrieves information about the
148
- # specified network interface.
149
- #
150
- # @param resource_group_name [String] The name of the resource group.
151
- # @param network_interface_name [String] The name of the network interface.
152
- # @param expand [String] expand references resources.
71
+ # @param expand [String] Expands referenced resources.
153
72
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
73
  # will be added to the HTTP request.
155
74
  #
@@ -161,12 +80,11 @@ module Azure::ARM::Network
161
80
  end
162
81
 
163
82
  #
164
- # The Get network interface operation retrieves information about the
165
- # specified network interface.
83
+ # Gets information about the specified network interface.
166
84
  #
167
85
  # @param resource_group_name [String] The name of the resource group.
168
86
  # @param network_interface_name [String] The name of the network interface.
169
- # @param expand [String] expand references resources.
87
+ # @param expand [String] Expands referenced resources.
170
88
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
171
89
  # will be added to the HTTP request.
172
90
  #
@@ -177,12 +95,11 @@ module Azure::ARM::Network
177
95
  end
178
96
 
179
97
  #
180
- # The Get network interface operation retrieves information about the
181
- # specified network interface.
98
+ # Gets information about the specified network interface.
182
99
  #
183
100
  # @param resource_group_name [String] The name of the resource group.
184
101
  # @param network_interface_name [String] The name of the network interface.
185
- # @param expand [String] expand references resources.
102
+ # @param expand [String] Expands referenced resources.
186
103
  # @param [Hash{String => String}] A hash of custom headers that will be added
187
104
  # to the HTTP request.
188
105
  #
@@ -241,12 +158,12 @@ module Azure::ARM::Network
241
158
  end
242
159
 
243
160
  #
244
- # The Put NetworkInterface operation creates/updates a networkInterface
161
+ # Creates or updates a network interface.
245
162
  #
246
163
  # @param resource_group_name [String] The name of the resource group.
247
164
  # @param network_interface_name [String] The name of the network interface.
248
- # @param parameters [NetworkInterface] Parameters supplied to the
249
- # create/update NetworkInterface operation
165
+ # @param parameters [NetworkInterface] Parameters supplied to the create or
166
+ # update network interface operation.
250
167
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
168
  # will be added to the HTTP request.
252
169
  #
@@ -260,8 +177,8 @@ module Azure::ARM::Network
260
177
  #
261
178
  # @param resource_group_name [String] The name of the resource group.
262
179
  # @param network_interface_name [String] The name of the network interface.
263
- # @param parameters [NetworkInterface] Parameters supplied to the
264
- # create/update NetworkInterface operation
180
+ # @param parameters [NetworkInterface] Parameters supplied to the create or
181
+ # update network interface operation.
265
182
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
266
183
  # will be added to the HTTP request.
267
184
  #
@@ -287,54 +204,57 @@ module Azure::ARM::Network
287
204
  end
288
205
 
289
206
  #
290
- # The Put NetworkInterface operation creates/updates a networkInterface
207
+ # Gets information about all network interfaces in a virtual machine in a
208
+ # virtual machine scale set.
291
209
  #
292
210
  # @param resource_group_name [String] The name of the resource group.
293
- # @param network_interface_name [String] The name of the network interface.
294
- # @param parameters [NetworkInterface] Parameters supplied to the
295
- # create/update NetworkInterface operation
211
+ # @param virtual_machine_scale_set_name [String] The name of the virtual
212
+ # machine scale set.
213
+ # @param virtualmachine_index [String] The virtual machine index.
296
214
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
297
215
  # will be added to the HTTP request.
298
216
  #
299
- # @return [NetworkInterface] operation results.
217
+ # @return [Array<NetworkInterface>] operation results.
300
218
  #
301
- def begin_create_or_update(resource_group_name, network_interface_name, parameters, custom_headers = nil)
302
- response = begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers).value!
303
- response.body unless response.nil?
219
+ def list_virtual_machine_scale_set_vmnetwork_interfaces(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
220
+ first_page = list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers)
221
+ first_page.get_all_items
304
222
  end
305
223
 
306
224
  #
307
- # The Put NetworkInterface operation creates/updates a networkInterface
225
+ # Gets information about all network interfaces in a virtual machine in a
226
+ # virtual machine scale set.
308
227
  #
309
228
  # @param resource_group_name [String] The name of the resource group.
310
- # @param network_interface_name [String] The name of the network interface.
311
- # @param parameters [NetworkInterface] Parameters supplied to the
312
- # create/update NetworkInterface operation
229
+ # @param virtual_machine_scale_set_name [String] The name of the virtual
230
+ # machine scale set.
231
+ # @param virtualmachine_index [String] The virtual machine index.
313
232
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
314
233
  # will be added to the HTTP request.
315
234
  #
316
235
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
317
236
  #
318
- def begin_create_or_update_with_http_info(resource_group_name, network_interface_name, parameters, custom_headers = nil)
319
- begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers).value!
237
+ def list_virtual_machine_scale_set_vmnetwork_interfaces_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
238
+ list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers).value!
320
239
  end
321
240
 
322
241
  #
323
- # The Put NetworkInterface operation creates/updates a networkInterface
242
+ # Gets information about all network interfaces in a virtual machine in a
243
+ # virtual machine scale set.
324
244
  #
325
245
  # @param resource_group_name [String] The name of the resource group.
326
- # @param network_interface_name [String] The name of the network interface.
327
- # @param parameters [NetworkInterface] Parameters supplied to the
328
- # create/update NetworkInterface operation
246
+ # @param virtual_machine_scale_set_name [String] The name of the virtual
247
+ # machine scale set.
248
+ # @param virtualmachine_index [String] The virtual machine index.
329
249
  # @param [Hash{String => String}] A hash of custom headers that will be added
330
250
  # to the HTTP request.
331
251
  #
332
252
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
333
253
  #
334
- def begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers = nil)
254
+ def list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
335
255
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
336
- fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
337
- fail ArgumentError, 'parameters is nil' if parameters.nil?
256
+ fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
257
+ fail ArgumentError, 'virtualmachine_index is nil' if virtualmachine_index.nil?
338
258
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
339
259
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
340
260
 
@@ -344,53 +264,34 @@ module Azure::ARM::Network
344
264
  # Set Headers
345
265
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
346
266
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
347
-
348
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
349
-
350
- # Serialize Request
351
- request_mapper = NetworkInterface.mapper()
352
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
353
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
354
-
355
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'
267
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces'
356
268
 
357
269
  request_url = @base_url || @client.base_url
358
270
 
359
271
  options = {
360
272
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
361
- path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
273
+ path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'virtualmachineIndex' => virtualmachine_index,'subscriptionId' => @client.subscription_id},
362
274
  query_params: {'api-version' => @client.api_version},
363
- body: request_content,
364
275
  headers: request_headers.merge(custom_headers || {}),
365
276
  base_url: request_url
366
277
  }
367
- promise = @client.make_request_async(:put, path_template, options)
278
+ promise = @client.make_request_async(:get, path_template, options)
368
279
 
369
280
  promise = promise.then do |result|
370
281
  http_response = result.response
371
282
  status_code = http_response.status
372
283
  response_content = http_response.body
373
- unless status_code == 201 || status_code == 200
284
+ unless status_code == 200
374
285
  error_model = JSON.load(response_content)
375
286
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
376
287
  end
377
288
 
378
289
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
379
290
  # Deserialize Response
380
- if status_code == 201
381
- begin
382
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
383
- result_mapper = NetworkInterface.mapper()
384
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
385
- rescue Exception => e
386
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
387
- end
388
- end
389
- # Deserialize Response
390
291
  if status_code == 200
391
292
  begin
392
293
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
393
- result_mapper = NetworkInterface.mapper()
294
+ result_mapper = NetworkInterfaceListResult.mapper()
394
295
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
395
296
  rescue Exception => e
396
297
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -404,82 +305,50 @@ module Azure::ARM::Network
404
305
  end
405
306
 
406
307
  #
407
- # The list network interface operation retrieves information about all network
408
- # interfaces in a virtual machine from a virtual machine scale set.
308
+ # Gets all network interfaces in a virtual machine scale set.
409
309
  #
410
310
  # @param resource_group_name [String] The name of the resource group.
411
311
  # @param virtual_machine_scale_set_name [String] The name of the virtual
412
312
  # machine scale set.
413
- # @param virtualmachine_index [String] The virtual machine index.
414
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
415
- # will be added to the HTTP request.
416
- #
417
- # @return [NetworkInterfaceListResult] which provide lazy access to pages of
418
- # the response.
419
- #
420
- def list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
421
- response = list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers).value!
422
- unless response.nil?
423
- page = response.body
424
- page.next_method = Proc.new do |next_page_link|
425
- list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers)
426
- end
427
- page
428
- end
429
- end
430
-
431
- #
432
- # The list network interface operation retrieves information about all network
433
- # interfaces in a virtual machine from a virtual machine scale set.
434
- #
435
- # @param resource_group_name [String] The name of the resource group.
436
- # @param virtual_machine_scale_set_name [String] The name of the virtual
437
- # machine scale set.
438
- # @param virtualmachine_index [String] The virtual machine index.
439
313
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
440
314
  # will be added to the HTTP request.
441
315
  #
442
316
  # @return [Array<NetworkInterface>] operation results.
443
317
  #
444
- def list_virtual_machine_scale_set_vmnetwork_interfaces(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
445
- first_page = list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers)
318
+ def list_virtual_machine_scale_set_network_interfaces(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
319
+ first_page = list_virtual_machine_scale_set_network_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, custom_headers)
446
320
  first_page.get_all_items
447
321
  end
448
322
 
449
323
  #
450
- # The list network interface operation retrieves information about all network
451
- # interfaces in a virtual machine from a virtual machine scale set.
324
+ # Gets all network interfaces in a virtual machine scale set.
452
325
  #
453
326
  # @param resource_group_name [String] The name of the resource group.
454
327
  # @param virtual_machine_scale_set_name [String] The name of the virtual
455
328
  # machine scale set.
456
- # @param virtualmachine_index [String] The virtual machine index.
457
329
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
458
330
  # will be added to the HTTP request.
459
331
  #
460
332
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
461
333
  #
462
- def list_virtual_machine_scale_set_vmnetwork_interfaces_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
463
- list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers).value!
334
+ def list_virtual_machine_scale_set_network_interfaces_with_http_info(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
335
+ list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers).value!
464
336
  end
465
337
 
466
338
  #
467
- # The list network interface operation retrieves information about all network
468
- # interfaces in a virtual machine from a virtual machine scale set.
339
+ # Gets all network interfaces in a virtual machine scale set.
469
340
  #
470
341
  # @param resource_group_name [String] The name of the resource group.
471
342
  # @param virtual_machine_scale_set_name [String] The name of the virtual
472
343
  # machine scale set.
473
- # @param virtualmachine_index [String] The virtual machine index.
474
344
  # @param [Hash{String => String}] A hash of custom headers that will be added
475
345
  # to the HTTP request.
476
346
  #
477
347
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
478
348
  #
479
- def list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
349
+ def list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
480
350
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
481
351
  fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
482
- fail ArgumentError, 'virtualmachine_index is nil' if virtualmachine_index.nil?
483
352
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
484
353
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
485
354
 
@@ -489,13 +358,13 @@ module Azure::ARM::Network
489
358
  # Set Headers
490
359
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
491
360
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
492
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces'
361
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces'
493
362
 
494
363
  request_url = @base_url || @client.base_url
495
364
 
496
365
  options = {
497
366
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
498
- path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'virtualmachineIndex' => virtualmachine_index,'subscriptionId' => @client.subscription_id},
367
+ path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'subscriptionId' => @client.subscription_id},
499
368
  query_params: {'api-version' => @client.api_version},
500
369
  headers: request_headers.merge(custom_headers || {}),
501
370
  base_url: request_url
@@ -530,77 +399,144 @@ module Azure::ARM::Network
530
399
  end
531
400
 
532
401
  #
533
- # The list network interface operation retrieves information about all network
534
- # interfaces in a virtual machine scale set.
402
+ # Get the specified network interface in a virtual machine scale set.
535
403
  #
536
404
  # @param resource_group_name [String] The name of the resource group.
537
405
  # @param virtual_machine_scale_set_name [String] The name of the virtual
538
406
  # machine scale set.
407
+ # @param virtualmachine_index [String] The virtual machine index.
408
+ # @param network_interface_name [String] The name of the network interface.
409
+ # @param expand [String] Expands referenced resources.
539
410
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
540
411
  # will be added to the HTTP request.
541
412
  #
542
- # @return [NetworkInterfaceListResult] which provide lazy access to pages of
543
- # the response.
413
+ # @return [NetworkInterface] operation results.
544
414
  #
545
- def list_virtual_machine_scale_set_network_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
546
- response = list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers).value!
547
- unless response.nil?
548
- page = response.body
549
- page.next_method = Proc.new do |next_page_link|
550
- list_virtual_machine_scale_set_network_interfaces_next_async(next_page_link, custom_headers)
551
- end
552
- page
553
- end
415
+ def get_virtual_machine_scale_set_network_interface(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand = nil, custom_headers = nil)
416
+ response = get_virtual_machine_scale_set_network_interface_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand, custom_headers).value!
417
+ response.body unless response.nil?
554
418
  end
555
419
 
556
420
  #
557
- # The list network interface operation retrieves information about all network
558
- # interfaces in a virtual machine scale set.
421
+ # Get the specified network interface in a virtual machine scale set.
559
422
  #
560
423
  # @param resource_group_name [String] The name of the resource group.
561
424
  # @param virtual_machine_scale_set_name [String] The name of the virtual
562
425
  # machine scale set.
426
+ # @param virtualmachine_index [String] The virtual machine index.
427
+ # @param network_interface_name [String] The name of the network interface.
428
+ # @param expand [String] Expands referenced resources.
563
429
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
564
430
  # will be added to the HTTP request.
565
431
  #
566
- # @return [Array<NetworkInterface>] operation results.
432
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
567
433
  #
568
- def list_virtual_machine_scale_set_network_interfaces(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
569
- first_page = list_virtual_machine_scale_set_network_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, custom_headers)
570
- first_page.get_all_items
434
+ def get_virtual_machine_scale_set_network_interface_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand = nil, custom_headers = nil)
435
+ get_virtual_machine_scale_set_network_interface_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand, custom_headers).value!
571
436
  end
572
437
 
573
438
  #
574
- # The list network interface operation retrieves information about all network
575
- # interfaces in a virtual machine scale set.
439
+ # Get the specified network interface in a virtual machine scale set.
576
440
  #
577
441
  # @param resource_group_name [String] The name of the resource group.
578
442
  # @param virtual_machine_scale_set_name [String] The name of the virtual
579
443
  # machine scale set.
444
+ # @param virtualmachine_index [String] The virtual machine index.
445
+ # @param network_interface_name [String] The name of the network interface.
446
+ # @param expand [String] Expands referenced resources.
447
+ # @param [Hash{String => String}] A hash of custom headers that will be added
448
+ # to the HTTP request.
449
+ #
450
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
451
+ #
452
+ def get_virtual_machine_scale_set_network_interface_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand = nil, custom_headers = nil)
453
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
454
+ fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
455
+ fail ArgumentError, 'virtualmachine_index is nil' if virtualmachine_index.nil?
456
+ fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
457
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
458
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
459
+
460
+
461
+ request_headers = {}
462
+
463
+ # Set Headers
464
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
465
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
466
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}'
467
+
468
+ request_url = @base_url || @client.base_url
469
+
470
+ options = {
471
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
472
+ path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'virtualmachineIndex' => virtualmachine_index,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
473
+ query_params: {'api-version' => @client.api_version,'$expand' => expand},
474
+ headers: request_headers.merge(custom_headers || {}),
475
+ base_url: request_url
476
+ }
477
+ promise = @client.make_request_async(:get, path_template, options)
478
+
479
+ promise = promise.then do |result|
480
+ http_response = result.response
481
+ status_code = http_response.status
482
+ response_content = http_response.body
483
+ unless status_code == 200
484
+ error_model = JSON.load(response_content)
485
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
486
+ end
487
+
488
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
489
+ # Deserialize Response
490
+ if status_code == 200
491
+ begin
492
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
493
+ result_mapper = NetworkInterface.mapper()
494
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
495
+ rescue Exception => e
496
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
497
+ end
498
+ end
499
+
500
+ result
501
+ end
502
+
503
+ promise.execute
504
+ end
505
+
506
+ #
507
+ # Gets all network interfaces in a subscription.
508
+ #
509
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
510
+ # will be added to the HTTP request.
511
+ #
512
+ # @return [Array<NetworkInterface>] operation results.
513
+ #
514
+ def list_all(custom_headers = nil)
515
+ first_page = list_all_as_lazy(custom_headers)
516
+ first_page.get_all_items
517
+ end
518
+
519
+ #
520
+ # Gets all network interfaces in a subscription.
521
+ #
580
522
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
581
523
  # will be added to the HTTP request.
582
524
  #
583
525
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
584
526
  #
585
- def list_virtual_machine_scale_set_network_interfaces_with_http_info(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
586
- list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers).value!
527
+ def list_all_with_http_info(custom_headers = nil)
528
+ list_all_async(custom_headers).value!
587
529
  end
588
530
 
589
531
  #
590
- # The list network interface operation retrieves information about all network
591
- # interfaces in a virtual machine scale set.
532
+ # Gets all network interfaces in a subscription.
592
533
  #
593
- # @param resource_group_name [String] The name of the resource group.
594
- # @param virtual_machine_scale_set_name [String] The name of the virtual
595
- # machine scale set.
596
534
  # @param [Hash{String => String}] A hash of custom headers that will be added
597
535
  # to the HTTP request.
598
536
  #
599
537
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
600
538
  #
601
- def list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
602
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
603
- fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
539
+ def list_all_async(custom_headers = nil)
604
540
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
605
541
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
606
542
 
@@ -610,13 +546,13 @@ module Azure::ARM::Network
610
546
  # Set Headers
611
547
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
612
548
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
613
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces'
549
+ path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces'
614
550
 
615
551
  request_url = @base_url || @client.base_url
616
552
 
617
553
  options = {
618
554
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
619
- path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'subscriptionId' => @client.subscription_id},
555
+ path_params: {'subscriptionId' => @client.subscription_id},
620
556
  query_params: {'api-version' => @client.api_version},
621
557
  headers: request_headers.merge(custom_headers || {}),
622
558
  base_url: request_url
@@ -651,64 +587,43 @@ module Azure::ARM::Network
651
587
  end
652
588
 
653
589
  #
654
- # The Get network interface operation retrieves information about the
655
- # specified network interface in a virtual machine scale set.
590
+ # Gets all network interfaces in a resource group.
656
591
  #
657
592
  # @param resource_group_name [String] The name of the resource group.
658
- # @param virtual_machine_scale_set_name [String] The name of the virtual
659
- # machine scale set.
660
- # @param virtualmachine_index [String] The virtual machine index.
661
- # @param network_interface_name [String] The name of the network interface.
662
- # @param expand [String] expand references resources.
663
593
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
664
594
  # will be added to the HTTP request.
665
595
  #
666
- # @return [NetworkInterface] operation results.
596
+ # @return [Array<NetworkInterface>] operation results.
667
597
  #
668
- def get_virtual_machine_scale_set_network_interface(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand = nil, custom_headers = nil)
669
- response = get_virtual_machine_scale_set_network_interface_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand, custom_headers).value!
670
- response.body unless response.nil?
598
+ def list(resource_group_name, custom_headers = nil)
599
+ first_page = list_as_lazy(resource_group_name, custom_headers)
600
+ first_page.get_all_items
671
601
  end
672
602
 
673
603
  #
674
- # The Get network interface operation retrieves information about the
675
- # specified network interface in a virtual machine scale set.
604
+ # Gets all network interfaces in a resource group.
676
605
  #
677
606
  # @param resource_group_name [String] The name of the resource group.
678
- # @param virtual_machine_scale_set_name [String] The name of the virtual
679
- # machine scale set.
680
- # @param virtualmachine_index [String] The virtual machine index.
681
- # @param network_interface_name [String] The name of the network interface.
682
- # @param expand [String] expand references resources.
683
607
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
684
608
  # will be added to the HTTP request.
685
609
  #
686
610
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
687
611
  #
688
- def get_virtual_machine_scale_set_network_interface_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand = nil, custom_headers = nil)
689
- get_virtual_machine_scale_set_network_interface_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand, custom_headers).value!
612
+ def list_with_http_info(resource_group_name, custom_headers = nil)
613
+ list_async(resource_group_name, custom_headers).value!
690
614
  end
691
615
 
692
616
  #
693
- # The Get network interface operation retrieves information about the
694
- # specified network interface in a virtual machine scale set.
617
+ # Gets all network interfaces in a resource group.
695
618
  #
696
619
  # @param resource_group_name [String] The name of the resource group.
697
- # @param virtual_machine_scale_set_name [String] The name of the virtual
698
- # machine scale set.
699
- # @param virtualmachine_index [String] The virtual machine index.
700
- # @param network_interface_name [String] The name of the network interface.
701
- # @param expand [String] expand references resources.
702
620
  # @param [Hash{String => String}] A hash of custom headers that will be added
703
621
  # to the HTTP request.
704
622
  #
705
623
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
706
624
  #
707
- def get_virtual_machine_scale_set_network_interface_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, expand = nil, custom_headers = nil)
625
+ def list_async(resource_group_name, custom_headers = nil)
708
626
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
709
- fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
710
- fail ArgumentError, 'virtualmachine_index is nil' if virtualmachine_index.nil?
711
- fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
712
627
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
713
628
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
714
629
 
@@ -718,14 +633,14 @@ module Azure::ARM::Network
718
633
  # Set Headers
719
634
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
720
635
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
721
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}'
636
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces'
722
637
 
723
638
  request_url = @base_url || @client.base_url
724
639
 
725
640
  options = {
726
641
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
727
- path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'virtualmachineIndex' => virtualmachine_index,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
728
- query_params: {'api-version' => @client.api_version,'$expand' => expand},
642
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
643
+ query_params: {'api-version' => @client.api_version},
729
644
  headers: request_headers.merge(custom_headers || {}),
730
645
  base_url: request_url
731
646
  }
@@ -745,7 +660,7 @@ module Azure::ARM::Network
745
660
  if status_code == 200
746
661
  begin
747
662
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
748
- result_mapper = NetworkInterface.mapper()
663
+ result_mapper = NetworkInterfaceListResult.mapper()
749
664
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
750
665
  rescue Exception => e
751
666
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -759,63 +674,130 @@ module Azure::ARM::Network
759
674
  end
760
675
 
761
676
  #
762
- # The List networkInterfaces operation retrieves all the networkInterfaces in
763
- # a subscription.
677
+ # Gets all route tables applied to a network interface.
764
678
  #
679
+ # @param resource_group_name [String] The name of the resource group.
680
+ # @param network_interface_name [String] The name of the network interface.
765
681
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
766
682
  # will be added to the HTTP request.
767
683
  #
768
- # @return [NetworkInterfaceListResult] which provide lazy access to pages of
769
- # the response.
684
+ # @return [EffectiveRouteListResult] operation results.
770
685
  #
771
- def list_all_as_lazy(custom_headers = nil)
772
- response = list_all_async(custom_headers).value!
773
- unless response.nil?
774
- page = response.body
775
- page.next_method = Proc.new do |next_page_link|
776
- list_all_next_async(next_page_link, custom_headers)
686
+ def get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil)
687
+ response = get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value!
688
+ response.body unless response.nil?
689
+ end
690
+
691
+ #
692
+ # @param resource_group_name [String] The name of the resource group.
693
+ # @param network_interface_name [String] The name of the network interface.
694
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
695
+ # will be added to the HTTP request.
696
+ #
697
+ # @return [Concurrent::Promise] promise which provides async access to http
698
+ # response.
699
+ #
700
+ def get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers = nil)
701
+ # Send request
702
+ promise = begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers)
703
+
704
+ promise = promise.then do |response|
705
+ # Defining deserialization method.
706
+ deserialize_method = lambda do |parsed_response|
707
+ result_mapper = EffectiveRouteListResult.mapper()
708
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
777
709
  end
778
- page
710
+
711
+ # Waiting for response.
712
+ @client.get_long_running_operation_result(response, deserialize_method)
779
713
  end
714
+
715
+ promise
780
716
  end
781
717
 
782
718
  #
783
- # The List networkInterfaces operation retrieves all the networkInterfaces in
784
- # a subscription.
719
+ # Gets all network security groups applied to a network interface.
785
720
  #
721
+ # @param resource_group_name [String] The name of the resource group.
722
+ # @param network_interface_name [String] The name of the network interface.
786
723
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
787
724
  # will be added to the HTTP request.
788
725
  #
789
- # @return [Array<NetworkInterface>] operation results.
726
+ # @return [EffectiveNetworkSecurityGroupListResult] operation results.
790
727
  #
791
- def list_all(custom_headers = nil)
792
- first_page = list_all_as_lazy(custom_headers)
793
- first_page.get_all_items
728
+ def list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil)
729
+ response = list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value!
730
+ response.body unless response.nil?
794
731
  end
795
732
 
796
733
  #
797
- # The List networkInterfaces operation retrieves all the networkInterfaces in
798
- # a subscription.
734
+ # @param resource_group_name [String] The name of the resource group.
735
+ # @param network_interface_name [String] The name of the network interface.
736
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
737
+ # will be added to the HTTP request.
738
+ #
739
+ # @return [Concurrent::Promise] promise which provides async access to http
740
+ # response.
799
741
  #
742
+ def list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers = nil)
743
+ # Send request
744
+ promise = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers)
745
+
746
+ promise = promise.then do |response|
747
+ # Defining deserialization method.
748
+ deserialize_method = lambda do |parsed_response|
749
+ result_mapper = EffectiveNetworkSecurityGroupListResult.mapper()
750
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
751
+ end
752
+
753
+ # Waiting for response.
754
+ @client.get_long_running_operation_result(response, deserialize_method)
755
+ end
756
+
757
+ promise
758
+ end
759
+
760
+ #
761
+ # Deletes the specified network interface.
762
+ #
763
+ # @param resource_group_name [String] The name of the resource group.
764
+ # @param network_interface_name [String] The name of the network interface.
765
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
766
+ # will be added to the HTTP request.
767
+ #
768
+ #
769
+ def begin_delete(resource_group_name, network_interface_name, custom_headers = nil)
770
+ response = begin_delete_async(resource_group_name, network_interface_name, custom_headers).value!
771
+ nil
772
+ end
773
+
774
+ #
775
+ # Deletes the specified network interface.
776
+ #
777
+ # @param resource_group_name [String] The name of the resource group.
778
+ # @param network_interface_name [String] The name of the network interface.
800
779
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
801
780
  # will be added to the HTTP request.
802
781
  #
803
782
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
804
783
  #
805
- def list_all_with_http_info(custom_headers = nil)
806
- list_all_async(custom_headers).value!
784
+ def begin_delete_with_http_info(resource_group_name, network_interface_name, custom_headers = nil)
785
+ begin_delete_async(resource_group_name, network_interface_name, custom_headers).value!
807
786
  end
808
787
 
809
788
  #
810
- # The List networkInterfaces operation retrieves all the networkInterfaces in
811
- # a subscription.
789
+ # Deletes the specified network interface.
812
790
  #
791
+ # @param resource_group_name [String] The name of the resource group.
792
+ # @param network_interface_name [String] The name of the network interface.
813
793
  # @param [Hash{String => String}] A hash of custom headers that will be added
814
794
  # to the HTTP request.
815
795
  #
816
796
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
817
797
  #
818
- def list_all_async(custom_headers = nil)
798
+ def begin_delete_async(resource_group_name, network_interface_name, custom_headers = nil)
799
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
800
+ fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
819
801
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
820
802
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
821
803
 
@@ -825,39 +807,29 @@ module Azure::ARM::Network
825
807
  # Set Headers
826
808
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
827
809
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
828
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces'
810
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'
829
811
 
830
812
  request_url = @base_url || @client.base_url
831
813
 
832
814
  options = {
833
815
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
834
- path_params: {'subscriptionId' => @client.subscription_id},
816
+ path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
835
817
  query_params: {'api-version' => @client.api_version},
836
818
  headers: request_headers.merge(custom_headers || {}),
837
819
  base_url: request_url
838
820
  }
839
- promise = @client.make_request_async(:get, path_template, options)
821
+ promise = @client.make_request_async(:delete, path_template, options)
840
822
 
841
823
  promise = promise.then do |result|
842
824
  http_response = result.response
843
825
  status_code = http_response.status
844
826
  response_content = http_response.body
845
- unless status_code == 200
827
+ unless status_code == 204 || status_code == 202 || status_code == 200
846
828
  error_model = JSON.load(response_content)
847
829
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
848
830
  end
849
831
 
850
832
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
851
- # Deserialize Response
852
- if status_code == 200
853
- begin
854
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
855
- result_mapper = NetworkInterfaceListResult.mapper()
856
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
857
- rescue Exception => e
858
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
859
- end
860
- end
861
833
 
862
834
  result
863
835
  end
@@ -866,68 +838,54 @@ module Azure::ARM::Network
866
838
  end
867
839
 
868
840
  #
869
- # The List networkInterfaces operation retrieves all the networkInterfaces in
870
- # a resource group.
871
- #
872
- # @param resource_group_name [String] The name of the resource group.
873
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
874
- # will be added to the HTTP request.
875
- #
876
- # @return [NetworkInterfaceListResult] which provide lazy access to pages of
877
- # the response.
878
- #
879
- def list_as_lazy(resource_group_name, custom_headers = nil)
880
- response = list_async(resource_group_name, custom_headers).value!
881
- unless response.nil?
882
- page = response.body
883
- page.next_method = Proc.new do |next_page_link|
884
- list_next_async(next_page_link, custom_headers)
885
- end
886
- page
887
- end
888
- end
889
-
890
- #
891
- # The List networkInterfaces operation retrieves all the networkInterfaces in
892
- # a resource group.
841
+ # Creates or updates a network interface.
893
842
  #
894
843
  # @param resource_group_name [String] The name of the resource group.
844
+ # @param network_interface_name [String] The name of the network interface.
845
+ # @param parameters [NetworkInterface] Parameters supplied to the create or
846
+ # update network interface operation.
895
847
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
896
848
  # will be added to the HTTP request.
897
849
  #
898
- # @return [Array<NetworkInterface>] operation results.
850
+ # @return [NetworkInterface] operation results.
899
851
  #
900
- def list(resource_group_name, custom_headers = nil)
901
- first_page = list_as_lazy(resource_group_name, custom_headers)
902
- first_page.get_all_items
852
+ def begin_create_or_update(resource_group_name, network_interface_name, parameters, custom_headers = nil)
853
+ response = begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers).value!
854
+ response.body unless response.nil?
903
855
  end
904
856
 
905
857
  #
906
- # The List networkInterfaces operation retrieves all the networkInterfaces in
907
- # a resource group.
858
+ # Creates or updates a network interface.
908
859
  #
909
860
  # @param resource_group_name [String] The name of the resource group.
861
+ # @param network_interface_name [String] The name of the network interface.
862
+ # @param parameters [NetworkInterface] Parameters supplied to the create or
863
+ # update network interface operation.
910
864
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
911
865
  # will be added to the HTTP request.
912
866
  #
913
867
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
914
868
  #
915
- def list_with_http_info(resource_group_name, custom_headers = nil)
916
- list_async(resource_group_name, custom_headers).value!
869
+ def begin_create_or_update_with_http_info(resource_group_name, network_interface_name, parameters, custom_headers = nil)
870
+ begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers).value!
917
871
  end
918
872
 
919
873
  #
920
- # The List networkInterfaces operation retrieves all the networkInterfaces in
921
- # a resource group.
874
+ # Creates or updates a network interface.
922
875
  #
923
876
  # @param resource_group_name [String] The name of the resource group.
877
+ # @param network_interface_name [String] The name of the network interface.
878
+ # @param parameters [NetworkInterface] Parameters supplied to the create or
879
+ # update network interface operation.
924
880
  # @param [Hash{String => String}] A hash of custom headers that will be added
925
881
  # to the HTTP request.
926
882
  #
927
883
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
928
884
  #
929
- def list_async(resource_group_name, custom_headers = nil)
885
+ def begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers = nil)
930
886
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
887
+ fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
888
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
931
889
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
932
890
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
933
891
 
@@ -937,34 +895,53 @@ module Azure::ARM::Network
937
895
  # Set Headers
938
896
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
939
897
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
940
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces'
898
+
899
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
900
+
901
+ # Serialize Request
902
+ request_mapper = NetworkInterface.mapper()
903
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
904
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
905
+
906
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'
941
907
 
942
908
  request_url = @base_url || @client.base_url
943
909
 
944
910
  options = {
945
911
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
946
- path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
912
+ path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
947
913
  query_params: {'api-version' => @client.api_version},
914
+ body: request_content,
948
915
  headers: request_headers.merge(custom_headers || {}),
949
916
  base_url: request_url
950
917
  }
951
- promise = @client.make_request_async(:get, path_template, options)
918
+ promise = @client.make_request_async(:put, path_template, options)
952
919
 
953
920
  promise = promise.then do |result|
954
921
  http_response = result.response
955
922
  status_code = http_response.status
956
923
  response_content = http_response.body
957
- unless status_code == 200
924
+ unless status_code == 201 || status_code == 200
958
925
  error_model = JSON.load(response_content)
959
926
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
960
927
  end
961
928
 
962
929
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
963
930
  # Deserialize Response
931
+ if status_code == 201
932
+ begin
933
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
934
+ result_mapper = NetworkInterface.mapper()
935
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
936
+ rescue Exception => e
937
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
938
+ end
939
+ end
940
+ # Deserialize Response
964
941
  if status_code == 200
965
942
  begin
966
943
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
967
- result_mapper = NetworkInterfaceListResult.mapper()
944
+ result_mapper = NetworkInterface.mapper()
968
945
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
969
946
  rescue Exception => e
970
947
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -978,51 +955,7 @@ module Azure::ARM::Network
978
955
  end
979
956
 
980
957
  #
981
- # The get effective routetable operation retrieves all the route tables
982
- # applied on a networkInterface.
983
- #
984
- # @param resource_group_name [String] The name of the resource group.
985
- # @param network_interface_name [String] The name of the network interface.
986
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
987
- # will be added to the HTTP request.
988
- #
989
- # @return [EffectiveRouteListResult] operation results.
990
- #
991
- def get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil)
992
- response = get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value!
993
- response.body unless response.nil?
994
- end
995
-
996
- #
997
- # @param resource_group_name [String] The name of the resource group.
998
- # @param network_interface_name [String] The name of the network interface.
999
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1000
- # will be added to the HTTP request.
1001
- #
1002
- # @return [Concurrent::Promise] promise which provides async access to http
1003
- # response.
1004
- #
1005
- def get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers = nil)
1006
- # Send request
1007
- promise = begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers)
1008
-
1009
- promise = promise.then do |response|
1010
- # Defining deserialization method.
1011
- deserialize_method = lambda do |parsed_response|
1012
- result_mapper = EffectiveRouteListResult.mapper()
1013
- parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
1014
- end
1015
-
1016
- # Waiting for response.
1017
- @client.get_long_running_operation_result(response, deserialize_method)
1018
- end
1019
-
1020
- promise
1021
- end
1022
-
1023
- #
1024
- # The get effective routetable operation retrieves all the route tables
1025
- # applied on a networkInterface.
958
+ # Gets all route tables applied to a network interface.
1026
959
  #
1027
960
  # @param resource_group_name [String] The name of the resource group.
1028
961
  # @param network_interface_name [String] The name of the network interface.
@@ -1037,8 +970,7 @@ module Azure::ARM::Network
1037
970
  end
1038
971
 
1039
972
  #
1040
- # The get effective routetable operation retrieves all the route tables
1041
- # applied on a networkInterface.
973
+ # Gets all route tables applied to a network interface.
1042
974
  #
1043
975
  # @param resource_group_name [String] The name of the resource group.
1044
976
  # @param network_interface_name [String] The name of the network interface.
@@ -1052,8 +984,7 @@ module Azure::ARM::Network
1052
984
  end
1053
985
 
1054
986
  #
1055
- # The get effective routetable operation retrieves all the route tables
1056
- # applied on a networkInterface.
987
+ # Gets all route tables applied to a network interface.
1057
988
  #
1058
989
  # @param resource_group_name [String] The name of the resource group.
1059
990
  # @param network_interface_name [String] The name of the network interface.
@@ -1115,51 +1046,7 @@ module Azure::ARM::Network
1115
1046
  end
1116
1047
 
1117
1048
  #
1118
- # The list effective network security group operation retrieves all the
1119
- # network security groups applied on a networkInterface.
1120
- #
1121
- # @param resource_group_name [String] The name of the resource group.
1122
- # @param network_interface_name [String] The name of the network interface.
1123
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1124
- # will be added to the HTTP request.
1125
- #
1126
- # @return [EffectiveNetworkSecurityGroupListResult] operation results.
1127
- #
1128
- def list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil)
1129
- response = list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value!
1130
- response.body unless response.nil?
1131
- end
1132
-
1133
- #
1134
- # @param resource_group_name [String] The name of the resource group.
1135
- # @param network_interface_name [String] The name of the network interface.
1136
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1137
- # will be added to the HTTP request.
1138
- #
1139
- # @return [Concurrent::Promise] promise which provides async access to http
1140
- # response.
1141
- #
1142
- def list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers = nil)
1143
- # Send request
1144
- promise = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers)
1145
-
1146
- promise = promise.then do |response|
1147
- # Defining deserialization method.
1148
- deserialize_method = lambda do |parsed_response|
1149
- result_mapper = EffectiveNetworkSecurityGroupListResult.mapper()
1150
- parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
1151
- end
1152
-
1153
- # Waiting for response.
1154
- @client.get_long_running_operation_result(response, deserialize_method)
1155
- end
1156
-
1157
- promise
1158
- end
1159
-
1160
- #
1161
- # The list effective network security group operation retrieves all the
1162
- # network security groups applied on a networkInterface.
1049
+ # Gets all network security groups applied to a network interface.
1163
1050
  #
1164
1051
  # @param resource_group_name [String] The name of the resource group.
1165
1052
  # @param network_interface_name [String] The name of the network interface.
@@ -1174,8 +1061,7 @@ module Azure::ARM::Network
1174
1061
  end
1175
1062
 
1176
1063
  #
1177
- # The list effective network security group operation retrieves all the
1178
- # network security groups applied on a networkInterface.
1064
+ # Gets all network security groups applied to a network interface.
1179
1065
  #
1180
1066
  # @param resource_group_name [String] The name of the resource group.
1181
1067
  # @param network_interface_name [String] The name of the network interface.
@@ -1189,8 +1075,7 @@ module Azure::ARM::Network
1189
1075
  end
1190
1076
 
1191
1077
  #
1192
- # The list effective network security group operation retrieves all the
1193
- # network security groups applied on a networkInterface.
1078
+ # Gets all network security groups applied to a network interface.
1194
1079
  #
1195
1080
  # @param resource_group_name [String] The name of the resource group.
1196
1081
  # @param network_interface_name [String] The name of the network interface.
@@ -1252,11 +1137,11 @@ module Azure::ARM::Network
1252
1137
  end
1253
1138
 
1254
1139
  #
1255
- # The list network interface operation retrieves information about all network
1256
- # interfaces in a virtual machine from a virtual machine scale set.
1140
+ # Gets information about all network interfaces in a virtual machine in a
1141
+ # virtual machine scale set.
1257
1142
  #
1258
- # @param next_page_link [String] The NextLink from the previous successful
1259
- # call to List operation.
1143
+ # @param next_page_link [String] The NextLink from the previous successful call
1144
+ # to List operation.
1260
1145
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1261
1146
  # will be added to the HTTP request.
1262
1147
  #
@@ -1268,11 +1153,11 @@ module Azure::ARM::Network
1268
1153
  end
1269
1154
 
1270
1155
  #
1271
- # The list network interface operation retrieves information about all network
1272
- # interfaces in a virtual machine from a virtual machine scale set.
1156
+ # Gets information about all network interfaces in a virtual machine in a
1157
+ # virtual machine scale set.
1273
1158
  #
1274
- # @param next_page_link [String] The NextLink from the previous successful
1275
- # call to List operation.
1159
+ # @param next_page_link [String] The NextLink from the previous successful call
1160
+ # to List operation.
1276
1161
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1277
1162
  # will be added to the HTTP request.
1278
1163
  #
@@ -1283,11 +1168,11 @@ module Azure::ARM::Network
1283
1168
  end
1284
1169
 
1285
1170
  #
1286
- # The list network interface operation retrieves information about all network
1287
- # interfaces in a virtual machine from a virtual machine scale set.
1171
+ # Gets information about all network interfaces in a virtual machine in a
1172
+ # virtual machine scale set.
1288
1173
  #
1289
- # @param next_page_link [String] The NextLink from the previous successful
1290
- # call to List operation.
1174
+ # @param next_page_link [String] The NextLink from the previous successful call
1175
+ # to List operation.
1291
1176
  # @param [Hash{String => String}] A hash of custom headers that will be added
1292
1177
  # to the HTTP request.
1293
1178
  #
@@ -1342,11 +1227,10 @@ module Azure::ARM::Network
1342
1227
  end
1343
1228
 
1344
1229
  #
1345
- # The list network interface operation retrieves information about all network
1346
- # interfaces in a virtual machine scale set.
1230
+ # Gets all network interfaces in a virtual machine scale set.
1347
1231
  #
1348
- # @param next_page_link [String] The NextLink from the previous successful
1349
- # call to List operation.
1232
+ # @param next_page_link [String] The NextLink from the previous successful call
1233
+ # to List operation.
1350
1234
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1351
1235
  # will be added to the HTTP request.
1352
1236
  #
@@ -1358,11 +1242,10 @@ module Azure::ARM::Network
1358
1242
  end
1359
1243
 
1360
1244
  #
1361
- # The list network interface operation retrieves information about all network
1362
- # interfaces in a virtual machine scale set.
1245
+ # Gets all network interfaces in a virtual machine scale set.
1363
1246
  #
1364
- # @param next_page_link [String] The NextLink from the previous successful
1365
- # call to List operation.
1247
+ # @param next_page_link [String] The NextLink from the previous successful call
1248
+ # to List operation.
1366
1249
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1367
1250
  # will be added to the HTTP request.
1368
1251
  #
@@ -1373,11 +1256,10 @@ module Azure::ARM::Network
1373
1256
  end
1374
1257
 
1375
1258
  #
1376
- # The list network interface operation retrieves information about all network
1377
- # interfaces in a virtual machine scale set.
1259
+ # Gets all network interfaces in a virtual machine scale set.
1378
1260
  #
1379
- # @param next_page_link [String] The NextLink from the previous successful
1380
- # call to List operation.
1261
+ # @param next_page_link [String] The NextLink from the previous successful call
1262
+ # to List operation.
1381
1263
  # @param [Hash{String => String}] A hash of custom headers that will be added
1382
1264
  # to the HTTP request.
1383
1265
  #
@@ -1432,11 +1314,10 @@ module Azure::ARM::Network
1432
1314
  end
1433
1315
 
1434
1316
  #
1435
- # The List networkInterfaces operation retrieves all the networkInterfaces in
1436
- # a subscription.
1317
+ # Gets all network interfaces in a subscription.
1437
1318
  #
1438
- # @param next_page_link [String] The NextLink from the previous successful
1439
- # call to List operation.
1319
+ # @param next_page_link [String] The NextLink from the previous successful call
1320
+ # to List operation.
1440
1321
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1441
1322
  # will be added to the HTTP request.
1442
1323
  #
@@ -1448,11 +1329,10 @@ module Azure::ARM::Network
1448
1329
  end
1449
1330
 
1450
1331
  #
1451
- # The List networkInterfaces operation retrieves all the networkInterfaces in
1452
- # a subscription.
1332
+ # Gets all network interfaces in a subscription.
1453
1333
  #
1454
- # @param next_page_link [String] The NextLink from the previous successful
1455
- # call to List operation.
1334
+ # @param next_page_link [String] The NextLink from the previous successful call
1335
+ # to List operation.
1456
1336
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1457
1337
  # will be added to the HTTP request.
1458
1338
  #
@@ -1463,11 +1343,10 @@ module Azure::ARM::Network
1463
1343
  end
1464
1344
 
1465
1345
  #
1466
- # The List networkInterfaces operation retrieves all the networkInterfaces in
1467
- # a subscription.
1346
+ # Gets all network interfaces in a subscription.
1468
1347
  #
1469
- # @param next_page_link [String] The NextLink from the previous successful
1470
- # call to List operation.
1348
+ # @param next_page_link [String] The NextLink from the previous successful call
1349
+ # to List operation.
1471
1350
  # @param [Hash{String => String}] A hash of custom headers that will be added
1472
1351
  # to the HTTP request.
1473
1352
  #
@@ -1522,11 +1401,10 @@ module Azure::ARM::Network
1522
1401
  end
1523
1402
 
1524
1403
  #
1525
- # The List networkInterfaces operation retrieves all the networkInterfaces in
1526
- # a resource group.
1404
+ # Gets all network interfaces in a resource group.
1527
1405
  #
1528
- # @param next_page_link [String] The NextLink from the previous successful
1529
- # call to List operation.
1406
+ # @param next_page_link [String] The NextLink from the previous successful call
1407
+ # to List operation.
1530
1408
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1531
1409
  # will be added to the HTTP request.
1532
1410
  #
@@ -1538,11 +1416,10 @@ module Azure::ARM::Network
1538
1416
  end
1539
1417
 
1540
1418
  #
1541
- # The List networkInterfaces operation retrieves all the networkInterfaces in
1542
- # a resource group.
1419
+ # Gets all network interfaces in a resource group.
1543
1420
  #
1544
- # @param next_page_link [String] The NextLink from the previous successful
1545
- # call to List operation.
1421
+ # @param next_page_link [String] The NextLink from the previous successful call
1422
+ # to List operation.
1546
1423
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1547
1424
  # will be added to the HTTP request.
1548
1425
  #
@@ -1553,11 +1430,10 @@ module Azure::ARM::Network
1553
1430
  end
1554
1431
 
1555
1432
  #
1556
- # The List networkInterfaces operation retrieves all the networkInterfaces in
1557
- # a resource group.
1433
+ # Gets all network interfaces in a resource group.
1558
1434
  #
1559
- # @param next_page_link [String] The NextLink from the previous successful
1560
- # call to List operation.
1435
+ # @param next_page_link [String] The NextLink from the previous successful call
1436
+ # to List operation.
1561
1437
  # @param [Hash{String => String}] A hash of custom headers that will be added
1562
1438
  # to the HTTP request.
1563
1439
  #
@@ -1611,5 +1487,94 @@ module Azure::ARM::Network
1611
1487
  promise.execute
1612
1488
  end
1613
1489
 
1490
+ #
1491
+ # Gets information about all network interfaces in a virtual machine in a
1492
+ # virtual machine scale set.
1493
+ #
1494
+ # @param resource_group_name [String] The name of the resource group.
1495
+ # @param virtual_machine_scale_set_name [String] The name of the virtual
1496
+ # machine scale set.
1497
+ # @param virtualmachine_index [String] The virtual machine index.
1498
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1499
+ # will be added to the HTTP request.
1500
+ #
1501
+ # @return [NetworkInterfaceListResult] which provide lazy access to pages of
1502
+ # the response.
1503
+ #
1504
+ def list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
1505
+ response = list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers).value!
1506
+ unless response.nil?
1507
+ page = response.body
1508
+ page.next_method = Proc.new do |next_page_link|
1509
+ list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers)
1510
+ end
1511
+ page
1512
+ end
1513
+ end
1514
+
1515
+ #
1516
+ # Gets all network interfaces in a virtual machine scale set.
1517
+ #
1518
+ # @param resource_group_name [String] The name of the resource group.
1519
+ # @param virtual_machine_scale_set_name [String] The name of the virtual
1520
+ # machine scale set.
1521
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1522
+ # will be added to the HTTP request.
1523
+ #
1524
+ # @return [NetworkInterfaceListResult] which provide lazy access to pages of
1525
+ # the response.
1526
+ #
1527
+ def list_virtual_machine_scale_set_network_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
1528
+ response = list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers).value!
1529
+ unless response.nil?
1530
+ page = response.body
1531
+ page.next_method = Proc.new do |next_page_link|
1532
+ list_virtual_machine_scale_set_network_interfaces_next_async(next_page_link, custom_headers)
1533
+ end
1534
+ page
1535
+ end
1536
+ end
1537
+
1538
+ #
1539
+ # Gets all network interfaces in a subscription.
1540
+ #
1541
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1542
+ # will be added to the HTTP request.
1543
+ #
1544
+ # @return [NetworkInterfaceListResult] which provide lazy access to pages of
1545
+ # the response.
1546
+ #
1547
+ def list_all_as_lazy(custom_headers = nil)
1548
+ response = list_all_async(custom_headers).value!
1549
+ unless response.nil?
1550
+ page = response.body
1551
+ page.next_method = Proc.new do |next_page_link|
1552
+ list_all_next_async(next_page_link, custom_headers)
1553
+ end
1554
+ page
1555
+ end
1556
+ end
1557
+
1558
+ #
1559
+ # Gets all network interfaces in a resource group.
1560
+ #
1561
+ # @param resource_group_name [String] The name of the resource group.
1562
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1563
+ # will be added to the HTTP request.
1564
+ #
1565
+ # @return [NetworkInterfaceListResult] which provide lazy access to pages of
1566
+ # the response.
1567
+ #
1568
+ def list_as_lazy(resource_group_name, custom_headers = nil)
1569
+ response = list_async(resource_group_name, custom_headers).value!
1570
+ unless response.nil?
1571
+ page = response.body
1572
+ page.next_method = Proc.new do |next_page_link|
1573
+ list_next_async(next_page_link, custom_headers)
1574
+ end
1575
+ page
1576
+ end
1577
+ end
1578
+
1614
1579
  end
1615
1580
  end