Class: Aws::ELBProxy::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::ELBProxy::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb
Overview
An API client for ELBProxy. To construct a client, you need to configure a :region and :credentials.
client = Aws::ELBProxy::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
-
#associate_certificate(params = {}) ⇒ Types::AssociateCertificateResponse
Associates an ACM certificate with the specified Proxy.
-
#create_proxy(params = {}) ⇒ Types::CreateProxyResponse
Creates a proxy.
-
#delete_proxy(params = {}) ⇒ Types::DeleteProxyResponse
Deletes a proxy.
-
#disassociate_certificate(params = {}) ⇒ Types::DisassociateCertificateResponse
Disassociates an ACM certificate from the specified proxy.
-
#get_proxy(params = {}) ⇒ Types::GetProxyResponse
Retrieves information about the specified proxy.
-
#get_proxy_attributes(params = {}) ⇒ Types::GetProxyAttributesResponse
Retrieves the attributes for the specified proxy.
-
#get_proxy_configuration_contents(params = {}) ⇒ Types::GetProxyConfigurationContentsResponse
Retrieves the configuration file, the configuration archive, or both for the specified proxy.
-
#get_proxy_update(params = {}) ⇒ Types::GetProxyUpdateResponse
Retrieves information about the specified proxy update.
-
#list_certificate_associations(params = {}) ⇒ Types::ListCertificateAssociationsResponse
Lists the ACM certificate associations for the specified proxy.
-
#list_proxies(params = {}) ⇒ Types::ListProxiesResponse
Lists the proxies owned by the caller account.
-
#list_proxy_updates(params = {}) ⇒ Types::ListProxyUpdatesResponse
Lists the updates for the specified proxy, most recently submitted first.
-
#list_proxy_versions(params = {}) ⇒ Types::ListProxyVersionsResponse
Lists the available proxy versions.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists the tags for the specified resource.
-
#tag_resource(params = {}) ⇒ Struct
Adds the specified tags to the specified resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes the specified tags from the specified resource.
-
#update_proxy_attributes(params = {}) ⇒ Types::UpdateProxyAttributesResponse
Updates the attributes for the specified proxy.
-
#update_proxy_configuration(params = {}) ⇒ Types::UpdateProxyConfigurationResponse
Updates the configuration for the specified proxy.
-
#update_proxy_network_configuration(params = {}) ⇒ Types::UpdateProxyNetworkConfigurationResponse
Updates the network configuration for the specified proxy.
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.
479 480 481 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 479 def initialize(*args) super end |
Instance Method Details
#associate_certificate(params = {}) ⇒ Types::AssociateCertificateResponse
Associates an ACM certificate with the specified Proxy.
540 541 542 543 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 540 def associate_certificate(params = {}, = {}) req = build_request(:associate_certificate, params) req.send_request() end |
#create_proxy(params = {}) ⇒ Types::CreateProxyResponse
Creates a proxy. A proxy is a fully managed, Envoy-based proxy that runs your Envoy configuration on Amazon EC2 instances inside your own virtual private cloud (VPC). AWS provisions and scales the proxy, upgrades the Envoy version, patches the operating system, and monitors its health.
788 789 790 791 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 788 def create_proxy(params = {}, = {}) req = build_request(:create_proxy, params) req.send_request() end |
#delete_proxy(params = {}) ⇒ Types::DeleteProxyResponse
Deletes a proxy.
844 845 846 847 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 844 def delete_proxy(params = {}, = {}) req = build_request(:delete_proxy, params) req.send_request() end |
#disassociate_certificate(params = {}) ⇒ Types::DisassociateCertificateResponse
Disassociates an ACM certificate from the specified proxy.
904 905 906 907 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 904 def disassociate_certificate(params = {}, = {}) req = build_request(:disassociate_certificate, params) req.send_request() end |
#get_proxy(params = {}) ⇒ Types::GetProxyResponse
Retrieves information about the specified proxy.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- proxy_active
- proxy_deleted
1030 1031 1032 1033 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1030 def get_proxy(params = {}, = {}) req = build_request(:get_proxy, params) req.send_request() end |
#get_proxy_attributes(params = {}) ⇒ Types::GetProxyAttributesResponse
Retrieves the attributes for the specified proxy.
1106 1107 1108 1109 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1106 def get_proxy_attributes(params = {}, = {}) req = build_request(:get_proxy_attributes, params) req.send_request() end |
#get_proxy_configuration_contents(params = {}) ⇒ Types::GetProxyConfigurationContentsResponse
Retrieves the configuration file, the configuration archive, or both for the specified proxy. This operation is separate from GetProxy so that you can grant access to proxy metadata without granting access to the configuration content.
1176 1177 1178 1179 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1176 def get_proxy_configuration_contents(params = {}, = {}) req = build_request(:get_proxy_configuration_contents, params) req.send_request() end |
#get_proxy_update(params = {}) ⇒ Types::GetProxyUpdateResponse
Retrieves information about the specified proxy update.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- proxy_update_complete
1263 1264 1265 1266 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1263 def get_proxy_update(params = {}, = {}) req = build_request(:get_proxy_update, params) req.send_request() end |
#list_certificate_associations(params = {}) ⇒ Types::ListCertificateAssociationsResponse
Lists the ACM certificate associations for the specified proxy.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1333 1334 1335 1336 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1333 def list_certificate_associations(params = {}, = {}) req = build_request(:list_certificate_associations, params) req.send_request() end |
#list_proxies(params = {}) ⇒ Types::ListProxiesResponse
Lists the proxies owned by the caller account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1407 1408 1409 1410 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1407 def list_proxies(params = {}, = {}) req = build_request(:list_proxies, params) req.send_request() end |
#list_proxy_updates(params = {}) ⇒ Types::ListProxyUpdatesResponse
Lists the updates for the specified proxy, most recently submitted first.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1479 1480 1481 1482 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1479 def list_proxy_updates(params = {}, = {}) req = build_request(:list_proxy_updates, params) req.send_request() end |
#list_proxy_versions(params = {}) ⇒ Types::ListProxyVersionsResponse
Lists the available proxy versions.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1544 1545 1546 1547 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1544 def list_proxy_versions(params = {}, = {}) req = build_request(:list_proxy_versions, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists the tags for the specified resource.
1590 1591 1592 1593 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1590 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds the specified tags to the specified resource.
1635 1636 1637 1638 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1635 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes the specified tags from the specified resource.
1677 1678 1679 1680 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1677 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_proxy_attributes(params = {}) ⇒ Types::UpdateProxyAttributesResponse
Updates the attributes for the specified proxy.
1916 1917 1918 1919 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 1916 def update_proxy_attributes(params = {}, = {}) req = build_request(:update_proxy_attributes, params) req.send_request() end |
#update_proxy_configuration(params = {}) ⇒ Types::UpdateProxyConfigurationResponse
Updates the configuration for the specified proxy. You can update the configuration file, the configuration archive, or both.
2004 2005 2006 2007 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 2004 def update_proxy_configuration(params = {}, = {}) req = build_request(:update_proxy_configuration, params) req.send_request() end |
#update_proxy_network_configuration(params = {}) ⇒ Types::UpdateProxyNetworkConfigurationResponse
Updates the network configuration for the specified proxy.
2142 2143 2144 2145 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 2142 def update_proxy_network_configuration(params = {}, = {}) req = build_request(:update_proxy_network_configuration, 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 |
|---|---|---|---|
| proxy_active | #get_proxy | 15 | 40 |
| proxy_deleted | #get_proxy | 15 | 40 |
| proxy_update_complete | #get_proxy_update | 5 | 24 |
2259 2260 2261 2262 2263 |
# File 'gems/aws-sdk-elbproxy/lib/aws-sdk-elbproxy/client.rb', line 2259 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |