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,
sig/client.rbs
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.
Defined Under Namespace
Modules: _AcceptConnectionProposalResponseSuccess, _CreateConnectionResponseSuccess, _DeleteConnectionResponseSuccess, _DescribeConnectionProposalResponseSuccess, _GetConnectionResponseSuccess, _GetEnvironmentResponseSuccess, _ListAttachPointsResponseSuccess, _ListConnectionsResponseSuccess, _ListEnvironmentsResponseSuccess, _ListTagsForResourceResponseSuccess, _TagResourceResponseSuccess, _UntagResourceResponseSuccess, _UpdateConnectionResponseSuccess
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
- .new ⇒ Object
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.
478 479 480 |
# File 'lib/aws-sdk-interconnect/client.rb', line 478 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.
1796 1797 1798 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1796 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.
1799 1800 1801 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1799 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
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.
87 |
# File 'sig/client.rbs', line 87
def accept_connection_proposal: (
|
#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.
1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1654 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.4.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).
104 |
# File 'sig/client.rbs', line 104
def create_connection: (
|
#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.
125 |
# File 'sig/client.rbs', line 125
def delete_connection: (
|
#describe_connection_proposal(params = {}) ⇒ Types::DescribeConnectionProposalResponse
Describes the details of a connection proposal generated at a partner's portal.
139 |
# File 'sig/client.rbs', line 139
def describe_connection_proposal: (
|
#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
149 |
# File 'sig/client.rbs', line 149
def get_connection: (
|
#get_environment(params = {}) ⇒ Types::GetEnvironmentResponse
Describes a specific Environment
159 |
# File 'sig/client.rbs', line 159
def get_environment: (
|
#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.
170 |
# File 'sig/client.rbs', line 170
def list_attach_points: (
|
#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.
183 |
# File 'sig/client.rbs', line 183
def list_connections: (
|
#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.
205 |
# File 'sig/client.rbs', line 205
def list_environments: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List all current tags on the specified resource. Currently this supports Connection resources.
221 |
# File 'sig/client.rbs', line 221
def list_tags_for_resource: (
|
#tag_resource(params = {}) ⇒ Struct
Add new tags to the specified resource.
230 |
# File 'sig/client.rbs', line 230
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Removes tags from the specified resource.
240 |
# File 'sig/client.rbs', line 240
def untag_resource: (
|
#update_connection(params = {}) ⇒ Types::UpdateConnectionResponse
Modifies an existing connection. Currently we support modifications to the connection's description and/or bandwidth.
251 |
# File 'sig/client.rbs', line 251
def update_connection: (
|
#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 |
260 |
# File 'sig/client.rbs', line 260
def wait_until: (:connection_available waiter_name,
|
#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.
1769 1770 1771 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1769 def waiter_names waiters.keys end |