Class: Aws::Interconnect::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Interconnect::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-interconnect/client.rb
Overview
An API client for Interconnect. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::Interconnect::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#accept_connection_proposal(params = {}) ⇒ Types::AcceptConnectionProposalResponse
Accepts a connection proposal which was generated at a supported partner’s portal.
-
#create_connection(params = {}) ⇒ Types::CreateConnectionResponse
Initiates the process to create a Connection across the specified Environment.
-
#delete_connection(params = {}) ⇒ Types::DeleteConnectionResponse
Deletes an existing Connection with the supplied identifier.
-
#describe_connection_proposal(params = {}) ⇒ Types::DescribeConnectionProposalResponse
Describes the details of a connection proposal generated at a partner’s portal.
-
#get_connection(params = {}) ⇒ Types::GetConnectionResponse
Describes the current state of a Connection resource as specified by the identifier.
-
#get_environment(params = {}) ⇒ Types::GetEnvironmentResponse
Describes a specific Environment.
-
#list_attach_points(params = {}) ⇒ Types::ListAttachPointsResponse
Lists all Attach Points the caller has access to that are valid for the specified Environment.
-
#list_connections(params = {}) ⇒ Types::ListConnectionsResponse
Lists all connection objects to which the caller has access.
-
#list_environments(params = {}) ⇒ Types::ListEnvironmentsResponse
Lists all of the environments that can produce connections that will land in the called AWS region.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all current tags on the specified resource.
-
#tag_resource(params = {}) ⇒ Struct
Add new tags to the specified resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from the specified resource.
-
#update_connection(params = {}) ⇒ Types::UpdateConnectionResponse
Modifies an existing connection.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
480 481 482 |
# File 'lib/aws-sdk-interconnect/client.rb', line 480 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
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.
1798 1799 1800 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1798 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
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.
1801 1802 1803 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1801 def errors_module Errors end |
Instance Method Details
#accept_connection_proposal(params = {}) ⇒ Types::AcceptConnectionProposalResponse
Accepts a connection proposal which was generated at a supported partner’s portal.
The proposal contains the Environment and bandwidth that were chosen on the partner’s portal and cannot be modified.
Upon accepting the proposal a connection will be made between the AWS network as accessed via the selected Attach Point and the network previously selected network on the partner’s portal.
596 597 598 599 |
# File 'lib/aws-sdk-interconnect/client.rb', line 596 def accept_connection_proposal(params = {}, = {}) req = build_request(:accept_connection_proposal, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
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.
1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1656 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::Interconnect') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-interconnect' context[:gem_version] = '1.0.0' Seahorse::Client::Request.new(handlers, context) end |
#create_connection(params = {}) ⇒ Types::CreateConnectionResponse
Initiates the process to create a Connection across the specified Environment.
The Environment dictates the specified partner and location to which the other end of the connection should attach. You can see a list of the available Environments by calling ListEnvironments
The Attach Point specifies where within the AWS Network your connection will logically connect.
After a successful call to this method, the resulting Connection will return an Activation Key which will need to be brought to the specific partner’s portal to confirm the Connection on both sides. (See Environment$activationPageUrl for a direct link to the partner portal).
731 732 733 734 |
# File 'lib/aws-sdk-interconnect/client.rb', line 731 def create_connection(params = {}, = {}) req = build_request(:create_connection, params) req.send_request() end |
#delete_connection(params = {}) ⇒ Types::DeleteConnectionResponse
Deletes an existing Connection with the supplied identifier.
This operation will also inform the remote partner of your intention to delete your connection. Note, the partner may still require you to delete to fully clean up resources, but the network connectivity provided by the Connection will cease to exist.
818 819 820 821 |
# File 'lib/aws-sdk-interconnect/client.rb', line 818 def delete_connection(params = {}, = {}) req = build_request(:delete_connection, params) req.send_request() end |
#describe_connection_proposal(params = {}) ⇒ Types::DescribeConnectionProposalResponse
Describes the details of a connection proposal generated at a partner’s portal.
873 874 875 876 |
# File 'lib/aws-sdk-interconnect/client.rb', line 873 def describe_connection_proposal(params = {}, = {}) req = build_request(:describe_connection_proposal, params) req.send_request() end |
#get_connection(params = {}) ⇒ Types::GetConnectionResponse
Describes the current state of a Connection resource as specified by the identifier.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* connection_available
* connection_deleted
955 956 957 958 |
# File 'lib/aws-sdk-interconnect/client.rb', line 955 def get_connection(params = {}, = {}) req = build_request(:get_connection, params) req.send_request() end |
#get_environment(params = {}) ⇒ Types::GetEnvironmentResponse
Describes a specific Environment
1023 1024 1025 1026 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1023 def get_environment(params = {}, = {}) req = build_request(:get_environment, params) req.send_request() end |
#list_attach_points(params = {}) ⇒ Types::ListAttachPointsResponse
Lists all Attach Points the caller has access to that are valid for the specified Environment.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1087 1088 1089 1090 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1087 def list_attach_points(params = {}, = {}) req = build_request(:list_attach_points, params) req.send_request() end |
#list_connections(params = {}) ⇒ Types::ListConnectionsResponse
Lists all connection objects to which the caller has access.
Allows for optional filtering by the following properties:
-
‘state`
-
‘environmentId`
-
‘provider`
-
‘attach point`
Only Connection objects matching all filters will be returned.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1280 1281 1282 1283 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1280 def list_connections(params = {}, = {}) req = build_request(:list_connections, params) req.send_request() end |
#list_environments(params = {}) ⇒ Types::ListEnvironmentsResponse
Lists all of the environments that can produce connections that will land in the called AWS region.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1391 1392 1393 1394 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1391 def list_environments(params = {}, = {}) req = build_request(:list_environments, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all current tags on the specified resource. Currently this supports Connection resources.
1436 1437 1438 1439 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1436 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Add new tags to the specified resource.
1479 1480 1481 1482 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1479 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from the specified resource.
1521 1522 1523 1524 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1521 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_connection(params = {}) ⇒ Types::UpdateConnectionResponse
Modifies an existing connection. Currently we support modifications to the connection’s description and/or bandwidth.
1647 1648 1649 1650 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1647 def update_connection(params = {}, = {}) req = build_request(:update_connection, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
## Basic Usage
A waiter will call an API operation until:
-
It is successful
-
It enters a terminal state
-
It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
## Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
## Callbacks
You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
## Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
## Valid Waiters
The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.
| waiter_name | params | :delay | :max_attempts | | ——————– | ———————– | ——– | ————- | | connection_available | #get_connection | 30 | 5 | | connection_deleted | #get_connection | 30 | 5 |
1763 1764 1765 1766 1767 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1763 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |
#waiter_names ⇒ Object
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.
1771 1772 1773 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1771 def waiter_names waiters.keys end |