Interface IoTSecureTunnelingClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
IoT Secure Tunneling creates remote connections to devices deployed in the field.
For more information about how IoT Secure Tunneling works, see IoT Secure Tunneling.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that can be used to configure and create aIoTSecureTunnelingClient
.default CloseTunnelResponse
closeTunnel
(Consumer<CloseTunnelRequest.Builder> closeTunnelRequest) Closes a tunnel identified by the unique tunnel id.default CloseTunnelResponse
closeTunnel
(CloseTunnelRequest closeTunnelRequest) Closes a tunnel identified by the unique tunnel id.static IoTSecureTunnelingClient
create()
Create aIoTSecureTunnelingClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.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 Amazon Web Services account.default ListTunnelsResponse
listTunnels
(ListTunnelsRequest listTunnelsRequest) List all tunnels for an Amazon Web Services account.default ListTunnelsIterable
listTunnelsPaginator
(Consumer<ListTunnelsRequest.Builder> listTunnelsRequest) This is a variant oflistTunnels(software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsRequest)
operation.default ListTunnelsIterable
listTunnelsPaginator
(ListTunnelsRequest listTunnelsRequest) This is a variant oflistTunnels(software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsRequest)
operation.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 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 IoT Secure Tunneling proxy server.default RotateTunnelAccessTokenResponse
rotateTunnelAccessToken
(Consumer<RotateTunnelAccessTokenRequest.Builder> rotateTunnelAccessTokenRequest) Revokes the current client access token (CAT) and returns new CAT for clients to use when reconnecting to secure tunneling to access the same tunnel.default RotateTunnelAccessTokenResponse
rotateTunnelAccessToken
(RotateTunnelAccessTokenRequest rotateTunnelAccessTokenRequest) Revokes the current client access token (CAT) and returns new CAT for clients to use when reconnecting to secure tunneling to access the same tunnel.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic 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.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods 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
-
closeTunnel
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.Requires permission to access the CloseTunnel action.
- Parameters:
closeTunnelRequest
-- Returns:
- Result of the CloseTunnel operation returned by the service.
- See Also:
-
closeTunnel
default 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.Requires permission to access the CloseTunnel action.
This is a convenience which creates an instance of the
CloseTunnelRequest.Builder
avoiding the need to create one manually viaCloseTunnelRequest.builder()
- Parameters:
closeTunnelRequest
- AConsumer
that will call methods onCloseTunnelRequest.Builder
to create a request.- Returns:
- Result of the CloseTunnel operation returned by the service.
- See Also:
-
describeTunnel
default DescribeTunnelResponse describeTunnel(DescribeTunnelRequest describeTunnelRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException Gets information about a tunnel identified by the unique tunnel id.
Requires permission to access the DescribeTunnel action.
- Parameters:
describeTunnelRequest
-- Returns:
- Result of the DescribeTunnel operation returned by the service.
- See Also:
-
describeTunnel
default DescribeTunnelResponse describeTunnel(Consumer<DescribeTunnelRequest.Builder> describeTunnelRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException Gets information about a tunnel identified by the unique tunnel id.
Requires permission to access the DescribeTunnel action.
This is a convenience which creates an instance of the
DescribeTunnelRequest.Builder
avoiding the need to create one manually viaDescribeTunnelRequest.builder()
- Parameters:
describeTunnelRequest
- AConsumer
that will call methods onDescribeTunnelRequest.Builder
to create a request.- Returns:
- Result of the DescribeTunnel operation returned by the service.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException Lists the tags for the specified resource.
- Parameters:
listTagsForResourceRequest
-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
listTagsForResource
default 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 viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
listTunnels
default ListTunnelsResponse listTunnels(ListTunnelsRequest listTunnelsRequest) throws AwsServiceException, SdkClientException, IoTSecureTunnelingException List all tunnels for an Amazon Web Services account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
Requires permission to access the ListTunnels action.
- Parameters:
listTunnelsRequest
-- Returns:
- Result of the ListTunnels operation returned by the service.
- See Also:
-
listTunnels
default ListTunnelsResponse listTunnels(Consumer<ListTunnelsRequest.Builder> listTunnelsRequest) throws AwsServiceException, SdkClientException, IoTSecureTunnelingException List all tunnels for an Amazon Web Services account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels.
Requires permission to access the ListTunnels action.
This is a convenience which creates an instance of the
ListTunnelsRequest.Builder
avoiding the need to create one manually viaListTunnelsRequest.builder()
- Parameters:
listTunnelsRequest
- AConsumer
that will call methods onListTunnelsRequest.Builder
to create a request.- Returns:
- Result of the ListTunnels operation returned by the service.
- See Also:
-
listTunnelsPaginator
default ListTunnelsIterable listTunnelsPaginator(ListTunnelsRequest listTunnelsRequest) throws AwsServiceException, SdkClientException, IoTSecureTunnelingException 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 Streamsoftware.amazon.awssdk.services.iotsecuretunneling.paginators.ListTunnelsIterable responses = client.listTunnelsPaginator(request); responses.stream().forEach(....);
{ @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 directlysoftware.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.- Parameters:
listTunnelsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTunnelsPaginator
default ListTunnelsIterable listTunnelsPaginator(Consumer<ListTunnelsRequest.Builder> listTunnelsRequest) throws AwsServiceException, SdkClientException, IoTSecureTunnelingException 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 Streamsoftware.amazon.awssdk.services.iotsecuretunneling.paginators.ListTunnelsIterable responses = client.listTunnelsPaginator(request); responses.stream().forEach(....);
{ @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 directlysoftware.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 viaListTunnelsRequest.builder()
- Parameters:
listTunnelsRequest
- AConsumer
that will call methods onListTunnelsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
openTunnel
default 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 IoT Secure Tunneling proxy server.
Requires permission to access the OpenTunnel action.
- Parameters:
openTunnelRequest
-- Returns:
- Result of the OpenTunnel operation returned by the service.
- See Also:
-
openTunnel
default 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 IoT Secure Tunneling proxy server.
Requires permission to access the OpenTunnel action.
This is a convenience which creates an instance of the
OpenTunnelRequest.Builder
avoiding the need to create one manually viaOpenTunnelRequest.builder()
- Parameters:
openTunnelRequest
- AConsumer
that will call methods onOpenTunnelRequest.Builder
to create a request.- Returns:
- Result of the OpenTunnel operation returned by the service.
- See Also:
-
rotateTunnelAccessToken
default RotateTunnelAccessTokenResponse rotateTunnelAccessToken(RotateTunnelAccessTokenRequest rotateTunnelAccessTokenRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException Revokes the current client access token (CAT) and returns new CAT for clients to use when reconnecting to secure tunneling to access the same tunnel.
Requires permission to access the RotateTunnelAccessToken action.
Rotating the CAT doesn't extend the tunnel duration. For example, say the tunnel duration is 12 hours and the tunnel has already been open for 4 hours. When you rotate the access tokens, the new tokens that are generated can only be used for the remaining 8 hours.
- Parameters:
rotateTunnelAccessTokenRequest
-- Returns:
- Result of the RotateTunnelAccessToken operation returned by the service.
- See Also:
-
rotateTunnelAccessToken
default RotateTunnelAccessTokenResponse rotateTunnelAccessToken(Consumer<RotateTunnelAccessTokenRequest.Builder> rotateTunnelAccessTokenRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException Revokes the current client access token (CAT) and returns new CAT for clients to use when reconnecting to secure tunneling to access the same tunnel.
Requires permission to access the RotateTunnelAccessToken action.
Rotating the CAT doesn't extend the tunnel duration. For example, say the tunnel duration is 12 hours and the tunnel has already been open for 4 hours. When you rotate the access tokens, the new tokens that are generated can only be used for the remaining 8 hours.
This is a convenience which creates an instance of the
RotateTunnelAccessTokenRequest.Builder
avoiding the need to create one manually viaRotateTunnelAccessTokenRequest.builder()
- Parameters:
rotateTunnelAccessTokenRequest
- AConsumer
that will call methods onRotateTunnelAccessTokenRequest.Builder
to create a request.- Returns:
- Result of the RotateTunnelAccessToken operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException A resource tag.
- Parameters:
tagResourceRequest
-- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
tagResource
default 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 viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.Builder
to create a request.- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException Removes a tag from a resource.
- Parameters:
untagResourceRequest
-- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
untagResource
default 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 viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
create
Create aIoTSecureTunnelingClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aIoTSecureTunnelingClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-