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
FieldsModifier and TypeFieldDescriptionstatic final StringValue 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 CloseTunnelResponsecloseTunnel(Consumer<CloseTunnelRequest.Builder> closeTunnelRequest) Closes a tunnel identified by the unique tunnel id.default CloseTunnelResponsecloseTunnel(CloseTunnelRequest closeTunnelRequest) Closes a tunnel identified by the unique tunnel id.static IoTSecureTunnelingClientcreate()Create aIoTSecureTunnelingClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default DescribeTunnelResponsedescribeTunnel(Consumer<DescribeTunnelRequest.Builder> describeTunnelRequest) Gets information about a tunnel identified by the unique tunnel id.default DescribeTunnelResponsedescribeTunnel(DescribeTunnelRequest describeTunnelRequest) Gets information about a tunnel identified by the unique tunnel id.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists the tags for the specified resource.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists the tags for the specified resource.default ListTunnelsResponselistTunnels(Consumer<ListTunnelsRequest.Builder> listTunnelsRequest) List all tunnels for an Amazon Web Services account.default ListTunnelsResponselistTunnels(ListTunnelsRequest listTunnelsRequest) List all tunnels for an Amazon Web Services account.default ListTunnelsIterablelistTunnelsPaginator(Consumer<ListTunnelsRequest.Builder> listTunnelsRequest) This is a variant oflistTunnels(software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsRequest)operation.default ListTunnelsIterablelistTunnelsPaginator(ListTunnelsRequest listTunnelsRequest) This is a variant oflistTunnels(software.amazon.awssdk.services.iotsecuretunneling.model.ListTunnelsRequest)operation.default OpenTunnelResponseopenTunnel(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 OpenTunnelResponseopenTunnel(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 RotateTunnelAccessTokenResponserotateTunnelAccessToken(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 RotateTunnelAccessTokenResponserotateTunnelAccessToken(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 ServiceMetadatadefault TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) A resource tag.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest) A resource tag.default UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes a tag from a resource.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest) Removes a tag from a resource.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
-
closeTunnel
default CloseTunnelResponse closeTunnel(CloseTunnelRequest closeTunnelRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, IoTSecureTunnelingException Closes a tunnel identified by the unique tunnel id. When a
CloseTunnelrequest 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
CloseTunnelrequest 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.Builderavoiding the need to create one manually viaCloseTunnelRequest.builder()- Parameters:
closeTunnelRequest- AConsumerthat will call methods onCloseTunnelRequest.Builderto 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.Builderavoiding the need to create one manually viaDescribeTunnelRequest.builder()- Parameters:
describeTunnelRequest- AConsumerthat will call methods onDescribeTunnelRequest.Builderto 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.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto 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.Builderavoiding the need to create one manually viaListTunnelsRequest.builder()- Parameters:
listTunnelsRequest- AConsumerthat will call methods onListTunnelsRequest.Builderto 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 Stream
2) Using For loopsoftware.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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaListTunnelsRequest.builder()- Parameters:
listTunnelsRequest- AConsumerthat will call methods onListTunnelsRequest.Builderto 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.Builderavoiding the need to create one manually viaOpenTunnelRequest.builder()- Parameters:
openTunnelRequest- AConsumerthat will call methods onOpenTunnelRequest.Builderto 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.Builderavoiding the need to create one manually viaRotateTunnelAccessTokenRequest.builder()- Parameters:
rotateTunnelAccessTokenRequest- AConsumerthat will call methods onRotateTunnelAccessTokenRequest.Builderto 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.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto 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.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
create
Create aIoTSecureTunnelingClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aIoTSecureTunnelingClient. -
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
-