Class: Azure::Network::Mgmt::V2019_12_01::PrivateLinkServices

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb

Overview

PrivateLinkServices

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ PrivateLinkServices

Creates and initializes a new instance of the PrivateLinkServices class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 17

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientNetworkManagementClient (readonly)

Returns reference to the NetworkManagementClient.

Returns:



22
23
24
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 22

def client
  @client
end

Instance Method Details

Checks whether the subscription is visible to private link service.

of CheckPrivateLinkService API call. will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

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

    A hash of custom headers that

Returns:

  • (PrivateLinkServiceVisibility)

    operation results.



1329
1330
1331
1332
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1329

def begin_check_private_link_service_visibility(location, parameters, custom_headers:nil)
  response = begin_check_private_link_service_visibility_async(location, parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

Checks whether the subscription is visible to private link service.

of CheckPrivateLinkService API call. to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1360
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
1415
1416
1417
1418
1419
1420
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1360

def begin_check_private_link_service_visibility_async(location, parameters, custom_headers:nil)
  fail ArgumentError, 'location is nil' if location.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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

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

  # Serialize Request
  request_mapper = Azure::Network::Mgmt::V2019_12_01::Models::CheckPrivateLinkServiceVisibilityRequest.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkServiceVisibility.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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

Checks whether the subscription is visible to private link service in the specified resource group.

of CheckPrivateLinkService API call. will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • resource_group_name (String)

    The name of the resource group.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

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

    A hash of custom headers that

Returns:

  • (PrivateLinkServiceVisibility)

    operation results.



1435
1436
1437
1438
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1435

def begin_check_private_link_service_visibility_by_resource_group(location, resource_group_name, parameters, custom_headers:nil)
  response = begin_check_private_link_service_visibility_by_resource_group_async(location, resource_group_name, parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

Checks whether the subscription is visible to private link service in the specified resource group.

of CheckPrivateLinkService API call. to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • resource_group_name (String)

    The name of the resource group.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1470

def begin_check_private_link_service_visibility_by_resource_group_async(location, resource_group_name, parameters, custom_headers:nil)
  fail ArgumentError, 'location is nil' if location.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

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

  # Serialize Request
  request_mapper = Azure::Network::Mgmt::V2019_12_01::Models::CheckPrivateLinkServiceVisibilityRequest.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'location' => location,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkServiceVisibility.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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

Checks whether the subscription is visible to private link service in the specified resource group.

of CheckPrivateLinkService API call. will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • resource_group_name (String)

    The name of the resource group.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1453
1454
1455
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1453

def begin_check_private_link_service_visibility_by_resource_group_with_http_info(location, resource_group_name, parameters, custom_headers:nil)
  begin_check_private_link_service_visibility_by_resource_group_async(location, resource_group_name, parameters, custom_headers:custom_headers).value!
end

Checks whether the subscription is visible to private link service.

of CheckPrivateLinkService API call. will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1345
1346
1347
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1345

def begin_check_private_link_service_visibility_with_http_info(location, parameters, custom_headers:nil)
  begin_check_private_link_service_visibility_async(location, parameters, custom_headers:custom_headers).value!
end

#begin_create_or_update(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ PrivateLinkService

Creates or updates an private link service in the specified resource group.

update private link service operation. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • parameters (PrivateLinkService)

    Parameters supplied to the create or

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

    A hash of custom headers that

Returns:

  • (PrivateLinkService)

    operation results.



1119
1120
1121
1122
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1119

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

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

Creates or updates an private link service in the specified resource group.

update private link service operation. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • parameters (PrivateLinkService)

    Parameters supplied to the create or

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1152
1153
1154
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
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1152

def begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'service_name is nil' if service_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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

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

  # Serialize Request
  request_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkService.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkService.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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 == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkService.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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, service_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Creates or updates an private link service in the specified resource group.

update private link service operation. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • parameters (PrivateLinkService)

    Parameters supplied to the create or

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1136
1137
1138
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1136

def begin_create_or_update_with_http_info(resource_group_name, service_name, parameters, custom_headers:nil)
  begin_create_or_update_async(resource_group_name, service_name, parameters, custom_headers:custom_headers).value!
end

#begin_delete(resource_group_name, service_name, custom_headers: nil) ⇒ Object

Deletes the specified private link service.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

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

    A hash of custom headers that



1033
1034
1035
1036
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1033

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

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

Deletes the specified private link service.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1062

def begin_delete_async(resource_group_name, service_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'service_name is nil' if service_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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # 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/privateLinkServices/{serviceName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end

#begin_delete_private_endpoint_connection(resource_group_name, service_name, pe_connection_name, custom_headers: nil) ⇒ Object

Delete private end point connection for a private link service in a subscription.

connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

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

    A hash of custom headers that



1237
1238
1239
1240
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1237

def begin_delete_private_endpoint_connection(resource_group_name, service_name, pe_connection_name, custom_headers:nil)
  response = begin_delete_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, custom_headers:custom_headers).value!
  nil
end

#begin_delete_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, custom_headers: nil) ⇒ Concurrent::Promise

Delete private end point connection for a private link service in a subscription.

connection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1272

def begin_delete_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'service_name is nil' if service_name.nil?
  fail ArgumentError, 'pe_connection_name is nil' if pe_connection_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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # 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/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'peConnectionName' => pe_connection_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end

#begin_delete_private_endpoint_connection_with_http_info(resource_group_name, service_name, pe_connection_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Delete private end point connection for a private link service in a subscription.

connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1255
1256
1257
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1255

def begin_delete_private_endpoint_connection_with_http_info(resource_group_name, service_name, pe_connection_name, custom_headers:nil)
  begin_delete_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, custom_headers:custom_headers).value!
end

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

Deletes the specified private link service.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1048
1049
1050
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1048

def begin_delete_with_http_info(resource_group_name, service_name, custom_headers:nil)
  begin_delete_async(resource_group_name, service_name, custom_headers:custom_headers).value!
end

Checks whether the subscription is visible to private link service.

of CheckPrivateLinkService API call. will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

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

    A hash of custom headers that

Returns:

  • (PrivateLinkServiceVisibility)

    operation results.



754
755
756
757
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 754

def check_private_link_service_visibility(location, parameters, custom_headers:nil)
  response = check_private_link_service_visibility_async(location, parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

of CheckPrivateLinkService API call. will be added to the HTTP request.

response.

Parameters:

  • location (String)

    The location of the domain name.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 769

def check_private_link_service_visibility_async(location, parameters, custom_headers:nil)
  # Send request
  promise = begin_check_private_link_service_visibility_async(location, parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkServiceVisibility.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

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

  promise
end

Checks whether the subscription is visible to private link service in the specified resource group.

of CheckPrivateLinkService API call. will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • resource_group_name (String)

    The name of the resource group.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

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

    A hash of custom headers that

Returns:

  • (PrivateLinkServiceVisibility)

    operation results.



800
801
802
803
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 800

def check_private_link_service_visibility_by_resource_group(location, resource_group_name, parameters, custom_headers:nil)
  response = check_private_link_service_visibility_by_resource_group_async(location, resource_group_name, parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

of CheckPrivateLinkService API call. will be added to the HTTP request.

response.

Parameters:

  • location (String)

    The location of the domain name.

  • resource_group_name (String)

    The name of the resource group.

  • parameters (CheckPrivateLinkServiceVisibilityRequest)

    The request body

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 816

def check_private_link_service_visibility_by_resource_group_async(location, resource_group_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_check_private_link_service_visibility_by_resource_group_async(location, resource_group_name, parameters, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkServiceVisibility.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

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

  promise
end

#create_or_update(resource_group_name, service_name, parameters, custom_headers: nil) ⇒ PrivateLinkService

Creates or updates an private link service in the specified resource group.

update private link service operation. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • parameters (PrivateLinkService)

    Parameters supplied to the create or

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

    A hash of custom headers that

Returns:

  • (PrivateLinkService)

    operation results.



171
172
173
174
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 171

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

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

update private link service operation. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • parameters (PrivateLinkService)

    Parameters supplied to the create or

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 187

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

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkService.mapper()
      parsed_response = @client.deserialize(result_mapper, parsed_response)
    end

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

  promise
end

#delete(resource_group_name, service_name, custom_headers: nil) ⇒ Object

Deletes the specified private link service.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

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

    A hash of custom headers that



32
33
34
35
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 32

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

#delete_async(resource_group_name, service_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.

  • service_name (String)

    The name of the private link service.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 46

def delete_async(resource_group_name, service_name, custom_headers:nil)
  # Send request
  promise = begin_delete_async(resource_group_name, service_name, custom_headers: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

#delete_private_endpoint_connection(resource_group_name, service_name, pe_connection_name, custom_headers: nil) ⇒ Object

Delete private end point connection for a private link service in a subscription.

connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

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

    A hash of custom headers that



617
618
619
620
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 617

def delete_private_endpoint_connection(resource_group_name, service_name, pe_connection_name, custom_headers:nil)
  response = delete_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, custom_headers:custom_headers).value!
  nil
end

#delete_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, custom_headers: nil) ⇒ Concurrent::Promise

connection. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 633

def delete_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, custom_headers:nil)
  # Send request
  promise = begin_delete_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, custom_headers: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, service_name, expand: nil, custom_headers: nil) ⇒ PrivateLinkService

Gets the specified private link service by resource group.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • expand (String) (defaults to: nil)

    Expands referenced resources.

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

    A hash of custom headers that

Returns:

  • (PrivateLinkService)

    operation results.



73
74
75
76
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 73

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

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

Gets the specified private link service by resource group.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • expand (String) (defaults to: nil)

    Expands referenced resources.

  • 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
148
149
150
151
152
153
154
155
156
157
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 104

def get_async(resource_group_name, service_name, expand:nil, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'service_name is nil' if service_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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # 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/privateLinkServices/{serviceName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version,'$expand' => expand},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkService.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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_private_endpoint_connection(resource_group_name, service_name, pe_connection_name, expand: nil, custom_headers: nil) ⇒ PrivateEndpointConnection

Get the specific private end point connection by specific private link service in the resource group.

connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

  • expand (String) (defaults to: nil)

    Expands referenced resources.

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

    A hash of custom headers that

Returns:

  • (PrivateEndpointConnection)

    operation results.



395
396
397
398
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 395

def get_private_endpoint_connection(resource_group_name, service_name, pe_connection_name, expand:nil, custom_headers:nil)
  response = get_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, expand:expand, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise

Get the specific private end point connection by specific private link service in the resource group.

connection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

  • expand (String) (defaults to: nil)

    Expands referenced resources.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 432

def get_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, expand:nil, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'service_name is nil' if service_name.nil?
  fail ArgumentError, 'pe_connection_name is nil' if pe_connection_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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # 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/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'peConnectionName' => pe_connection_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version,'$expand' => expand},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateEndpointConnection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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_private_endpoint_connection_with_http_info(resource_group_name, service_name, pe_connection_name, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Get the specific private end point connection by specific private link service in the resource group.

connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

  • expand (String) (defaults to: nil)

    Expands referenced resources.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



414
415
416
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 414

def get_private_endpoint_connection_with_http_info(resource_group_name, service_name, pe_connection_name, expand:nil, custom_headers:nil)
  get_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, expand:expand, custom_headers:custom_headers).value!
end

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

Gets the specified private link service by resource group.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • expand (String) (defaults to: nil)

    Expands referenced resources.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



89
90
91
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 89

def get_with_http_info(resource_group_name, service_name, expand:nil, custom_headers:nil)
  get_async(resource_group_name, service_name, expand:expand, custom_headers:custom_headers).value!
end

#list(resource_group_name, custom_headers: nil) ⇒ Array<PrivateLinkService>

Gets all private link services 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:

  • (Array<PrivateLinkService>)

    operation results.



214
215
216
217
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 214

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

#list_as_lazy(resource_group_name, custom_headers: nil) ⇒ PrivateLinkServiceListResult

Gets all private link services 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:

  • (PrivateLinkServiceListResult)

    which provide lazy access to pages of



1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1999

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

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

Gets all private link services 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.



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 241

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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # 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/privateLinkServices'

  request_url = @base_url || @client.base_url

  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 || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkServiceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

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

    A hash of custom headers that

Returns:

  • (Array<AutoApprovedPrivateLinkService>)

    operation results.



844
845
846
847
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 844

def list_auto_approved_private_link_services(location, custom_headers:nil)
  first_page = list_auto_approved_private_link_services_as_lazy(location, custom_headers:custom_headers)
  first_page.get_all_items
end

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

will be added to the HTTP request.

pages of the response.

Parameters:

  • location (String)

    The location of the domain name.

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

    A hash of custom headers that

Returns:

  • (AutoApprovedPrivateLinkServicesResult)

    which provide lazy access to



2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 2063

def list_auto_approved_private_link_services_as_lazy(location, custom_headers:nil)
  response = list_auto_approved_private_link_services_async(location, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_auto_approved_private_link_services_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 873

def list_auto_approved_private_link_services_async(location, custom_headers:nil)
  fail ArgumentError, 'location is nil' if location.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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # 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/locations/{location}/autoApprovedPrivateLinkServices'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.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(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::AutoApprovedPrivateLinkServicesResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • 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:

  • (Array<AutoApprovedPrivateLinkService>)

    operation results.



938
939
940
941
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 938

def list_auto_approved_private_link_services_by_resource_group(location, resource_group_name, custom_headers:nil)
  first_page = list_auto_approved_private_link_services_by_resource_group_as_lazy(location, resource_group_name, custom_headers:custom_headers)
  first_page.get_all_items
end

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

will be added to the HTTP request.

pages of the response.

Parameters:

  • location (String)

    The location of the domain name.

  • 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:

  • (AutoApprovedPrivateLinkServicesResult)

    which provide lazy access to



2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 2086

def list_auto_approved_private_link_services_by_resource_group_as_lazy(location, resource_group_name, custom_headers:nil)
  response = list_auto_approved_private_link_services_by_resource_group_async(location, resource_group_name, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_auto_approved_private_link_services_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • 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.



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
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 969

def list_auto_approved_private_link_services_by_resource_group_async(location, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'location is nil' if location.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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # 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/locations/{location}/autoApprovedPrivateLinkServices'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'location' => location,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.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(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::AutoApprovedPrivateLinkServicesResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (AutoApprovedPrivateLinkServicesResult)

    operation results.



1907
1908
1909
1910
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1907

def list_auto_approved_private_link_services_by_resource_group_next(next_page_link, custom_headers:nil)
  response = list_auto_approved_private_link_services_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1938

def list_auto_approved_private_link_services_by_resource_group_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


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

  # 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}'

  request_url = @base_url || @client.base_url

  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 || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.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(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::AutoApprovedPrivateLinkServicesResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1923
1924
1925
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1923

def list_auto_approved_private_link_services_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
  list_auto_approved_private_link_services_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
end

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

  • 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.



954
955
956
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 954

def list_auto_approved_private_link_services_by_resource_group_with_http_info(location, resource_group_name, custom_headers:nil)
  list_auto_approved_private_link_services_by_resource_group_async(location, resource_group_name, custom_headers:custom_headers).value!
end

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (AutoApprovedPrivateLinkServicesResult)

    operation results.



1814
1815
1816
1817
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1814

def list_auto_approved_private_link_services_next(next_page_link, custom_headers:nil)
  response = list_auto_approved_private_link_services_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1845

def list_auto_approved_private_link_services_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


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

  # 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}'

  request_url = @base_url || @client.base_url

  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 || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

  promise = promise.then do |result|
    http_response = result.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(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::AutoApprovedPrivateLinkServicesResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1830
1831
1832
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1830

def list_auto_approved_private_link_services_next_with_http_info(next_page_link, custom_headers:nil)
  list_auto_approved_private_link_services_next_async(next_page_link, custom_headers:custom_headers).value!
end

Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region.

will be added to the HTTP request.

Parameters:

  • location (String)

    The location of the domain name.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



859
860
861
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 859

def list_auto_approved_private_link_services_with_http_info(location, custom_headers:nil)
  list_auto_approved_private_link_services_async(location, custom_headers:custom_headers).value!
end

#list_by_subscription(custom_headers: nil) ⇒ Array<PrivateLinkService>

Gets all private link service 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:

  • (Array<PrivateLinkService>)

    operation results.



303
304
305
306
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 303

def list_by_subscription(custom_headers:nil)
  first_page = list_by_subscription_as_lazy(custom_headers:custom_headers)
  first_page.get_all_items
end

#list_by_subscription_as_lazy(custom_headers: nil) ⇒ PrivateLinkServiceListResult

Gets all private link service 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:

  • (PrivateLinkServiceListResult)

    which provide lazy access to pages of



2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 2019

def list_by_subscription_as_lazy(custom_headers:nil)
  response = list_by_subscription_async(custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

#list_by_subscription_async(custom_headers: nil) ⇒ Concurrent::Promise

Gets all private link service 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.



328
329
330
331
332
333
334
335
336
337
338
339
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
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 328

def list_by_subscription_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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # 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/privateLinkServices'

  request_url = @base_url || @client.base_url

  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 || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkServiceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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_by_subscription_next(next_page_link, custom_headers: nil) ⇒ PrivateLinkServiceListResult

Gets all private link service in a subscription.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (PrivateLinkServiceListResult)

    operation results.



1633
1634
1635
1636
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1633

def list_by_subscription_next(next_page_link, custom_headers:nil)
  response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_by_subscription_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Gets all private link service in a subscription.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1662

def list_by_subscription_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


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

  # 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}'

  request_url = @base_url || @client.base_url

  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 || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkServiceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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_by_subscription_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets all private link service in a subscription.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1648
1649
1650
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1648

def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
  list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_by_subscription_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets all private link service 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.



316
317
318
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 316

def list_by_subscription_with_http_info(custom_headers:nil)
  list_by_subscription_async(custom_headers:custom_headers).value!
end

#list_next(next_page_link, custom_headers: nil) ⇒ PrivateLinkServiceListResult

Gets all private link services in a resource group.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (PrivateLinkServiceListResult)

    operation results.



1543
1544
1545
1546
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1543

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

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

Gets all private link services in a resource group.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1572

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


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

  # 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}'

  request_url = @base_url || @client.base_url

  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 || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateLinkServiceListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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

Gets all private link services in a resource group.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1558
1559
1560
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1558

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

#list_private_endpoint_connections(resource_group_name, service_name, custom_headers: nil) ⇒ Array<PrivateEndpointConnection>

Gets all private end point connections for a specific private link service.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

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

    A hash of custom headers that

Returns:

  • (Array<PrivateEndpointConnection>)

    operation results.



659
660
661
662
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 659

def list_private_endpoint_connections(resource_group_name, service_name, custom_headers:nil)
  first_page = list_private_endpoint_connections_as_lazy(resource_group_name, service_name, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_private_endpoint_connections_as_lazy(resource_group_name, service_name, custom_headers: nil) ⇒ PrivateEndpointConnectionListResult

Gets all private end point connections for a specific private link service.

will be added to the HTTP request.

pages of the response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

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

    A hash of custom headers that

Returns:

  • (PrivateEndpointConnectionListResult)

    which provide lazy access to



2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 2041

def list_private_endpoint_connections_as_lazy(resource_group_name, service_name, custom_headers:nil)
  response = list_private_endpoint_connections_async(resource_group_name, service_name, custom_headers:custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_page_link|
      list_private_endpoint_connections_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

#list_private_endpoint_connections_async(resource_group_name, service_name, custom_headers: nil) ⇒ Concurrent::Promise

Gets all private end point connections for a specific private link service.

to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 688

def list_private_endpoint_connections_async(resource_group_name, service_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'service_name is nil' if service_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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # 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/privateLinkServices/{serviceName}/privateEndpointConnections'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateEndpointConnectionListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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_private_endpoint_connections_next(next_page_link, custom_headers: nil) ⇒ PrivateEndpointConnectionListResult

Gets all private end point connections for a specific private link service.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (PrivateEndpointConnectionListResult)

    operation results.



1723
1724
1725
1726
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1723

def list_private_endpoint_connections_next(next_page_link, custom_headers:nil)
  response = list_private_endpoint_connections_next_async(next_page_link, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_private_endpoint_connections_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise

Gets all private end point connections for a specific private link service.

to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1752

def list_private_endpoint_connections_next_async(next_page_link, custom_headers:nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?


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

  # 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}'

  request_url = @base_url || @client.base_url

  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 || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateEndpointConnectionListResult.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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_private_endpoint_connections_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets all private end point connections for a specific private link service.

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

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful call

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1738
1739
1740
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 1738

def list_private_endpoint_connections_next_with_http_info(next_page_link, custom_headers:nil)
  list_private_endpoint_connections_next_async(next_page_link, custom_headers:custom_headers).value!
end

#list_private_endpoint_connections_with_http_info(resource_group_name, service_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets all private end point connections for a specific private link service.

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



674
675
676
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 674

def list_private_endpoint_connections_with_http_info(resource_group_name, service_name, custom_headers:nil)
  list_private_endpoint_connections_async(resource_group_name, service_name, custom_headers:custom_headers).value!
end

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

Gets all private link services 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.



228
229
230
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 228

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

#update_private_endpoint_connection(resource_group_name, service_name, pe_connection_name, parameters, custom_headers: nil) ⇒ PrivateEndpointConnection

Approve or reject private end point connection for a private link service in a subscription.

connection. or reject the private end point connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

  • parameters (PrivateEndpointConnection)

    Parameters supplied to approve

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

    A hash of custom headers that

Returns:

  • (PrivateEndpointConnection)

    operation results.



503
504
505
506
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 503

def update_private_endpoint_connection(resource_group_name, service_name, pe_connection_name, parameters, custom_headers:nil)
  response = update_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#update_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise

Approve or reject private end point connection for a private link service in a subscription.

connection. or reject the private end point connection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

  • parameters (PrivateEndpointConnection)

    Parameters supplied to approve

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 542

def update_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, parameters, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'service_name is nil' if service_name.nil?
  fail ArgumentError, 'pe_connection_name is nil' if pe_connection_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 = {}
  request_headers['Content-Type'] = 'application/json; charset=utf-8'

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

  # Serialize Request
  request_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateEndpointConnection.mapper()
  request_content = @client.serialize(request_mapper,  parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'serviceName' => service_name,'peConnectionName' => pe_connection_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::Network::Mgmt::V2019_12_01::Models::PrivateEndpointConnection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      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

#update_private_endpoint_connection_with_http_info(resource_group_name, service_name, pe_connection_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Approve or reject private end point connection for a private link service in a subscription.

connection. or reject the private end point connection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • service_name (String)

    The name of the private link service.

  • pe_connection_name (String)

    The name of the private end point

  • parameters (PrivateEndpointConnection)

    Parameters supplied to approve

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



523
524
525
# File 'lib/2019-12-01/generated/azure_mgmt_network/private_link_services.rb', line 523

def update_private_endpoint_connection_with_http_info(resource_group_name, service_name, pe_connection_name, parameters, custom_headers:nil)
  update_private_endpoint_connection_async(resource_group_name, service_name, pe_connection_name, parameters, custom_headers:custom_headers).value!
end