Class: Azure::ARM::Network::NetworkInterfaces

Inherits:
Object
  • Object
show all
Includes:
Models, MsRestAzure
Defined in:
lib/generated/azure_mgmt_network/network_interfaces.rb

Overview

The Microsoft Azure Network management API provides a RESTful set of web services that interact with Microsoft Azure Networks service to manage your network resrources. The API has entities that capture the relationship between an end user and the Microsoft Azure Networks service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ NetworkInterfaces

Creates and initializes a new instance of the NetworkInterfaces class.

Parameters:

  • client

    service class for accessing basic functionality.



21
22
23
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 21

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns reference to the NetworkManagementClient.

Returns:

  • reference to the NetworkManagementClient



26
27
28
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 26

def client
  @client
end

Instance Method Details

#begin_create_or_update(resource_group_name, network_interface_name, parameters, custom_headers = nil) ⇒ NetworkInterface

The Put NetworkInterface operation creates/updates a networkInterface

create/update NetworkInterface operation will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • parameters (NetworkInterface)

    Parameters supplied to the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



307
308
309
310
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 307

def begin_create_or_update(resource_group_name, network_interface_name, parameters, custom_headers = nil)
  response = begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers).value!
  response.body unless response.nil?
end

#begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers = nil) ⇒ Concurrent::Promise

The Put NetworkInterface operation creates/updates a networkInterface

create/update NetworkInterface operation to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • parameters (NetworkInterface)

    Parameters supplied to the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 340

def begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
  fail ArgumentError, 'parameters is nil' if parameters.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = NetworkInterface.mapper()
  request_content = @client.serialize(request_mapper,  parameters, 'parameters')
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 201 || status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterface.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterface.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_create_or_update_with_http_info(resource_group_name, network_interface_name, parameters, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The Put NetworkInterface operation creates/updates a networkInterface

create/update NetworkInterface operation will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • parameters (NetworkInterface)

    Parameters supplied to the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



324
325
326
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 324

def begin_create_or_update_with_http_info(resource_group_name, network_interface_name, parameters, custom_headers = nil)
  begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers).value!
end

#begin_delete(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Object

The delete netwokInterface operation deletes the specified netwokInterface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



75
76
77
78
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 75

def begin_delete(resource_group_name, network_interface_name, custom_headers = nil)
  response = begin_delete_async(resource_group_name, network_interface_name, custom_headers).value!
  nil
end

#begin_delete_async(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Concurrent::Promise

The delete netwokInterface operation deletes the specified netwokInterface.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 104

def begin_delete_async(resource_group_name, network_interface_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 204 || status_code == 202 || status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#begin_delete_with_http_info(resource_group_name, network_interface_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The delete netwokInterface operation deletes the specified netwokInterface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



90
91
92
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 90

def begin_delete_with_http_info(resource_group_name, network_interface_name, custom_headers = nil)
  begin_delete_async(resource_group_name, network_interface_name, custom_headers).value!
end

#begin_get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Array<EffectiveRoute>

The get effective routetable operation retrieves all the route tables applied on a networkInterface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1124
1125
1126
1127
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1124

def begin_get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil)
  first_page = begin_get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers)
  first_page.get_all_items
end

#begin_get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) ⇒ EffectiveRouteListResult

The get effective routetable operation retrieves all the route tables applied on a networkInterface.

will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1102

def begin_get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers = nil)
  response = begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_link|
      begin_get_effective_route_table_next_async(next_link, custom_headers)
    end
    page
  end
end

#begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Concurrent::Promise

The get effective routetable operation retrieves all the route tables applied on a networkInterface.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1155

def begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = EffectiveRouteListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_get_effective_route_table_next(next_page_link, custom_headers = nil) ⇒ EffectiveRouteListResult

The get effective routetable operation retrieves all the route tables applied on a networkInterface.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1842
1843
1844
1845
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1842

def begin_get_effective_route_table_next(next_page_link, custom_headers = nil)
  response = begin_get_effective_route_table_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#begin_get_effective_route_table_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

The get effective routetable operation retrieves all the route tables applied on a networkInterface.

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1873

def begin_get_effective_route_table_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = EffectiveRouteListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_get_effective_route_table_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The get effective routetable operation retrieves all the route tables applied on a networkInterface.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1858
1859
1860
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1858

def begin_get_effective_route_table_next_with_http_info(next_page_link, custom_headers = nil)
  begin_get_effective_route_table_next_async(next_page_link, custom_headers).value!
end

#begin_get_effective_route_table_with_http_info(resource_group_name, network_interface_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The get effective routetable operation retrieves all the route tables applied on a networkInterface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1140
1141
1142
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1140

def begin_get_effective_route_table_with_http_info(resource_group_name, network_interface_name, custom_headers = nil)
  begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers).value!
end

#begin_list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Array<EffectiveNetworkSecurityGroup>

The list effective network security group operation retrieves all the network security groups applied on a networkInterface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1330
1331
1332
1333
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1330

def begin_list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil)
  first_page = begin_list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers)
  first_page.get_all_items
end

#begin_list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers = nil) ⇒ EffectiveNetworkSecurityGroupListResult

The list effective network security group operation retrieves all the network security groups applied on a networkInterface.

will be added to the HTTP request.

to pages of the response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1308

def begin_list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers = nil)
  response = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_link|
      begin_list_effective_network_security_groups_next_async(next_link, custom_headers)
    end
    page
  end
end

#begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Concurrent::Promise

The list effective network security group operation retrieves all the network security groups applied on a networkInterface.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1361

def begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = EffectiveNetworkSecurityGroupListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_list_effective_network_security_groups_next(next_page_link, custom_headers = nil) ⇒ EffectiveNetworkSecurityGroupListResult

The list effective network security group operation retrieves all the network security groups applied on a networkInterface.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1978
1979
1980
1981
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1978

def begin_list_effective_network_security_groups_next(next_page_link, custom_headers = nil)
  response = begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

The list effective network security group operation retrieves all the network security groups applied on a networkInterface.

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 2009

def begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = EffectiveNetworkSecurityGroupListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#begin_list_effective_network_security_groups_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The list effective network security group operation retrieves all the network security groups applied on a networkInterface.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1994
1995
1996
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1994

def begin_list_effective_network_security_groups_next_with_http_info(next_page_link, custom_headers = nil)
  begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers).value!
end

#begin_list_effective_network_security_groups_with_http_info(resource_group_name, network_interface_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The list effective network security group operation retrieves all the network security groups applied on a networkInterface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1346
1347
1348
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1346

def begin_list_effective_network_security_groups_with_http_info(resource_group_name, network_interface_name, custom_headers = nil)
  begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers).value!
end

#create_or_update(resource_group_name, network_interface_name, parameters, custom_headers = nil) ⇒ NetworkInterface

The Put NetworkInterface operation creates/updates a networkInterface

create/update NetworkInterface operation will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • parameters (NetworkInterface)

    Parameters supplied to the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



261
262
263
264
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 261

def create_or_update(resource_group_name, network_interface_name, parameters, custom_headers = nil)
  response = create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers).value!
  response.body unless response.nil?
end

#create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers = nil) ⇒ Concurrent::Promise

create/update NetworkInterface operation will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • parameters (NetworkInterface)

    Parameters supplied to the

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 277

def create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers = nil)
  # Send request
  promise = begin_create_or_update_async(resource_group_name, network_interface_name, parameters, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = NetworkInterface.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#delete(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Object

The delete netwokInterface operation deletes the specified netwokInterface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that



36
37
38
39
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 36

def delete(resource_group_name, network_interface_name, custom_headers = nil)
  response = delete_async(resource_group_name, network_interface_name, custom_headers).value!
  nil
end

#delete_async(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Concurrent::Promise

will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 50

def delete_async(resource_group_name, network_interface_name, custom_headers = nil)
  # Send request
  promise = begin_delete_async(resource_group_name, network_interface_name, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#get(resource_group_name, network_interface_name, expand = nil, custom_headers = nil) ⇒ NetworkInterface

The Get ntework interface operation retreives information about the specified network interface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • expand (String) (defaults to: nil)

    expand references resources.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



161
162
163
164
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 161

def get(resource_group_name, network_interface_name, expand = nil, custom_headers = nil)
  response = get_async(resource_group_name, network_interface_name, expand, custom_headers).value!
  response.body unless response.nil?
end

#get_async(resource_group_name, network_interface_name, expand = nil, custom_headers = nil) ⇒ Concurrent::Promise

The Get ntework interface operation retreives information about the specified network interface.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • expand (String) (defaults to: nil)

    expand references resources.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 194

def get_async(resource_group_name, network_interface_name, expand = nil, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version,'$expand' => expand},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterface.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Array<EffectiveRoute>

The get effective routetable operation retrieves all the route tables applied on a networkInterface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1015
1016
1017
1018
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1015

def get_effective_route_table(resource_group_name, network_interface_name, custom_headers = nil)
  first_page = get_effective_route_table_as_lazy(resource_group_name, network_interface_name, custom_headers)
  first_page.get_all_items
end

#get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Concurrent::Promise

will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1029

def get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers = nil)
  # Send request
  promise = begin_get_effective_route_table_async(resource_group_name, network_interface_name, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = EffectiveRouteListResult.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#get_effective_route_table_next(next_page_link, custom_headers = nil) ⇒ EffectiveRouteListResult

The get effective routetable operation retrieves all the route tables applied on a networkInterface.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1799
1800
1801
1802
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1799

def get_effective_route_table_next(next_page_link, custom_headers = nil)
  response = get_effective_route_table_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#get_effective_route_table_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

call to List operation. will be added to the HTTP request.

response.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1813

def get_effective_route_table_next_async(next_page_link, custom_headers = nil)
  # Send request
  promise = begin_get_effective_route_table_next_async(next_page_link, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = EffectiveRouteListResult.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#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) ⇒ NetworkInterface

The Get ntework interface operation retreives information about the specified network interface in a virtual machine scale set.

machine scale set. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • virtualmachine_index (String)

    The virtual machine index.

  • network_interface_name (String)

    The name of the network interface.

  • expand (String) (defaults to: nil)

    expand references resources.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



683
684
685
686
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 683

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)
  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!
  response.body unless response.nil?
end

#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) ⇒ Concurrent::Promise

The Get ntework interface operation retreives information about the specified network interface in a virtual machine scale set.

machine scale set. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • virtualmachine_index (String)

    The virtual machine index.

  • network_interface_name (String)

    The name of the network interface.

  • expand (String) (defaults to: nil)

    expand references resources.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 722

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)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
  fail ArgumentError, 'virtualmachine_index is nil' if virtualmachine_index.nil?
  fail ArgumentError, 'network_interface_name is nil' if network_interface_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'virtualmachineIndex' => virtualmachine_index,'networkInterfaceName' => network_interface_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version,'$expand' => expand},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterface.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#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) ⇒ MsRestAzure::AzureOperationResponse

The Get ntework interface operation retreives information about the specified network interface in a virtual machine scale set.

machine scale set. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • virtualmachine_index (String)

    The virtual machine index.

  • network_interface_name (String)

    The name of the network interface.

  • expand (String) (defaults to: nil)

    expand references resources.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



703
704
705
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 703

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)
  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!
end

#get_with_http_info(resource_group_name, network_interface_name, expand = nil, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The Get ntework interface operation retreives information about the specified network interface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • expand (String) (defaults to: nil)

    expand references resources.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



178
179
180
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 178

def get_with_http_info(resource_group_name, network_interface_name, expand = nil, custom_headers = nil)
  get_async(resource_group_name, network_interface_name, expand, custom_headers).value!
end

#list(resource_group_name, custom_headers = nil) ⇒ Array<NetworkInterface>

The List networkInterfaces opertion retrieves all the networkInterfaces in a resource group.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



921
922
923
924
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 921

def list(resource_group_name, custom_headers = nil)
  first_page = list_as_lazy(resource_group_name, custom_headers)
  first_page.get_all_items
end

#list_all(custom_headers = nil) ⇒ Array<NetworkInterface>

The List networkInterfaces opertion retrieves all the networkInterfaces in a subscription.

will be added to the HTTP request.

Parameters:

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



809
810
811
812
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 809

def list_all(custom_headers = nil)
  first_page = list_all_as_lazy(custom_headers)
  first_page.get_all_items
end

#list_all_as_lazy(custom_headers = nil) ⇒ NetworkInterfaceListResult

The List networkInterfaces opertion retrieves all the networkInterfaces in a subscription.

will be added to the HTTP request.

the response.

Parameters:

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



789
790
791
792
793
794
795
796
797
798
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 789

def list_all_as_lazy(custom_headers = nil)
  response = list_all_async(custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_link|
      list_all_next_async(next_link, custom_headers)
    end
    page
  end
end

#list_all_async(custom_headers = nil) ⇒ Concurrent::Promise

The List networkInterfaces opertion retrieves all the networkInterfaces in a subscription.

to the HTTP request.

Parameters:

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 836

def list_all_async(custom_headers = nil)
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterfaceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_all_next(next_page_link, custom_headers = nil) ⇒ NetworkInterfaceListResult

The List networkInterfaces opertion retrieves all the networkInterfaces in a subscription.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1613
1614
1615
1616
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1613

def list_all_next(next_page_link, custom_headers = nil)
  response = list_all_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_all_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

The List networkInterfaces opertion retrieves all the networkInterfaces in a subscription.

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1644

def list_all_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterfaceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_all_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The List networkInterfaces opertion retrieves all the networkInterfaces in a subscription.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1629
1630
1631
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1629

def list_all_next_with_http_info(next_page_link, custom_headers = nil)
  list_all_next_async(next_page_link, custom_headers).value!
end

#list_all_with_http_info(custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The List networkInterfaces opertion retrieves all the networkInterfaces in a subscription.

will be added to the HTTP request.

Parameters:

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



823
824
825
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 823

def list_all_with_http_info(custom_headers = nil)
  list_all_async(custom_headers).value!
end

#list_as_lazy(resource_group_name, custom_headers = nil) ⇒ NetworkInterfaceListResult

The List networkInterfaces opertion retrieves all the networkInterfaces in a resource group.

will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



900
901
902
903
904
905
906
907
908
909
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 900

def list_as_lazy(resource_group_name, custom_headers = nil)
  response = list_async(resource_group_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_link|
      list_next_async(next_link, custom_headers)
    end
    page
  end
end

#list_async(resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise

The List networkInterfaces opertion retrieves all the networkInterfaces in a resource group.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 950

def list_async(resource_group_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterfaceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Array<EffectiveNetworkSecurityGroup>

The list effective network security group operation retrieves all the network security groups applied on a networkInterface.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1221
1222
1223
1224
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1221

def list_effective_network_security_groups(resource_group_name, network_interface_name, custom_headers = nil)
  first_page = list_effective_network_security_groups_as_lazy(resource_group_name, network_interface_name, custom_headers)
  first_page.get_all_items
end

#list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers = nil) ⇒ Concurrent::Promise

will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • network_interface_name (String)

    The name of the network interface.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1235

def list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers = nil)
  # Send request
  promise = begin_list_effective_network_security_groups_async(resource_group_name, network_interface_name, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = EffectiveNetworkSecurityGroupListResult.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#list_effective_network_security_groups_next(next_page_link, custom_headers = nil) ⇒ EffectiveNetworkSecurityGroupListResult

The list effective network security group operation retrieves all the network security groups applied on a networkInterface.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1935
1936
1937
1938
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1935

def list_effective_network_security_groups_next(next_page_link, custom_headers = nil)
  response = list_effective_network_security_groups_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_effective_network_security_groups_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

call to List operation. will be added to the HTTP request.

response.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1949

def list_effective_network_security_groups_next_async(next_page_link, custom_headers = nil)
  # Send request
  promise = begin_list_effective_network_security_groups_next_async(next_page_link, custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = EffectiveNetworkSecurityGroupListResult.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
    end

    # Waiting for response.
    @client.get_long_running_operation_result(response, deserialize_method)
  end

  promise
end

#list_next(next_page_link, custom_headers = nil) ⇒ NetworkInterfaceListResult

The List networkInterfaces opertion retrieves all the networkInterfaces in a resource group.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1706
1707
1708
1709
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1706

def list_next(next_page_link, custom_headers = nil)
  response = list_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

The List networkInterfaces opertion retrieves all the networkInterfaces in a resource group.

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1737

def list_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterfaceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The List networkInterfaces opertion retrieves all the networkInterfaces in a resource group.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1722
1723
1724
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1722

def list_next_with_http_info(next_page_link, custom_headers = nil)
  list_next_async(next_page_link, custom_headers).value!
end

#list_virtual_machine_scale_set_network_interfaces(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil) ⇒ Array<NetworkInterface>

The list network interface operation retrieves information about all network interfaces in a virtual machine scale set.

machine scale set. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



580
581
582
583
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 580

def list_virtual_machine_scale_set_network_interfaces(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
  first_page = list_virtual_machine_scale_set_network_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, custom_headers)
  first_page.get_all_items
end

#list_virtual_machine_scale_set_network_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil) ⇒ NetworkInterfaceListResult

The list network interface operation retrieves information about all network interfaces in a virtual machine scale set.

machine scale set. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



557
558
559
560
561
562
563
564
565
566
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 557

def list_virtual_machine_scale_set_network_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
  response = list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_link|
      list_virtual_machine_scale_set_network_interfaces_next_async(next_link, custom_headers)
    end
    page
  end
end

#list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil) ⇒ Concurrent::Promise

The list network interface operation retrieves information about all network interfaces in a virtual machine scale set.

machine scale set. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 613

def list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterfaceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_virtual_machine_scale_set_network_interfaces_next(next_page_link, custom_headers = nil) ⇒ NetworkInterfaceListResult

The list network interface operation retrieves information about all network interfaces in a virtual machine scale set.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1520
1521
1522
1523
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1520

def list_virtual_machine_scale_set_network_interfaces_next(next_page_link, custom_headers = nil)
  response = list_virtual_machine_scale_set_network_interfaces_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_virtual_machine_scale_set_network_interfaces_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

The list network interface operation retrieves information about all network interfaces in a virtual machine scale set.

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1551

def list_virtual_machine_scale_set_network_interfaces_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterfaceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_virtual_machine_scale_set_network_interfaces_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The list network interface operation retrieves information about all network interfaces in a virtual machine scale set.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1536
1537
1538
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1536

def list_virtual_machine_scale_set_network_interfaces_next_with_http_info(next_page_link, custom_headers = nil)
  list_virtual_machine_scale_set_network_interfaces_next_async(next_page_link, custom_headers).value!
end

#list_virtual_machine_scale_set_network_interfaces_with_http_info(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The list network interface operation retrieves information about all network interfaces in a virtual machine scale set.

machine scale set. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



597
598
599
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 597

def list_virtual_machine_scale_set_network_interfaces_with_http_info(resource_group_name, virtual_machine_scale_set_name, custom_headers = nil)
  list_virtual_machine_scale_set_network_interfaces_async(resource_group_name, virtual_machine_scale_set_name, custom_headers).value!
end

#list_virtual_machine_scale_set_vmnetwork_interfaces(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil) ⇒ Array<NetworkInterface>

The list network interface operation retrieves information about all network interfaces in a virtual machine from a virtual machine scale set.

machine scale set. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • virtualmachine_index (String)

    The virtual machine index.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



453
454
455
456
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 453

def list_virtual_machine_scale_set_vmnetwork_interfaces(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
  first_page = list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers)
  first_page.get_all_items
end

#list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil) ⇒ NetworkInterfaceListResult

The list network interface operation retrieves information about all network interfaces in a virtual machine from a virtual machine scale set.

machine scale set. will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • virtualmachine_index (String)

    The virtual machine index.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



429
430
431
432
433
434
435
436
437
438
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 429

def list_virtual_machine_scale_set_vmnetwork_interfaces_as_lazy(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
  response = list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_link|
      list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_link, custom_headers)
    end
    page
  end
end

#list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil) ⇒ Concurrent::Promise

The list network interface operation retrieves information about all network interfaces in a virtual machine from a virtual machine scale set.

machine scale set. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • virtualmachine_index (String)

    The virtual machine index.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 488

def list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
  fail ArgumentError, 'virtualmachine_index is nil' if virtualmachine_index.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'virtualmachineIndex' => virtualmachine_index,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterfaceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_virtual_machine_scale_set_vmnetwork_interfaces_next(next_page_link, custom_headers = nil) ⇒ NetworkInterfaceListResult

The list network interface operation retrieves information about all network interfaces in a virtual machine from a virtual machine scale set.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



1427
1428
1429
1430
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1427

def list_virtual_machine_scale_set_vmnetwork_interfaces_next(next_page_link, custom_headers = nil)
  response = list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

The list network interface operation retrieves information about all network interfaces in a virtual machine from a virtual machine scale set.

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1458

def list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '{nextLink}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = NetworkInterfaceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_virtual_machine_scale_set_vmnetwork_interfaces_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The list network interface operation retrieves information about all network interfaces in a virtual machine from a virtual machine scale set.

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1443
1444
1445
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 1443

def list_virtual_machine_scale_set_vmnetwork_interfaces_next_with_http_info(next_page_link, custom_headers = nil)
  list_virtual_machine_scale_set_vmnetwork_interfaces_next_async(next_page_link, custom_headers).value!
end

#list_virtual_machine_scale_set_vmnetwork_interfaces_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The list network interface operation retrieves information about all network interfaces in a virtual machine from a virtual machine scale set.

machine scale set. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • virtual_machine_scale_set_name (String)

    The name of the virtual

  • virtualmachine_index (String)

    The virtual machine index.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



471
472
473
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 471

def list_virtual_machine_scale_set_vmnetwork_interfaces_with_http_info(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers = nil)
  list_virtual_machine_scale_set_vmnetwork_interfaces_async(resource_group_name, virtual_machine_scale_set_name, virtualmachine_index, custom_headers).value!
end

#list_with_http_info(resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

The List networkInterfaces opertion retrieves all the networkInterfaces in a resource group.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



936
937
938
# File 'lib/generated/azure_mgmt_network/network_interfaces.rb', line 936

def list_with_http_info(resource_group_name, custom_headers = nil)
  list_async(resource_group_name, custom_headers).value!
end