Class: Aws::LambdaCore::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::LambdaCore::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb
Overview
An API client for LambdaCore. To construct a client, you need to configure a :region and :credentials.
client = Aws::LambdaCore::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
-
#create_network_connector(params = {}) ⇒ Types::CreateNetworkConnectorResponse
Creates a network connector that enables Lambda compute resources to route outbound traffic through your Amazon VPC.
-
#create_runtime(params = {}) ⇒ Types::CreateRuntimeResponse
Creates a customer-managed runtime, a resource providing a centrally managed execution environment for your Lambda functions.
-
#create_runtime_alias(params = {}) ⇒ Types::CreateRuntimeAliasResponse
Creates a new customer-managed runtime alias.
-
#create_runtime_version(params = {}) ⇒ Types::CreateRuntimeVersionResponse
Creates a new runtime version.
-
#delete_network_connector(params = {}) ⇒ Types::DeleteNetworkConnectorResponse
Initiates deletion of a network connector.
-
#delete_runtime(params = {}) ⇒ Struct
Schedules a customer-managed runtime to be deleted.
-
#delete_runtime_alias(params = {}) ⇒ Struct
Schedules a runtime alias to be deleted.
-
#delete_runtime_version(params = {}) ⇒ Struct
Schedules a runtime version to be deleted.
-
#get_network_connector(params = {}) ⇒ Types::GetNetworkConnectorResponse
Retrieves the current configuration, state, and metadata of a network connector.
-
#get_runtime(params = {}) ⇒ Types::GetRuntimeResponse
Retrieves the configuration and metadata of a runtime.
-
#get_runtime_alias(params = {}) ⇒ Types::GetRuntimeAliasResponse
Retrieves the configuration, state, and metadata of a runtime alias.
-
#get_runtime_version(params = {}) ⇒ Types::GetRuntimeVersionResponse
Retrieves the configuration, state, and metadata of a runtime version.
-
#list_network_connector_versions(params = {}) ⇒ Types::ListNetworkConnectorVersionsResponse
Returns a paginated list of the versions of a network connector.
-
#list_network_connectors(params = {}) ⇒ Types::ListNetworkConnectorsResponse
Returns a paginated list of network connectors in your account for the current Region.
-
#list_runtime_aliases(params = {}) ⇒ Types::ListRuntimeAliasesResponse
Returns a paginated list of aliases for the specified runtime.
-
#list_runtime_versions(params = {}) ⇒ Types::ListRuntimeVersionsResponse
Returns a paginated list of versions for the specified runtime.
-
#list_runtimes(params = {}) ⇒ Types::ListRuntimesResponse
Returns a paginated list of runtimes in your account for the current Region.
-
#restore_runtime(params = {}) ⇒ Types::RestoreRuntimeResponse
Cancels a pending scheduled deletion, returning the resource to the ACTIVE state.
-
#update_network_connector(params = {}) ⇒ Types::UpdateNetworkConnectorResponse
Updates the VPC configuration or operator role of an existing network connector.
-
#update_runtime(params = {}) ⇒ Types::UpdateRuntimeResponse
Updates the properties of an existing customer-managed runtime, such as its description, license information, or lifecycle information.
-
#update_runtime_alias(params = {}) ⇒ Types::UpdateRuntimeAliasResponse
Updates an existing runtime alias to point to a different runtime version or to change its description or lifecycle information.
-
#update_runtime_version(params = {}) ⇒ Types::UpdateRuntimeVersionResponse
Updates the runtime version release notes.
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-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 479 def initialize(*args) super end |
Instance Method Details
#create_network_connector(params = {}) ⇒ Types::CreateNetworkConnectorResponse
Creates a network connector that enables Lambda compute resources to route outbound traffic through your Amazon VPC. The network connector provisions elastic network interfaces (ENIs) in the subnets you specify, providing a managed network path to private resources such as databases, caches, and internal APIs.
This operation is asynchronous. The network connector starts in
PENDING state while ENIs are provisioned in your VPC (provisioning
typically takes up to 10 minutes). Use GetNetworkConnector to poll
the connector state until it reaches ACTIVE. Once active, you can
attach the connector to supported Lambda compute resources — such as
MicroVMs and WebFunctions — at run time. For how to attach a
connector, see the documentation for the specific compute type.
This operation is idempotent when you provide a ClientToken — if you
retry a request that completed successfully using the same client
token, the operation returns the existing connector without creating a
duplicate.
584 585 586 587 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 584 def create_network_connector(params = {}, = {}) req = build_request(:create_network_connector, params) req.send_request() end |
#create_runtime(params = {}) ⇒ Types::CreateRuntimeResponse
Creates a customer-managed runtime, a resource providing a centrally managed execution environment for your Lambda functions. The runtime resource is the parent of the runtime version and runtime alias child resources.
678 679 680 681 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 678 def create_runtime(params = {}, = {}) req = build_request(:create_runtime, params) req.send_request() end |
#create_runtime_alias(params = {}) ⇒ Types::CreateRuntimeAliasResponse
Creates a new customer-managed runtime alias. The alias is a named pointer to a runtime version. Functions consume the customer-managed runtime through the runtime alias.
774 775 776 777 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 774 def create_runtime_alias(params = {}, = {}) req = build_request(:create_runtime_alias, params) req.send_request() end |
#create_runtime_version(params = {}) ⇒ Types::CreateRuntimeVersionResponse
Creates a new runtime version. A runtime version defines the function execution environment by referencing a container image. Runtime versions are immutable. To update the runtime, create a new runtime version and migrate functions by updating the runtime aliases to point to the new runtime version.
888 889 890 891 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 888 def create_runtime_version(params = {}, = {}) req = build_request(:create_runtime_version, params) req.send_request() end |
#delete_network_connector(params = {}) ⇒ Types::DeleteNetworkConnectorResponse
Initiates deletion of a network connector. The connector transitions
to DELETING state while elastic network interfaces are cleaned up
asynchronously. After deletion completes, subsequent calls to
GetNetworkConnector return ResourceNotFoundException.
This operation is idempotent — calling delete on a connector that is
already deleting or has been deleted succeeds without error. You can
delete connectors in ACTIVE or FAILED states. Before deleting a
connector, ensure that no Lambda compute resources are using it, as
they will lose VPC egress connectivity immediately.
Deleting with an unqualified identifier removes the connector and all of its versions. To remove a single historical version, supply its version-qualified ARN; the connector and its remaining versions are unaffected. You can't delete the latest version on its own — delete the connector to remove it.
956 957 958 959 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 956 def delete_network_connector(params = {}, = {}) req = build_request(:delete_network_connector, params) req.send_request() end |
#delete_runtime(params = {}) ⇒ Struct
Schedules a customer-managed runtime to be deleted. Runtimes scheduled for deletion enter the PENDING_DELETION state and can be restored during the scheduled deletion window. Runtime versions and aliases must be deleted or scheduled for deletion before deleting the runtime. Function invokes fail for functions using runtime versions or aliases that are deleted or pending deletion.
1001 1002 1003 1004 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1001 def delete_runtime(params = {}, = {}) req = build_request(:delete_runtime, params) req.send_request() end |
#delete_runtime_alias(params = {}) ⇒ Struct
Schedules a runtime alias to be deleted. Runtime aliases scheduled for deletion enter the PENDING_DELETION state and can be restored during the scheduled deletion window. Function invokes fail for functions using runtime aliases that are deleted or pending deletion.
1049 1050 1051 1052 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1049 def delete_runtime_alias(params = {}, = {}) req = build_request(:delete_runtime_alias, params) req.send_request() end |
#delete_runtime_version(params = {}) ⇒ Struct
Schedules a runtime version to be deleted. Runtime versions scheduled for deletion enter the PENDING_DELETION state and can be restored during the scheduled deletion window. Function invokes fail for functions using a runtime version that is deleted or pending deletion.
1097 1098 1099 1100 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1097 def delete_runtime_version(params = {}, = {}) req = build_request(:delete_runtime_version, params) req.send_request() end |
#get_network_connector(params = {}) ⇒ Types::GetNetworkConnectorResponse
Retrieves the current configuration, state, and metadata of a network
connector. The Identifier parameter accepts the connector ID, name,
or full ARN. Use this operation to poll connector state after creation
or update, or to inspect the current VPC configuration and any failure
reasons.
The response includes the full connector configuration, current state,
and — if the connector has been updated — the LastUpdateStatus and
LastUpdateStatusReasonCode fields that indicate whether the most
recent update succeeded or failed.
1174 1175 1176 1177 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1174 def get_network_connector(params = {}, = {}) req = build_request(:get_network_connector, params) req.send_request() end |
#get_runtime(params = {}) ⇒ Types::GetRuntimeResponse
Retrieves the configuration and metadata of a runtime.
1245 1246 1247 1248 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1245 def get_runtime(params = {}, = {}) req = build_request(:get_runtime, params) req.send_request() end |
#get_runtime_alias(params = {}) ⇒ Types::GetRuntimeAliasResponse
Retrieves the configuration, state, and metadata of a runtime alias.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- runtime_alias_active
1344 1345 1346 1347 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1344 def get_runtime_alias(params = {}, = {}) req = build_request(:get_runtime_alias, params) req.send_request() end |
#get_runtime_version(params = {}) ⇒ Types::GetRuntimeVersionResponse
Retrieves the configuration, state, and metadata of a runtime version.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- runtime_version_active
1449 1450 1451 1452 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1449 def get_runtime_version(params = {}, = {}) req = build_request(:get_runtime_version, params) req.send_request() end |
#list_network_connector_versions(params = {}) ⇒ Types::ListNetworkConnectorVersionsResponse
Returns a paginated list of the versions of a network connector. Each
configuration update creates a new immutable version; this operation
lists those versions for the connector you specify. You can optionally
filter results by version state. Use the Marker parameter from a
previous response to retrieve the next page of results.
Each item in the response includes the version-qualified ARN, version
number, current state, and last modified timestamp for that version.
To retrieve the current (latest) configuration of the connector, use
GetNetworkConnector; to inspect a specific version, call
GetNetworkConnector with a version-qualified identifier.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1518 1519 1520 1521 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1518 def list_network_connector_versions(params = {}, = {}) req = build_request(:list_network_connector_versions, params) req.send_request() end |
#list_network_connectors(params = {}) ⇒ Types::ListNetworkConnectorsResponse
Returns a paginated list of network connectors in your account for the
current Region. You can optionally filter results by connector state.
Use the Marker parameter from a previous response to retrieve the
next page of results.
Each item in the response includes the connector ARN, name, ID, type,
current state, and last modified timestamp. To retrieve full
configuration details for a specific connector, use
GetNetworkConnector.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1577 1578 1579 1580 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1577 def list_network_connectors(params = {}, = {}) req = build_request(:list_network_connectors, params) req.send_request() end |
#list_runtime_aliases(params = {}) ⇒ Types::ListRuntimeAliasesResponse
Returns a paginated list of aliases for the specified runtime.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1663 1664 1665 1666 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1663 def list_runtime_aliases(params = {}, = {}) req = build_request(:list_runtime_aliases, params) req.send_request() end |
#list_runtime_versions(params = {}) ⇒ Types::ListRuntimeVersionsResponse
Returns a paginated list of versions for the specified runtime.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1743 1744 1745 1746 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1743 def list_runtime_versions(params = {}, = {}) req = build_request(:list_runtime_versions, params) req.send_request() end |
#list_runtimes(params = {}) ⇒ Types::ListRuntimesResponse
Returns a paginated list of runtimes in your account for the current Region.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1820 1821 1822 1823 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1820 def list_runtimes(params = {}, = {}) req = build_request(:list_runtimes, params) req.send_request() end |
#restore_runtime(params = {}) ⇒ Types::RestoreRuntimeResponse
Cancels a pending scheduled deletion, returning the resource to the ACTIVE state. Scope is determined by the RuntimeName path parameter plus an optional, mutually exclusive RuntimeVersion or RuntimeAlias query parameter: with neither, the runtime itself is restored; with RuntimeVersion, the named runtime version; with RuntimeAlias, the named runtime alias. Restoring a resource that is already ACTIVE is a no-op success. Restore only works while the target is PENDING_DELETION; once the scheduled deletion has begun executing (DELETING) or has completed, the call fails.
1915 1916 1917 1918 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1915 def restore_runtime(params = {}, = {}) req = build_request(:restore_runtime, params) req.send_request() end |
#update_network_connector(params = {}) ⇒ Types::UpdateNetworkConnectorResponse
Updates the VPC configuration or operator role of an existing network
connector. You can modify the subnet IDs, security group IDs, network
protocol, or operator role. The connector must be in ACTIVE state to
accept updates.
This operation is asynchronous. The connector remains in ACTIVE
state during the update — existing workloads that reference this
connector are not disrupted. Use GetNetworkConnector to monitor the
LastUpdateStatus field, which transitions through InProgress to
Successful or Failed. If the update fails, the
LastUpdateStatusReasonCode field provides a specific error code for
troubleshooting. This operation is idempotent when you provide a
ClientToken.
Each successful configuration change creates a new immutable version.
A connector can have a limited number of versions; once that limit is
reached, further updates fail with
NetworkConnectorLimitExceededException until you delete older
versions.
2014 2015 2016 2017 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2014 def update_network_connector(params = {}, = {}) req = build_request(:update_network_connector, params) req.send_request() end |
#update_runtime(params = {}) ⇒ Types::UpdateRuntimeResponse
Updates the properties of an existing customer-managed runtime, such as its description, license information, or lifecycle information.
2103 2104 2105 2106 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2103 def update_runtime(params = {}, = {}) req = build_request(:update_runtime, params) req.send_request() end |
#update_runtime_alias(params = {}) ⇒ Types::UpdateRuntimeAliasResponse
Updates an existing runtime alias to point to a different runtime version or to change its description or lifecycle information.
2207 2208 2209 2210 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2207 def update_runtime_alias(params = {}, = {}) req = build_request(:update_runtime_alias, params) req.send_request() end |
#update_runtime_version(params = {}) ⇒ Types::UpdateRuntimeVersionResponse
Updates the runtime version release notes. The runtime version must be in the ACTIVE state. The runtime version image is immutable. To change the runtime contents, create a new runtime version.
2290 2291 2292 2293 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2290 def update_runtime_version(params = {}, = {}) req = build_request(:update_runtime_version, 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 |
|---|---|---|---|
| runtime_alias_active | #get_runtime_alias | 2 | 60 |
| runtime_version_active | #get_runtime_version | 2 | 60 |
2406 2407 2408 2409 2410 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2406 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |