Class: Azure::Network::Mgmt::V2020_03_01::ExpressRouteCrossConnections

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb

Overview

ExpressRouteCrossConnections

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ExpressRouteCrossConnections

Creates and initializes a new instance of the ExpressRouteCrossConnections class.

Parameters:

  • client

    service class for accessing basic functionality.



17
18
19
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.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/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 22

def client
  @client
end

Instance Method Details

#begin_create_or_update(resource_group_name, cross_connection_name, parameters, custom_headers: nil) ⇒ ExpressRouteCrossConnection

Update the specified ExpressRouteCrossConnection.

ExpressRouteCrossConnection. update express route crossConnection operation. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • parameters (ExpressRouteCrossConnection)

    Parameters supplied to the

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCrossConnection)

    operation results.



617
618
619
620
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 617

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

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

Update the specified ExpressRouteCrossConnection.

ExpressRouteCrossConnection. update express route crossConnection operation. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • parameters (ExpressRouteCrossConnection)

    Parameters supplied to the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 652

def begin_create_or_update_async(resource_group_name, cross_connection_name, parameters, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cross_connection_name is nil' if cross_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::V2020_03_01::Models::ExpressRouteCrossConnection.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/expressRouteCrossConnections/{crossConnectionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'crossConnectionName' => cross_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 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::V2020_03_01::Models::ExpressRouteCrossConnection.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, cross_connection_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Update the specified ExpressRouteCrossConnection.

ExpressRouteCrossConnection. update express route crossConnection operation. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • parameters (ExpressRouteCrossConnection)

    Parameters supplied to the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



635
636
637
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 635

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

#begin_list_arp_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ ExpressRouteCircuitsArpTableListResult

Gets the currently advertised ARP table associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCircuitsArpTableListResult)

    operation results.



729
730
731
732
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 729

def begin_list_arp_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  response = begin_list_arp_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_list_arp_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ Concurrent::Promise

Gets the currently advertised ARP table associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 766

def begin_list_arp_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cross_connection_name is nil' if cross_connection_name.nil?
  fail ArgumentError, 'peering_name is nil' if peering_name.nil?
  fail ArgumentError, 'device_path is nil' if device_path.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/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'crossConnectionName' => cross_connection_name,'peeringName' => peering_name,'devicePath' => device_path,'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 == 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::V2020_03_01::Models::ExpressRouteCircuitsArpTableListResult.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_list_arp_table_with_http_info(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the currently advertised ARP table associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



748
749
750
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 748

def begin_list_arp_table_with_http_info(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  begin_list_arp_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
end

#begin_list_routes_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ ExpressRouteCircuitsRoutesTableListResult

Gets the currently advertised routes table associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCircuitsRoutesTableListResult)

    operation results.



946
947
948
949
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 946

def begin_list_routes_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  response = begin_list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ Concurrent::Promise

Gets the currently advertised routes table associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 983

def begin_list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cross_connection_name is nil' if cross_connection_name.nil?
  fail ArgumentError, 'peering_name is nil' if peering_name.nil?
  fail ArgumentError, 'device_path is nil' if device_path.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/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'crossConnectionName' => cross_connection_name,'peeringName' => peering_name,'devicePath' => device_path,'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 == 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::V2020_03_01::Models::ExpressRouteCircuitsRoutesTableListResult.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_list_routes_table_summary(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ ExpressRouteCrossConnectionsRoutesTableSummaryListResult

Gets the route table summary associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. will be added to the HTTP request.

results.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCrossConnectionsRoutesTableSummaryListResult)

    operation



838
839
840
841
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 838

def begin_list_routes_table_summary(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  response = begin_list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#begin_list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ Concurrent::Promise

Gets the route table summary associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
926
927
928
929
930
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 875

def begin_list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cross_connection_name is nil' if cross_connection_name.nil?
  fail ArgumentError, 'peering_name is nil' if peering_name.nil?
  fail ArgumentError, 'device_path is nil' if device_path.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/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'crossConnectionName' => cross_connection_name,'peeringName' => peering_name,'devicePath' => device_path,'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 == 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::V2020_03_01::Models::ExpressRouteCrossConnectionsRoutesTableSummaryListResult.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_list_routes_table_summary_with_http_info(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the route table summary associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



857
858
859
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 857

def begin_list_routes_table_summary_with_http_info(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  begin_list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
end

#begin_list_routes_table_with_http_info(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the currently advertised routes table associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



965
966
967
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 965

def begin_list_routes_table_with_http_info(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  begin_list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
end

#create_or_update(resource_group_name, cross_connection_name, parameters, custom_headers: nil) ⇒ ExpressRouteCrossConnection

Update the specified ExpressRouteCrossConnection.

ExpressRouteCrossConnection. update express route crossConnection operation. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • parameters (ExpressRouteCrossConnection)

    Parameters supplied to the

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCrossConnection)

    operation results.



313
314
315
316
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 313

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

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

ExpressRouteCrossConnection. update express route crossConnection operation. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • parameters (ExpressRouteCrossConnection)

    Parameters supplied to the

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 330

def create_or_update_async(resource_group_name, cross_connection_name, parameters, custom_headers:nil)
  # Send request
  promise = begin_create_or_update_async(resource_group_name, cross_connection_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::V2020_03_01::Models::ExpressRouteCrossConnection.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

#get(resource_group_name, cross_connection_name, custom_headers: nil) ⇒ ExpressRouteCrossConnection

Gets details about the specified ExpressRouteCrossConnection.

location of the circuit). ExpressRouteCrossConnection (service key of the circuit). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group (peering

  • cross_connection_name (String)

    The name of the

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCrossConnection)

    operation results.



212
213
214
215
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 212

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

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

Gets details about the specified ExpressRouteCrossConnection.

location of the circuit). ExpressRouteCrossConnection (service key of the circuit). to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group (peering

  • cross_connection_name (String)

    The name of the

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
294
295
296
297
298
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 245

def get_async(resource_group_name, cross_connection_name, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cross_connection_name is nil' if cross_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/expressRouteCrossConnections/{crossConnectionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'crossConnectionName' => cross_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(: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::V2020_03_01::Models::ExpressRouteCrossConnection.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(resource_group_name, cross_connection_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets details about the specified ExpressRouteCrossConnection.

location of the circuit). ExpressRouteCrossConnection (service key of the circuit). will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group (peering

  • cross_connection_name (String)

    The name of the

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



229
230
231
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 229

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

#list(custom_headers: nil) ⇒ Array<ExpressRouteCrossConnection>

Retrieves all the ExpressRouteCrossConnections 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<ExpressRouteCrossConnection>)

    operation results.



32
33
34
35
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 32

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

#list_arp_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ ExpressRouteCircuitsArpTableListResult

Gets the currently advertised ARP table associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCircuitsArpTableListResult)

    operation results.



470
471
472
473
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 470

def list_arp_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  response = list_arp_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_arp_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ Concurrent::Promise

ExpressRouteCrossConnection. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 487

def list_arp_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  # Send request
  promise = begin_list_arp_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers)

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

#list_as_lazy(custom_headers: nil) ⇒ ExpressRouteCrossConnectionListResult

Retrieves all the ExpressRouteCrossConnections in a subscription.

will be added to the HTTP request.

pages of the response.

Parameters:

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCrossConnectionListResult)

    which provide lazy access to



1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 1229

def list_as_lazy(custom_headers:nil)
  response = list_async(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(custom_headers: nil) ⇒ Concurrent::Promise

Retrieves all the ExpressRouteCrossConnections 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.



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 57

def list_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/expressRouteCrossConnections'

  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 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::V2020_03_01::Models::ExpressRouteCrossConnectionListResult.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_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<ExpressRouteCrossConnection>

Retrieves all the ExpressRouteCrossConnections 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<ExpressRouteCrossConnection>)

    operation results.



119
120
121
122
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 119

def list_by_resource_group(resource_group_name, custom_headers:nil)
  first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
  first_page.get_all_items
end

#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ ExpressRouteCrossConnectionListResult

Retrieves all the ExpressRouteCrossConnections in a resource group.

will be added to the HTTP request.

pages of 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:

  • (ExpressRouteCrossConnectionListResult)

    which provide lazy access to



1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 1250

def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
  response = list_by_resource_group_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_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
    end
    page
  end
end

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

Retrieves all the ExpressRouteCrossConnections 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.



146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 146

def list_by_resource_group_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/expressRouteCrossConnections'

  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 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::V2020_03_01::Models::ExpressRouteCrossConnectionListResult.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_resource_group_next(next_page_link, custom_headers: nil) ⇒ ExpressRouteCrossConnectionListResult

Retrieves all the ExpressRouteCrossConnections 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:

  • (ExpressRouteCrossConnectionListResult)

    operation results.



1140
1141
1142
1143
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 1140

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

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

Retrieves all the ExpressRouteCrossConnections 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.



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
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 1169

def list_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::V2020_03_01::Models::ExpressRouteCrossConnectionListResult.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_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Retrieves all the ExpressRouteCrossConnections 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.



1155
1156
1157
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 1155

def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
  list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
end

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

Retrieves all the ExpressRouteCrossConnections 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.



133
134
135
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 133

def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
  list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
end

#list_next(next_page_link, custom_headers: nil) ⇒ ExpressRouteCrossConnectionListResult

Retrieves all the ExpressRouteCrossConnections 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:

  • (ExpressRouteCrossConnectionListResult)

    operation results.



1050
1051
1052
1053
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 1050

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

Retrieves all the ExpressRouteCrossConnections 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.



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
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 1079

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 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::V2020_03_01::Models::ExpressRouteCrossConnectionListResult.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

Retrieves all the ExpressRouteCrossConnections 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.



1065
1066
1067
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 1065

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_routes_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ ExpressRouteCircuitsRoutesTableListResult

Gets the currently advertised routes table associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCircuitsRoutesTableListResult)

    operation results.



569
570
571
572
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 569

def list_routes_table(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  response = list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ Concurrent::Promise

ExpressRouteCrossConnection. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 586

def list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  # Send request
  promise = begin_list_routes_table_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers)

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

#list_routes_table_summary(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ ExpressRouteCrossConnectionsRoutesTableSummaryListResult

Gets the route table summary associated with the express route cross connection in a resource group.

ExpressRouteCrossConnection. will be added to the HTTP request.

results.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCrossConnectionsRoutesTableSummaryListResult)

    operation



520
521
522
523
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 520

def list_routes_table_summary(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  response = list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers: nil) ⇒ Concurrent::Promise

ExpressRouteCrossConnection. will be added to the HTTP request.

response.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the

  • peering_name (String)

    The name of the peering.

  • device_path (String)

    The path of the device.

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

    A hash of custom headers that

Returns:

  • (Concurrent::Promise)

    promise which provides async access to http



537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 537

def list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:nil)
  # Send request
  promise = begin_list_routes_table_summary_async(resource_group_name, cross_connection_name, peering_name, device_path, custom_headers:custom_headers)

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

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

Retrieves all the ExpressRouteCrossConnections 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.



45
46
47
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 45

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

#update_tags(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers: nil) ⇒ ExpressRouteCrossConnection

Updates an express route cross connection tags.

express route cross connection tags. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the cross connection.

  • cross_connection_parameters (TagsObject)

    Parameters supplied to update

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

    A hash of custom headers that

Returns:

  • (ExpressRouteCrossConnection)

    operation results.



360
361
362
363
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 360

def update_tags(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil)
  response = update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers: nil) ⇒ Concurrent::Promise

Updates an express route cross connection tags.

express route cross connection tags. to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the cross connection.

  • cross_connection_parameters (TagsObject)

    Parameters supplied to update

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 393

def update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'cross_connection_name is nil' if cross_connection_name.nil?
  fail ArgumentError, 'cross_connection_parameters is nil' if cross_connection_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::V2020_03_01::Models::TagsObject.mapper()
  request_content = @client.serialize(request_mapper,  cross_connection_parameters)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'crossConnectionName' => cross_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(: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
      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::V2020_03_01::Models::ExpressRouteCrossConnection.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_tags_with_http_info(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Updates an express route cross connection tags.

express route cross connection tags. will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    The name of the resource group.

  • cross_connection_name (String)

    The name of the cross connection.

  • cross_connection_parameters (TagsObject)

    Parameters supplied to update

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



377
378
379
# File 'lib/2020-03-01/generated/azure_mgmt_network/express_route_cross_connections.rb', line 377

def update_tags_with_http_info(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:nil)
  update_tags_async(resource_group_name, cross_connection_name, cross_connection_parameters, custom_headers:custom_headers).value!
end