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.
588 589 590 591 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 588 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.
682 683 684 685 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 682 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.
778 779 780 781 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 778 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.
892 893 894 895 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 892 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.
961 962 963 964 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 961 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.
1006 1007 1008 1009 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1006 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.
1054 1055 1056 1057 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1054 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.
1102 1103 1104 1105 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1102 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.
1180 1181 1182 1183 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1180 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.
1251 1252 1253 1254 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1251 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
1350 1351 1352 1353 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1350 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
1455 1456 1457 1458 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1455 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.
1524 1525 1526 1527 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1524 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.
1583 1584 1585 1586 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1583 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.
1669 1670 1671 1672 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1669 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.
1749 1750 1751 1752 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1749 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.
1826 1827 1828 1829 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1826 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.
1921 1922 1923 1924 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 1921 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.
2024 2025 2026 2027 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2024 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.
2113 2114 2115 2116 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2113 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.
2217 2218 2219 2220 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2217 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.
2300 2301 2302 2303 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2300 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 |
2416 2417 2418 2419 2420 |
# File 'gems/aws-sdk-lambdacore/lib/aws-sdk-lambdacore/client.rb', line 2416 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |