Interface LambdaCoreClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder() method.
AWS Lambda Core is a set of APIs for managing shared infrastructure resources used by AWS Lambda. The Lambda Core API provides operations for creating and managing network connectors that enable Lambda MicroVMs to access resources in your Amazon Virtual Private Cloud (Amazon VPC).
Network connectors provision elastic network interfaces (ENIs) in your VPC subnets, providing a managed network path from Lambda compute environments to private resources such as Amazon RDS databases, Amazon ElastiCache clusters, and internal APIs. You create a network connector once and attach it to one or more Lambda MicroVMs at run time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic LambdaCoreClientBuilderbuilder()Create a builder that can be used to configure and create aLambdaCoreClient.static LambdaCoreClientcreate()Create aLambdaCoreClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateNetworkConnectorResponsecreateNetworkConnector(Consumer<CreateNetworkConnectorRequest.Builder> createNetworkConnectorRequest) Creates a network connector that enables Lambda compute resources to route outbound traffic through your Amazon VPC.default CreateNetworkConnectorResponsecreateNetworkConnector(CreateNetworkConnectorRequest createNetworkConnectorRequest) Creates a network connector that enables Lambda compute resources to route outbound traffic through your Amazon VPC.default DeleteNetworkConnectorResponsedeleteNetworkConnector(Consumer<DeleteNetworkConnectorRequest.Builder> deleteNetworkConnectorRequest) Initiates deletion of a network connector.default DeleteNetworkConnectorResponsedeleteNetworkConnector(DeleteNetworkConnectorRequest deleteNetworkConnectorRequest) Initiates deletion of a network connector.default GetNetworkConnectorResponsegetNetworkConnector(Consumer<GetNetworkConnectorRequest.Builder> getNetworkConnectorRequest) Retrieves the current configuration, state, and metadata of a network connector.default GetNetworkConnectorResponsegetNetworkConnector(GetNetworkConnectorRequest getNetworkConnectorRequest) Retrieves the current configuration, state, and metadata of a network connector.default ListNetworkConnectorsResponselistNetworkConnectors(Consumer<ListNetworkConnectorsRequest.Builder> listNetworkConnectorsRequest) Returns a paginated list of network connectors in your account for the current Region.default ListNetworkConnectorsResponselistNetworkConnectors(ListNetworkConnectorsRequest listNetworkConnectorsRequest) Returns a paginated list of network connectors in your account for the current Region.default ListNetworkConnectorsIterablelistNetworkConnectorsPaginator(Consumer<ListNetworkConnectorsRequest.Builder> listNetworkConnectorsRequest) This is a variant oflistNetworkConnectors(software.amazon.awssdk.services.lambdacore.model.ListNetworkConnectorsRequest)operation.default ListNetworkConnectorsIterablelistNetworkConnectorsPaginator(ListNetworkConnectorsRequest listNetworkConnectorsRequest) This is a variant oflistNetworkConnectors(software.amazon.awssdk.services.lambdacore.model.ListNetworkConnectorsRequest)operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadatadefault UpdateNetworkConnectorResponseupdateNetworkConnector(Consumer<UpdateNetworkConnectorRequest.Builder> updateNetworkConnectorRequest) Updates the VPC configuration or operator role of an existing network connector.default UpdateNetworkConnectorResponseupdateNetworkConnector(UpdateNetworkConnectorRequest updateNetworkConnectorRequest) Updates the VPC configuration or operator role of an existing network connector.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
createNetworkConnector
default CreateNetworkConnectorResponse createNetworkConnector(CreateNetworkConnectorRequest createNetworkConnectorRequest) throws InvalidParameterValueException, ResourceConflictException, NetworkConnectorLimitExceededException, ServiceException, TooManyRequestsException, AwsServiceException, SdkClientException, LambdaCoreException 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
PENDINGstate while ENIs are provisioned in your VPC (provisioning typically takes up to 10 minutes). UseGetNetworkConnectorto poll the connector state until it reachesACTIVE. Once active, you can attach the connector to Lambda MicroVMs at run time using theegressNetworkConnectorsparameter onRunMicroVm.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.- Parameters:
createNetworkConnectorRequest-- Returns:
- Result of the CreateNetworkConnector operation returned by the service.
- See Also:
-
createNetworkConnector
default CreateNetworkConnectorResponse createNetworkConnector(Consumer<CreateNetworkConnectorRequest.Builder> createNetworkConnectorRequest) throws InvalidParameterValueException, ResourceConflictException, NetworkConnectorLimitExceededException, ServiceException, TooManyRequestsException, AwsServiceException, SdkClientException, LambdaCoreException 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
PENDINGstate while ENIs are provisioned in your VPC (provisioning typically takes up to 10 minutes). UseGetNetworkConnectorto poll the connector state until it reachesACTIVE. Once active, you can attach the connector to Lambda MicroVMs at run time using theegressNetworkConnectorsparameter onRunMicroVm.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.
This is a convenience which creates an instance of the
CreateNetworkConnectorRequest.Builderavoiding the need to create one manually viaCreateNetworkConnectorRequest.builder()- Parameters:
createNetworkConnectorRequest- AConsumerthat will call methods onCreateNetworkConnectorRequest.Builderto create a request.- Returns:
- Result of the CreateNetworkConnector operation returned by the service.
- See Also:
-
deleteNetworkConnector
default DeleteNetworkConnectorResponse deleteNetworkConnector(DeleteNetworkConnectorRequest deleteNetworkConnectorRequest) throws InvalidParameterValueException, ResourceConflictException, ServiceException, TooManyRequestsException, ResourceNotFoundException, AwsServiceException, SdkClientException, LambdaCoreException Initiates deletion of a network connector. The connector transitions to
DELETINGstate while elastic network interfaces are cleaned up asynchronously. After deletion completes, subsequent calls toGetNetworkConnectorreturnResourceNotFoundException.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
ACTIVEorFAILEDstates. Before deleting a connector, ensure that no Lambda MicroVMs are using it, as they will lose VPC egress connectivity immediately.- Parameters:
deleteNetworkConnectorRequest-- Returns:
- Result of the DeleteNetworkConnector operation returned by the service.
- See Also:
-
deleteNetworkConnector
default DeleteNetworkConnectorResponse deleteNetworkConnector(Consumer<DeleteNetworkConnectorRequest.Builder> deleteNetworkConnectorRequest) throws InvalidParameterValueException, ResourceConflictException, ServiceException, TooManyRequestsException, ResourceNotFoundException, AwsServiceException, SdkClientException, LambdaCoreException Initiates deletion of a network connector. The connector transitions to
DELETINGstate while elastic network interfaces are cleaned up asynchronously. After deletion completes, subsequent calls toGetNetworkConnectorreturnResourceNotFoundException.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
ACTIVEorFAILEDstates. Before deleting a connector, ensure that no Lambda MicroVMs are using it, as they will lose VPC egress connectivity immediately.
This is a convenience which creates an instance of the
DeleteNetworkConnectorRequest.Builderavoiding the need to create one manually viaDeleteNetworkConnectorRequest.builder()- Parameters:
deleteNetworkConnectorRequest- AConsumerthat will call methods onDeleteNetworkConnectorRequest.Builderto create a request.- Returns:
- Result of the DeleteNetworkConnector operation returned by the service.
- See Also:
-
getNetworkConnector
default GetNetworkConnectorResponse getNetworkConnector(GetNetworkConnectorRequest getNetworkConnectorRequest) throws InvalidParameterValueException, ServiceException, TooManyRequestsException, ResourceNotFoundException, AwsServiceException, SdkClientException, LambdaCoreException Retrieves the current configuration, state, and metadata of a network connector. The
Identifierparameter 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
LastUpdateStatusandLastUpdateStatusReasonCodefields that indicate whether the most recent update succeeded or failed.- Parameters:
getNetworkConnectorRequest-- Returns:
- Result of the GetNetworkConnector operation returned by the service.
- See Also:
-
getNetworkConnector
default GetNetworkConnectorResponse getNetworkConnector(Consumer<GetNetworkConnectorRequest.Builder> getNetworkConnectorRequest) throws InvalidParameterValueException, ServiceException, TooManyRequestsException, ResourceNotFoundException, AwsServiceException, SdkClientException, LambdaCoreException Retrieves the current configuration, state, and metadata of a network connector. The
Identifierparameter 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
LastUpdateStatusandLastUpdateStatusReasonCodefields that indicate whether the most recent update succeeded or failed.
This is a convenience which creates an instance of the
GetNetworkConnectorRequest.Builderavoiding the need to create one manually viaGetNetworkConnectorRequest.builder()- Parameters:
getNetworkConnectorRequest- AConsumerthat will call methods onGetNetworkConnectorRequest.Builderto create a request.- Returns:
- Result of the GetNetworkConnector operation returned by the service.
- See Also:
-
listNetworkConnectors
default ListNetworkConnectorsResponse listNetworkConnectors(ListNetworkConnectorsRequest listNetworkConnectorsRequest) throws InvalidParameterValueException, ServiceException, TooManyRequestsException, AwsServiceException, SdkClientException, LambdaCoreException Returns a paginated list of network connectors in your account for the current Region. You can optionally filter results by connector state. Use the
Markerparameter 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.- Parameters:
listNetworkConnectorsRequest-- Returns:
- Result of the ListNetworkConnectors operation returned by the service.
- See Also:
-
listNetworkConnectors
default ListNetworkConnectorsResponse listNetworkConnectors(Consumer<ListNetworkConnectorsRequest.Builder> listNetworkConnectorsRequest) throws InvalidParameterValueException, ServiceException, TooManyRequestsException, AwsServiceException, SdkClientException, LambdaCoreException Returns a paginated list of network connectors in your account for the current Region. You can optionally filter results by connector state. Use the
Markerparameter 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.
This is a convenience which creates an instance of the
ListNetworkConnectorsRequest.Builderavoiding the need to create one manually viaListNetworkConnectorsRequest.builder()- Parameters:
listNetworkConnectorsRequest- AConsumerthat will call methods onListNetworkConnectorsRequest.Builderto create a request.- Returns:
- Result of the ListNetworkConnectors operation returned by the service.
- See Also:
-
listNetworkConnectorsPaginator
default ListNetworkConnectorsIterable listNetworkConnectorsPaginator(ListNetworkConnectorsRequest listNetworkConnectorsRequest) throws InvalidParameterValueException, ServiceException, TooManyRequestsException, AwsServiceException, SdkClientException, LambdaCoreException This is a variant of
listNetworkConnectors(software.amazon.awssdk.services.lambdacore.model.ListNetworkConnectorsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.lambdacore.paginators.ListNetworkConnectorsIterable responses = client.listNetworkConnectorsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.lambdacore.paginators.ListNetworkConnectorsIterable responses = client .listNetworkConnectorsPaginator(request); for (software.amazon.awssdk.services.lambdacore.model.ListNetworkConnectorsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.lambdacore.paginators.ListNetworkConnectorsIterable responses = client.listNetworkConnectorsPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of MaxItems won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listNetworkConnectors(software.amazon.awssdk.services.lambdacore.model.ListNetworkConnectorsRequest)operation.- Parameters:
listNetworkConnectorsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listNetworkConnectorsPaginator
default ListNetworkConnectorsIterable listNetworkConnectorsPaginator(Consumer<ListNetworkConnectorsRequest.Builder> listNetworkConnectorsRequest) throws InvalidParameterValueException, ServiceException, TooManyRequestsException, AwsServiceException, SdkClientException, LambdaCoreException This is a variant of
listNetworkConnectors(software.amazon.awssdk.services.lambdacore.model.ListNetworkConnectorsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.lambdacore.paginators.ListNetworkConnectorsIterable responses = client.listNetworkConnectorsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.lambdacore.paginators.ListNetworkConnectorsIterable responses = client .listNetworkConnectorsPaginator(request); for (software.amazon.awssdk.services.lambdacore.model.ListNetworkConnectorsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.lambdacore.paginators.ListNetworkConnectorsIterable responses = client.listNetworkConnectorsPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of MaxItems won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listNetworkConnectors(software.amazon.awssdk.services.lambdacore.model.ListNetworkConnectorsRequest)operation.
This is a convenience which creates an instance of the
ListNetworkConnectorsRequest.Builderavoiding the need to create one manually viaListNetworkConnectorsRequest.builder()- Parameters:
listNetworkConnectorsRequest- AConsumerthat will call methods onListNetworkConnectorsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
updateNetworkConnector
default UpdateNetworkConnectorResponse updateNetworkConnector(UpdateNetworkConnectorRequest updateNetworkConnectorRequest) throws InvalidParameterValueException, ResourceConflictException, ServiceException, TooManyRequestsException, ResourceNotFoundException, AwsServiceException, SdkClientException, LambdaCoreException 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
ACTIVEstate to accept updates.This operation is asynchronous. The connector remains in
ACTIVEstate during the update — existing workloads that reference this connector are not disrupted. UseGetNetworkConnectorto monitor theLastUpdateStatusfield, which transitions throughInProgresstoSuccessfulorFailed. If the update fails, theLastUpdateStatusReasonCodefield provides a specific error code for troubleshooting. This operation is idempotent when you provide aClientToken.- Parameters:
updateNetworkConnectorRequest-- Returns:
- Result of the UpdateNetworkConnector operation returned by the service.
- See Also:
-
updateNetworkConnector
default UpdateNetworkConnectorResponse updateNetworkConnector(Consumer<UpdateNetworkConnectorRequest.Builder> updateNetworkConnectorRequest) throws InvalidParameterValueException, ResourceConflictException, ServiceException, TooManyRequestsException, ResourceNotFoundException, AwsServiceException, SdkClientException, LambdaCoreException 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
ACTIVEstate to accept updates.This operation is asynchronous. The connector remains in
ACTIVEstate during the update — existing workloads that reference this connector are not disrupted. UseGetNetworkConnectorto monitor theLastUpdateStatusfield, which transitions throughInProgresstoSuccessfulorFailed. If the update fails, theLastUpdateStatusReasonCodefield provides a specific error code for troubleshooting. This operation is idempotent when you provide aClientToken.
This is a convenience which creates an instance of the
UpdateNetworkConnectorRequest.Builderavoiding the need to create one manually viaUpdateNetworkConnectorRequest.builder()- Parameters:
updateNetworkConnectorRequest- AConsumerthat will call methods onUpdateNetworkConnectorRequest.Builderto create a request.- Returns:
- Result of the UpdateNetworkConnector operation returned by the service.
- See Also:
-
create
Create aLambdaCoreClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aLambdaCoreClient. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-