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.
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 |
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.
594 595 596 597 |
# File 'lib/aws-sdk-interconnect/client.rb', line 594 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.
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.2.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).
729 730 731 732 |
# File 'lib/aws-sdk-interconnect/client.rb', line 729 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.
816 817 818 819 |
# File 'lib/aws-sdk-interconnect/client.rb', line 816 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.
871 872 873 874 |
# File 'lib/aws-sdk-interconnect/client.rb', line 871 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
953 954 955 956 |
# File 'lib/aws-sdk-interconnect/client.rb', line 953 def get_connection(params = {}, = {}) req = build_request(:get_connection, params) req.send_request() end |
#get_environment(params = {}) ⇒ Types::GetEnvironmentResponse
Describes a specific Environment
1021 1022 1023 1024 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1021 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.
1085 1086 1087 1088 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1085 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.
1278 1279 1280 1281 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1278 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.
1389 1390 1391 1392 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1389 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.
1434 1435 1436 1437 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1434 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.
1477 1478 1479 1480 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1477 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from the specified resource.
1519 1520 1521 1522 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1519 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.
1645 1646 1647 1648 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1645 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 |
1761 1762 1763 1764 1765 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1761 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.
1769 1770 1771 |
# File 'lib/aws-sdk-interconnect/client.rb', line 1769 def waiter_names waiters.keys end |