Class: Aws::Interconnect::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Interconnect::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-interconnect/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.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
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.
Instance Method Summary collapse
-
#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.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
486 487 488 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 486 def initialize(*args) super 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.
602 603 604 605 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 602 def accept_connection_proposal(params = {}, = {}) req = build_request(:accept_connection_proposal, params) req.send_request() 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).
737 738 739 740 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 737 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.
824 825 826 827 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 824 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.
879 880 881 882 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 879 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
961 962 963 964 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 961 def get_connection(params = {}, = {}) req = build_request(:get_connection, params) req.send_request() end |
#get_environment(params = {}) ⇒ Types::GetEnvironmentResponse
Describes a specific Environment
1029 1030 1031 1032 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 1029 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.
1093 1094 1095 1096 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 1093 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:
stateenvironmentIdproviderattach 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.
1286 1287 1288 1289 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 1286 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.
1397 1398 1399 1400 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 1397 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.
1442 1443 1444 1445 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 1442 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.
1485 1486 1487 1488 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 1485 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from the specified resource.
1527 1528 1529 1530 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 1527 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.
1653 1654 1655 1656 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 1653 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 |
1769 1770 1771 1772 1773 |
# File 'gems/aws-sdk-interconnect/lib/aws-sdk-interconnect/client.rb', line 1769 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |