Class: Telnyx::Resources::VirtualCrossConnects
- Inherits:
-
Object
- Object
- Telnyx::Resources::VirtualCrossConnects
- Defined in:
- lib/telnyx/resources/virtual_cross_connects.rb,
sig/telnyx/resources/virtual_cross_connects.rbs
Overview
Virtual Cross Connect operations
Instance Method Summary collapse
-
#create(region_code:, bandwidth_mbps: nil, bgp_asn: nil, cloud_provider: nil, cloud_provider_region: nil, name: nil, network_id: nil, primary_bgp_key: nil, primary_cloud_account_id: nil, primary_cloud_ip: nil, primary_telnyx_ip: nil, secondary_bgp_key: nil, secondary_cloud_account_id: nil, secondary_cloud_ip: nil, secondary_telnyx_ip: nil, request_options: {}) ⇒ Telnyx::Models::VirtualCrossConnectCreateResponse
Some parameter documentations has been truncated, see Models::VirtualCrossConnectCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ Telnyx::Models::VirtualCrossConnectDeleteResponse
Delete a Virtual Cross Connect.
-
#initialize(client:) ⇒ VirtualCrossConnects
constructor
private
A new instance of VirtualCrossConnects.
-
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::VirtualCrossConnectCombined>
Some parameter documentations has been truncated, see Models::VirtualCrossConnectListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::VirtualCrossConnectRetrieveResponse
Retrieve a Virtual Cross Connect.
-
#update(id, primary_cloud_ip: nil, primary_enabled: nil, primary_routing_announcement: nil, secondary_cloud_ip: nil, secondary_enabled: nil, secondary_routing_announcement: nil, request_options: {}) ⇒ Telnyx::Models::VirtualCrossConnectUpdateResponse
Some parameter documentations has been truncated, see Models::VirtualCrossConnectUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ VirtualCrossConnects
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of VirtualCrossConnects.
182 183 184 |
# File 'lib/telnyx/resources/virtual_cross_connects.rb', line 182 def initialize(client:) @client = client end |
Instance Method Details
#create(region_code:, bandwidth_mbps: nil, bgp_asn: nil, cloud_provider: nil, cloud_provider_region: nil, name: nil, network_id: nil, primary_bgp_key: nil, primary_cloud_account_id: nil, primary_cloud_ip: nil, primary_telnyx_ip: nil, secondary_bgp_key: nil, secondary_cloud_account_id: nil, secondary_cloud_ip: nil, secondary_telnyx_ip: nil, request_options: {}) ⇒ Telnyx::Models::VirtualCrossConnectCreateResponse
Some parameter documentations has been truncated, see Models::VirtualCrossConnectCreateParams for more details.
Create a new Virtual Cross Connect.
For AWS and GCE, you have the
option of creating the primary connection first and the secondary connection
later. You also have the option of disabling the primary and/or secondary
connections at any time and later re-enabling them. With Azure, you do not have
this option. Azure requires both the primary and secondary connections to be
created at the same time and they can not be independantly disabled.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/telnyx/resources/virtual_cross_connects.rb', line 54 def create(params) parsed, = Telnyx::VirtualCrossConnectCreateParams.dump_request(params) @client.request( method: :post, path: "virtual_cross_connects", body: parsed, model: Telnyx::Models::VirtualCrossConnectCreateResponse, options: ) end |
#delete(id, request_options: {}) ⇒ Telnyx::Models::VirtualCrossConnectDeleteResponse
Delete a Virtual Cross Connect.
170 171 172 173 174 175 176 177 |
# File 'lib/telnyx/resources/virtual_cross_connects.rb', line 170 def delete(id, params = {}) @client.request( method: :delete, path: ["virtual_cross_connects/%1$s", id], model: Telnyx::Models::VirtualCrossConnectDeleteResponse, options: params[:request_options] ) end |
#list(filter: nil, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::VirtualCrossConnectCombined>
Some parameter documentations has been truncated, see Models::VirtualCrossConnectListParams for more details.
List all Virtual Cross Connects.
146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/telnyx/resources/virtual_cross_connects.rb', line 146 def list(params = {}) parsed, = Telnyx::VirtualCrossConnectListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "virtual_cross_connects", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::VirtualCrossConnectCombined, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::VirtualCrossConnectRetrieveResponse
Retrieve a Virtual Cross Connect.
76 77 78 79 80 81 82 83 |
# File 'lib/telnyx/resources/virtual_cross_connects.rb', line 76 def retrieve(id, params = {}) @client.request( method: :get, path: ["virtual_cross_connects/%1$s", id], model: Telnyx::Models::VirtualCrossConnectRetrieveResponse, options: params[:request_options] ) end |
#update(id, primary_cloud_ip: nil, primary_enabled: nil, primary_routing_announcement: nil, secondary_cloud_ip: nil, secondary_enabled: nil, secondary_routing_announcement: nil, request_options: {}) ⇒ Telnyx::Models::VirtualCrossConnectUpdateResponse
Some parameter documentations has been truncated, see Models::VirtualCrossConnectUpdateParams for more details.
Update the Virtual Cross Connect.
Cloud IPs can only be patched
during the created state, as GCE will only inform you of your generated IP
once the pending connection requested has been accepted. Once the Virtual Cross
Connect has moved to provisioning, the IPs can no longer be
patched.
Once the Virtual Cross Connect has moved to provisioned
and you are ready to enable routing, you can toggle the routing announcements to
true.
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/telnyx/resources/virtual_cross_connects.rb', line 117 def update(id, params = {}) parsed, = Telnyx::VirtualCrossConnectUpdateParams.dump_request(params) @client.request( method: :patch, path: ["virtual_cross_connects/%1$s", id], body: parsed, model: Telnyx::Models::VirtualCrossConnectUpdateResponse, options: ) end |