@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface IoTSecureTunnelingClient extends SdkClient
builder()
method.
AWS IoT Secure Tunnling enables you to create remote connections to devices deployed in the field.
For more information about how AWS IoT Secure Tunneling works, see AWS IoT Secure Tunneling.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static IoTSecureTunnelingClientBuilder |
builder()
Create a builder that can be used to configure and create a
IoTSecureTunnelingClient. |
default CloseTunnelResponse |
closeTunnel(CloseTunnelRequest closeTunnelRequest)
Closes a tunnel identified by the unique tunnel id.
|
default CloseTunnelResponse |
closeTunnel(Consumer<CloseTunnelRequest.Builder> closeTunnelRequest)
Closes a tunnel identified by the unique tunnel id.
|
static IoTSecureTunnelingClient |
create()
Create a
IoTSecureTunnelingClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default DescribeTunnelResponse |
describeTunnel(Consumer<DescribeTunnelRequest.Builder> describeTunnelRequest)
Gets information about a tunnel identified by the unique tunnel id.
|
default DescribeTunnelResponse |
describeTunnel(DescribeTunnelRequest describeTunnelRequest)
Gets information about a tunnel identified by the unique tunnel id.
|
default ListTagsForResourceResponse |
listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Lists the tags for the specified resource.
|
default ListTagsForResourceResponse |
listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Lists the tags for the specified resource.
|
default ListTunnelsResponse |
listTunnels(Consumer<ListTunnelsRequest.Builder> listTunnelsRequest)
List all tunnels for an AWS account.
|
default ListTunnelsResponse |
listTunnels(ListTunnelsRequest listTunnelsRequest)
List all tunnels for an AWS account.
|
default ListTunnelsIterable |
listTunnelsPaginator(Consumer<ListTunnelsRequest.Builder> listTunnelsRequest)
List all tunnels for an AWS account.
|
default ListTunnelsIterable |
listTunnelsPaginator(ListTunnelsRequest listTunnelsRequest)
List all tunnels for an AWS account.
|
default OpenTunnelResponse |
openTunnel(Consumer<OpenTunnelRequest.Builder> openTunnelRequest)
Creates a new tunnel, and returns two client access tokens for clients to use to connect to the AWS IoT Secure
Tunneling proxy server.
|
default OpenTunnelResponse |
openTunnel(OpenTunnelRequest openTunnelRequest)
Creates a new tunnel, and returns two client access tokens for clients to use to connect to the AWS IoT Secure
Tunneling proxy server.
|
static ServiceMetadata |
serviceMetadata() |
default TagResourceResponse |
tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
A resource tag.
|
default TagResourceResponse |
tagResource(TagResourceRequest tagResourceRequest)
A resource tag.
|
default UntagResourceResponse |
untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Removes a tag from a resource.
|
default UntagResourceResponse |
untagResource(UntagResourceRequest untagResourceRequest)
Removes a tag from a resource.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.static IoTSecureTunnelingClient create()
IoTSecureTunnelingClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static IoTSecureTunnelingClientBuilder builder()
IoTSecureTunnelingClient.default CloseTunnelResponse closeTunnel(CloseTunnelRequest closeTunnelRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Closes a tunnel identified by the unique tunnel id. When a CloseTunnel request is received, we close
the WebSocket connections between the client and proxy server so no data can be transmitted.
closeTunnelRequest - ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault CloseTunnelResponse closeTunnel(Consumer<CloseTunnelRequest.Builder> closeTunnelRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Closes a tunnel identified by the unique tunnel id. When a CloseTunnel request is received, we close
the WebSocket connections between the client and proxy server so no data can be transmitted.
This is a convenience which creates an instance of the CloseTunnelRequest.Builder avoiding the need to
create one manually via CloseTunnelRequest.builder()
closeTunnelRequest - A Consumer that will call methods on CloseTunnelRequest.Builder to create a request.ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DescribeTunnelResponse describeTunnel(DescribeTunnelRequest describeTunnelRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Gets information about a tunnel identified by the unique tunnel id.
describeTunnelRequest - ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DescribeTunnelResponse describeTunnel(Consumer<DescribeTunnelRequest.Builder> describeTunnelRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Gets information about a tunnel identified by the unique tunnel id.
This is a convenience which creates an instance of the DescribeTunnelRequest.Builder avoiding the need to
create one manually via DescribeTunnelRequest.builder()
describeTunnelRequest - A Consumer that will call methods on DescribeTunnelRequest.Builder to create a request.ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Lists the tags for the specified resource.
listTagsForResourceRequest - ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Lists the tags for the specified resource.
This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder avoiding the
need to create one manually via ListTagsForResourceRequest.builder()
listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.Builder to create a
request.ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTunnelsResponse listTunnels(ListTunnelsRequest listTunnelsRequest) throws AwsServiceException, SdkClientException, IoTSecureTunnelingException
List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
listTunnelsRequest - SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTunnelsResponse listTunnels(Consumer<ListTunnelsRequest.Builder> listTunnelsRequest) throws AwsServiceException, SdkClientException, IoTSecureTunnelingException
List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
This is a convenience which creates an instance of the ListTunnelsRequest.Builder avoiding the need to
create one manually via ListTunnelsRequest.builder()
listTunnelsRequest - A Consumer that will call methods on ListTunnelsRequest.Builder to create a request.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTunnelsIterable listTunnelsPaginator(ListTunnelsRequest listTunnelsRequest) throws AwsServiceException, SdkClientException, IoTSecureTunnelingException
List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
This is a variant of
listTunnels(software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsRequest) 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
software.amazon.awssdk.services.iotsecuretunneling.paginators.ListTunnelsIterable responses = client.listTunnelsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.iotsecuretunneling.paginators.ListTunnelsIterable responses = client
.listTunnelsPaginator(request);
for (software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.iotsecuretunneling.paginators.ListTunnelsIterable responses = client.listTunnelsPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults 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
listTunnels(software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsRequest) operation.
listTunnelsRequest - SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListTunnelsIterable listTunnelsPaginator(Consumer<ListTunnelsRequest.Builder> listTunnelsRequest) throws AwsServiceException, SdkClientException, IoTSecureTunnelingException
List all tunnels for an AWS account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
This is a variant of
listTunnels(software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsRequest) 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
software.amazon.awssdk.services.iotsecuretunneling.paginators.ListTunnelsIterable responses = client.listTunnelsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.iotsecuretunneling.paginators.ListTunnelsIterable responses = client
.listTunnelsPaginator(request);
for (software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.iotsecuretunneling.paginators.ListTunnelsIterable responses = client.listTunnelsPaginator(request);
responses.iterator().forEachRemaining(....);
Please notice that the configuration of maxResults 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
listTunnels(software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsRequest) operation.
This is a convenience which creates an instance of the ListTunnelsRequest.Builder avoiding the need to
create one manually via ListTunnelsRequest.builder()
listTunnelsRequest - A Consumer that will call methods on ListTunnelsRequest.Builder to create a request.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault OpenTunnelResponse openTunnel(OpenTunnelRequest openTunnelRequest) throws LimitExceededException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Creates a new tunnel, and returns two client access tokens for clients to use to connect to the AWS IoT Secure Tunneling proxy server.
openTunnelRequest - LimitExceededException - Thrown when a tunnel limit is exceeded.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault OpenTunnelResponse openTunnel(Consumer<OpenTunnelRequest.Builder> openTunnelRequest) throws LimitExceededException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Creates a new tunnel, and returns two client access tokens for clients to use to connect to the AWS IoT Secure Tunneling proxy server.
This is a convenience which creates an instance of the OpenTunnelRequest.Builder avoiding the need to
create one manually via OpenTunnelRequest.builder()
openTunnelRequest - A Consumer that will call methods on OpenTunnelRequest.Builder to create a request.LimitExceededException - Thrown when a tunnel limit is exceeded.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
A resource tag.
tagResourceRequest - ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
A resource tag.
This is a convenience which creates an instance of the TagResourceRequest.Builder avoiding the need to
create one manually via TagResourceRequest.builder()
tagResourceRequest - A Consumer that will call methods on TagResourceRequest.Builder to create a request.ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Removes a tag from a resource.
untagResourceRequest - ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException
Removes a tag from a resource.
This is a convenience which creates an instance of the UntagResourceRequest.Builder avoiding the need to
create one manually via UntagResourceRequest.builder()
untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.Builder to create a request.ResourceNotFoundException - Thrown when an operation is attempted on a resource that does not exist.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.IoTSecureTunnelingException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionstatic ServiceMetadata serviceMetadata()
Copyright © 2021. All rights reserved.