Class: Azure::CDN::Mgmt::V2016_04_02::Endpoints

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb

Overview

Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests made to these resources are secure. For more information, see msdn.microsoft.com/en-us/library/azure/dn790557.aspx.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Endpoints

Creates and initializes a new instance of the Endpoints class.

Parameters:

  • client

    service class for accessing basic functionality.



20
21
22
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 20

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientCdnManagementClient (readonly)

Returns reference to the CdnManagementClient.

Returns:



25
26
27
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 25

def client
  @client
end

Instance Method Details

#begin_create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ Endpoint

Creates a new CDN endpoint with the specified parameters.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointCreateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Endpoint)

    operation results.



705
706
707
708
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 705

def begin_create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  response = begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Creates a new CDN endpoint with the specified parameters.

group. Azure subscription. to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointCreateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 742

def begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
  fail ArgumentError, 'endpoint_properties is nil' if endpoint_properties.nil?
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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::CDN::Mgmt::V2016_04_02::Models::EndpointCreateParameters.mapper()
  request_content = @client.serialize(request_mapper,  endpoint_properties)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'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(: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 || status_code == 202
      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::CDN::Mgmt::V2016_04_02::Models::Endpoint.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::CDN::Mgmt::V2016_04_02::Models::Endpoint.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 == 202
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::CDN::Mgmt::V2016_04_02::Models::Endpoint.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_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Creates a new CDN endpoint with the specified parameters.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointCreateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



724
725
726
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 724

def begin_create_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:custom_headers).value!
end

#begin_delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Object

Deletes an existing CDN endpoint with the specified parameters.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that



972
973
974
975
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 972

def begin_delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  response = begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
  nil
end

#begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Deletes an existing CDN endpoint with the specified parameters.

group. Azure subscription. to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1007

def begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Cdn/profiles/{profileName}/endpoints/{endpointName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'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(: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
      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_if_exists_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes an existing CDN endpoint with the specified parameters.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



990
991
992
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 990

def begin_delete_if_exists_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
end

#begin_load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ Object

Forcibly pre-loads CDN endpoint content.

loaded. Path should describe a file. group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (LoadParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that



1382
1383
1384
1385
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1382

def begin_load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  response = begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:custom_headers).value!
  nil
end

#begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Forcibly pre-loads CDN endpoint content.

loaded. Path should describe a file. group. Azure subscription. to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (LoadParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1421

def begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
  fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil?
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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::CDN::Mgmt::V2016_04_02::Models::LoadParameters.mapper()
  request_content = @client.serialize(request_mapper,  content_file_paths)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'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 == 202
      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_load_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Forcibly pre-loads CDN endpoint content.

loaded. Path should describe a file. group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (LoadParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1402
1403
1404
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1402

def begin_load_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:custom_headers).value!
end

#begin_purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ Object

Forcibly purges CDN endpoint content.

purged. Path can describe a file or directory. group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (PurgeParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that



1275
1276
1277
1278
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1275

def begin_purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  response = begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:custom_headers).value!
  nil
end

#begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Forcibly purges CDN endpoint content.

purged. Path can describe a file or directory. group. Azure subscription. to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (PurgeParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1314

def begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
  fail ArgumentError, 'content_file_paths is nil' if content_file_paths.nil?
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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::CDN::Mgmt::V2016_04_02::Models::PurgeParameters.mapper()
  request_content = @client.serialize(request_mapper,  content_file_paths)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'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 == 202
      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_purge_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Forcibly purges CDN endpoint content.

purged. Path can describe a file or directory. group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (PurgeParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1295
1296
1297
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1295

def begin_purge_content_with_http_info(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:custom_headers).value!
end

#begin_start(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Endpoint

Starts an existing stopped CDN endpoint.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Endpoint)

    operation results.



1066
1067
1068
1069
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1066

def begin_start(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  response = begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Starts an existing stopped CDN endpoint.

group. Azure subscription. to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1101

def begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Cdn/profiles/{profileName}/endpoints/{endpointName}/start'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'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(: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 == 202
      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 == 202
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::CDN::Mgmt::V2016_04_02::Models::Endpoint.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_start_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Starts an existing stopped CDN endpoint.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1084
1085
1086
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1084

def begin_start_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
end

#begin_stop(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Endpoint

Stops an existing running CDN endpoint.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Endpoint)

    operation results.



1170
1171
1172
1173
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1170

def begin_stop(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  response = begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Stops an existing running CDN endpoint.

group. Azure subscription. to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1205

def begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'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(: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 == 202
      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 == 202
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::CDN::Mgmt::V2016_04_02::Models::Endpoint.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_stop_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Stops an existing running CDN endpoint.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1188
1189
1190
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 1188

def begin_stop_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
end

#begin_update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ Endpoint

Updates an existing CDN endpoint with the specified parameters. Only tags and OriginHostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointUpdateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Endpoint)

    operation results.



843
844
845
846
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 843

def begin_update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  response = begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Updates an existing CDN endpoint with the specified parameters. Only tags and OriginHostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation.

group. Azure subscription. to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointUpdateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 886

def begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
  fail ArgumentError, 'endpoint_properties is nil' if endpoint_properties.nil?
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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::CDN::Mgmt::V2016_04_02::Models::EndpointUpdateParameters.mapper()
  request_content = @client.serialize(request_mapper,  endpoint_properties)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'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(:patch, 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 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::CDN::Mgmt::V2016_04_02::Models::Endpoint.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 == 202
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::CDN::Mgmt::V2016_04_02::Models::Endpoint.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_update_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updates an existing CDN endpoint with the specified parameters. Only tags and OriginHostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointUpdateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



865
866
867
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 865

def begin_update_with_http_info(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:custom_headers).value!
end

#create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ Endpoint

Creates a new CDN endpoint with the specified parameters.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointCreateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Endpoint)

    operation results.



245
246
247
248
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 245

def create(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  response = create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

group. Azure subscription. will be added to the HTTP request.

response.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointCreateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 263

def create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  # Send request
  promise = begin_create_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::CDN::Mgmt::V2016_04_02::Models::Endpoint.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_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Object

Deletes an existing CDN endpoint with the specified parameters.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that



345
346
347
348
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 345

def delete_if_exists(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  response = delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
  nil
end

#delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

group. Azure subscription. will be added to the HTTP request.

response.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 362

def delete_if_exists_async(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  # Send request
  promise = begin_delete_if_exists_async(endpoint_name, profile_name, resource_group_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(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Endpoint

Gets an existing CDN endpoint with the specified parameters.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Endpoint)

    operation results.



140
141
142
143
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 140

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

#get_async(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Gets an existing CDN endpoint with the specified parameters.

group. Azure subscription. to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 175

def get_async(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Cdn/profiles/{profileName}/endpoints/{endpointName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'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::CDN::Mgmt::V2016_04_02::Models::Endpoint.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_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets an existing CDN endpoint with the specified parameters.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



158
159
160
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 158

def get_with_http_info(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  get_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
end

#list_by_profile(profile_name, resource_group_name, custom_headers: nil) ⇒ EndpointListResult

Lists existing CDN endpoints within a profile.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (EndpointListResult)

    operation results.



39
40
41
42
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 39

def list_by_profile(profile_name, resource_group_name, custom_headers:nil)
  response = list_by_profile_async(profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_by_profile_async(profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Lists existing CDN endpoints within a profile.

group. Azure subscription. to the HTTP request.

Parameters:

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 72

def list_by_profile_async(profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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.Cdn/profiles/{profileName}/endpoints'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'profileName' => profile_name,'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::CDN::Mgmt::V2016_04_02::Models::EndpointListResult.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_profile_with_http_info(profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists existing CDN endpoints within a profile.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



56
57
58
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 56

def list_by_profile_with_http_info(profile_name, resource_group_name, custom_headers:nil)
  list_by_profile_async(profile_name, resource_group_name, custom_headers:custom_headers).value!
end

#load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ Object

Forcibly pre-loads CDN endpoint content.

loaded. Path should describe a file. group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (LoadParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that



535
536
537
538
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 535

def load_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  response = load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:custom_headers).value!
  nil
end

#load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

loaded. Path should describe a file. group. Azure subscription. will be added to the HTTP request.

response.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (LoadParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 554

def load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  # Send request
  promise = begin_load_content_async(endpoint_name, content_file_paths, profile_name, resource_group_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

#purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ Object

Forcibly purges CDN endpoint content.

purged. Path can describe a file or directory. group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (PurgeParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that



487
488
489
490
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 487

def purge_content(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  response = purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:custom_headers).value!
  nil
end

#purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

purged. Path can describe a file or directory. group. Azure subscription. will be added to the HTTP request.

response.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • content_file_paths (PurgeParameters)

    The path to the content to be

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 506

def purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_name, custom_headers:nil)
  # Send request
  promise = begin_purge_content_async(endpoint_name, content_file_paths, profile_name, resource_group_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

#start(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Endpoint

Starts an existing stopped CDN endpoint.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Endpoint)

    operation results.



391
392
393
394
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 391

def start(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  response = start_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#start_async(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

group. Azure subscription. will be added to the HTTP request.

response.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 408

def start_async(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  # Send request
  promise = begin_start_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::CDN::Mgmt::V2016_04_02::Models::Endpoint.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

#stop(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Endpoint

Stops an existing running CDN endpoint.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Endpoint)

    operation results.



439
440
441
442
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 439

def stop(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  response = stop_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#stop_async(endpoint_name, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

group. Azure subscription. will be added to the HTTP request.

response.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 456

def stop_async(endpoint_name, profile_name, resource_group_name, custom_headers:nil)
  # Send request
  promise = begin_stop_async(endpoint_name, profile_name, resource_group_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::CDN::Mgmt::V2016_04_02::Models::Endpoint.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

#update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ Endpoint

Updates an existing CDN endpoint with the specified parameters. Only tags and OriginHostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation.

group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointUpdateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Endpoint)

    operation results.



298
299
300
301
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 298

def update(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  response = update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

group. Azure subscription. will be added to the HTTP request.

response.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • endpoint_properties (EndpointUpdateParameters)

    Endpoint properties

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 316

def update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:nil)
  # Send request
  promise = begin_update_async(endpoint_name, endpoint_properties, profile_name, resource_group_name, custom_headers:custom_headers)

  promise = promise.then do |response|
    # Defining deserialization method.
    deserialize_method = lambda do |parsed_response|
      result_mapper = Azure::CDN::Mgmt::V2016_04_02::Models::Endpoint.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

#validate_custom_domain(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ ValidateCustomDomainOutput

Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.

validate. group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • custom_domain_properties (ValidateCustomDomainInput)

    Custom domain to

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (ValidateCustomDomainOutput)

    operation results.



586
587
588
589
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 586

def validate_custom_domain(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers:nil)
  response = validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise

Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.

validate. group. Azure subscription. to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • custom_domain_properties (ValidateCustomDomainInput)

    Custom domain to

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 627

def validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers:nil)
  fail ArgumentError, 'endpoint_name is nil' if endpoint_name.nil?
  fail ArgumentError, 'custom_domain_properties is nil' if custom_domain_properties.nil?
  fail ArgumentError, 'profile_name is nil' if profile_name.nil?
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.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::CDN::Mgmt::V2016_04_02::Models::ValidateCustomDomainInput.mapper()
  request_content = @client.serialize(request_mapper,  custom_domain_properties)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'endpointName' => endpoint_name,'profileName' => profile_name,'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
      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::CDN::Mgmt::V2016_04_02::Models::ValidateCustomDomainOutput.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

#validate_custom_domain_with_http_info(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Validates a custom domain mapping to ensure it maps to the correct CNAME in DNS.

validate. group. Azure subscription. will be added to the HTTP request.

Parameters:

  • endpoint_name (String)

    Name of the endpoint within the CDN profile.

  • custom_domain_properties (ValidateCustomDomainInput)

    Custom domain to

  • profile_name (String)

    Name of the CDN profile within the resource

  • resource_group_name (String)

    Name of the resource group within the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



607
608
609
# File 'lib/2016-04-02/generated/azure_mgmt_cdn/endpoints.rb', line 607

def validate_custom_domain_with_http_info(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers:nil)
  validate_custom_domain_async(endpoint_name, custom_domain_properties, profile_name, resource_group_name, custom_headers:custom_headers).value!
end