Interface IotJobsDataPlaneAsyncClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any
SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may
perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
call.
IoT Jobs is a service that allows you to define a set of jobs — remote operations that are sent to and executed on one or more devices connected to Amazon Web Services IoT Core. For example, you can define a job that instructs a set of devices to download and install application or firmware updates, reboot, rotate certificates, or perform remote troubleshooting operations.
Find the endpoint address for actions in the IoT jobs data plane by running this CLI command:
aws iot describe-endpoint --endpoint-type iot:Jobs
The service name used by Amazon Web Services Signature Version 4 to sign requests is: iot-jobs-data.
To create a job, you make a job document which is a description of the remote operations to be performed, and you specify a list of targets that should perform the operations. The targets can be individual things, thing groups or both.
IoT Jobs sends a message to inform the targets that a job is available. The target starts the execution of the job by downloading the job document, performing the operations it specifies, and reporting its progress to Amazon Web Services IoT Core. The Jobs service provides commands to track the progress of a job on a specific target and for all the targets of the job
-
Field Summary
FieldsModifier 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 aIotJobsDataPlaneAsyncClient
.static IotJobsDataPlaneAsyncClient
create()
Create aIotJobsDataPlaneAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.describeJobExecution
(Consumer<DescribeJobExecutionRequest.Builder> describeJobExecutionRequest) Gets details of a job execution.describeJobExecution
(DescribeJobExecutionRequest describeJobExecutionRequest) Gets details of a job execution.getPendingJobExecutions
(Consumer<GetPendingJobExecutionsRequest.Builder> getPendingJobExecutionsRequest) Gets the list of all jobs for a thing that are not in a terminal status.getPendingJobExecutions
(GetPendingJobExecutionsRequest getPendingJobExecutionsRequest) Gets the list of all jobs for a thing that are not in a terminal status.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstartCommandExecution
(Consumer<StartCommandExecutionRequest.Builder> startCommandExecutionRequest) Using the command created with theCreateCommand
API, start a command execution on a specific device.startCommandExecution
(StartCommandExecutionRequest startCommandExecutionRequest) Using the command created with theCreateCommand
API, start a command execution on a specific device.startNextPendingJobExecution
(Consumer<StartNextPendingJobExecutionRequest.Builder> startNextPendingJobExecutionRequest) Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.startNextPendingJobExecution
(StartNextPendingJobExecutionRequest startNextPendingJobExecutionRequest) Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.updateJobExecution
(Consumer<UpdateJobExecutionRequest.Builder> updateJobExecutionRequest) Updates the status of a job execution.updateJobExecution
(UpdateJobExecutionRequest updateJobExecutionRequest) Updates the status of a job execution.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
-
describeJobExecution
default CompletableFuture<DescribeJobExecutionResponse> describeJobExecution(DescribeJobExecutionRequest describeJobExecutionRequest) Gets details of a job execution.
Requires permission to access the DescribeJobExecution action.
- Parameters:
describeJobExecutionRequest
-- Returns:
- A Java Future containing the result of the DescribeJobExecution operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InvalidRequestException The contents of the request were invalid.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The rate exceeds the limit.
- ServiceUnavailableException The service is temporarily unavailable.
- CertificateValidationException The certificate is invalid.
- TerminalStateException The job is in a terminal state.
- 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeJobExecution
default CompletableFuture<DescribeJobExecutionResponse> describeJobExecution(Consumer<DescribeJobExecutionRequest.Builder> describeJobExecutionRequest) Gets details of a job execution.
Requires permission to access the DescribeJobExecution action.
This is a convenience which creates an instance of the
DescribeJobExecutionRequest.Builder
avoiding the need to create one manually viaDescribeJobExecutionRequest.builder()
- Parameters:
describeJobExecutionRequest
- AConsumer
that will call methods onDescribeJobExecutionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DescribeJobExecution operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InvalidRequestException The contents of the request were invalid.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The rate exceeds the limit.
- ServiceUnavailableException The service is temporarily unavailable.
- CertificateValidationException The certificate is invalid.
- TerminalStateException The job is in a terminal state.
- 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getPendingJobExecutions
default CompletableFuture<GetPendingJobExecutionsResponse> getPendingJobExecutions(GetPendingJobExecutionsRequest getPendingJobExecutionsRequest) Gets the list of all jobs for a thing that are not in a terminal status.
Requires permission to access the GetPendingJobExecutions action.
- Parameters:
getPendingJobExecutionsRequest
-- Returns:
- A Java Future containing the result of the GetPendingJobExecutions operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InvalidRequestException The contents of the request were invalid.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The rate exceeds the limit.
- ServiceUnavailableException The service is temporarily unavailable.
- CertificateValidationException The certificate is invalid.
- 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getPendingJobExecutions
default CompletableFuture<GetPendingJobExecutionsResponse> getPendingJobExecutions(Consumer<GetPendingJobExecutionsRequest.Builder> getPendingJobExecutionsRequest) Gets the list of all jobs for a thing that are not in a terminal status.
Requires permission to access the GetPendingJobExecutions action.
This is a convenience which creates an instance of the
GetPendingJobExecutionsRequest.Builder
avoiding the need to create one manually viaGetPendingJobExecutionsRequest.builder()
- Parameters:
getPendingJobExecutionsRequest
- AConsumer
that will call methods onGetPendingJobExecutionsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetPendingJobExecutions operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InvalidRequestException The contents of the request were invalid.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The rate exceeds the limit.
- ServiceUnavailableException The service is temporarily unavailable.
- CertificateValidationException The certificate is invalid.
- 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startCommandExecution
default CompletableFuture<StartCommandExecutionResponse> startCommandExecution(StartCommandExecutionRequest startCommandExecutionRequest) Using the command created with the
CreateCommand
API, start a command execution on a specific device.- Parameters:
startCommandExecutionRequest
-- Returns:
- A Java Future containing the result of the StartCommandExecution operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ValidationException A validation error occurred when performing the API request.
- ResourceNotFoundException The specified resource does not exist.
- ConflictException A conflict has occurred when performing the API request.
- ThrottlingException The rate exceeds the limit.
- ServiceQuotaExceededException The service quota has been exceeded for this request.
- InternalServerException An internal server error occurred when performing the API 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startCommandExecution
default CompletableFuture<StartCommandExecutionResponse> startCommandExecution(Consumer<StartCommandExecutionRequest.Builder> startCommandExecutionRequest) Using the command created with the
CreateCommand
API, start a command execution on a specific device.
This is a convenience which creates an instance of the
StartCommandExecutionRequest.Builder
avoiding the need to create one manually viaStartCommandExecutionRequest.builder()
- Parameters:
startCommandExecutionRequest
- AConsumer
that will call methods onStartCommandExecutionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StartCommandExecution operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ValidationException A validation error occurred when performing the API request.
- ResourceNotFoundException The specified resource does not exist.
- ConflictException A conflict has occurred when performing the API request.
- ThrottlingException The rate exceeds the limit.
- ServiceQuotaExceededException The service quota has been exceeded for this request.
- InternalServerException An internal server error occurred when performing the API 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startNextPendingJobExecution
default CompletableFuture<StartNextPendingJobExecutionResponse> startNextPendingJobExecution(StartNextPendingJobExecutionRequest startNextPendingJobExecutionRequest) Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.
Requires permission to access the StartNextPendingJobExecution action.
- Parameters:
startNextPendingJobExecutionRequest
-- Returns:
- A Java Future containing the result of the StartNextPendingJobExecution operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InvalidRequestException The contents of the request were invalid.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The rate exceeds the limit.
- ServiceUnavailableException The service is temporarily unavailable.
- CertificateValidationException The certificate is invalid.
- 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startNextPendingJobExecution
default CompletableFuture<StartNextPendingJobExecutionResponse> startNextPendingJobExecution(Consumer<StartNextPendingJobExecutionRequest.Builder> startNextPendingJobExecutionRequest) Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.
Requires permission to access the StartNextPendingJobExecution action.
This is a convenience which creates an instance of the
StartNextPendingJobExecutionRequest.Builder
avoiding the need to create one manually viaStartNextPendingJobExecutionRequest.builder()
- Parameters:
startNextPendingJobExecutionRequest
- AConsumer
that will call methods onStartNextPendingJobExecutionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StartNextPendingJobExecution operation returned by the
service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InvalidRequestException The contents of the request were invalid.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The rate exceeds the limit.
- ServiceUnavailableException The service is temporarily unavailable.
- CertificateValidationException The certificate is invalid.
- 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateJobExecution
default CompletableFuture<UpdateJobExecutionResponse> updateJobExecution(UpdateJobExecutionRequest updateJobExecutionRequest) Updates the status of a job execution.
Requires permission to access the UpdateJobExecution action.
- Parameters:
updateJobExecutionRequest
-- Returns:
- A Java Future containing the result of the UpdateJobExecution operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InvalidRequestException The contents of the request were invalid.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The rate exceeds the limit.
- ServiceUnavailableException The service is temporarily unavailable.
- CertificateValidationException The certificate is invalid.
- InvalidStateTransitionException An update attempted to change the job execution to a state that is invalid because of the job execution's current state (for example, an attempt to change a request in state SUCCESS to state IN_PROGRESS). In this case, the body of the error message also contains the executionState field.
- 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateJobExecution
default CompletableFuture<UpdateJobExecutionResponse> updateJobExecution(Consumer<UpdateJobExecutionRequest.Builder> updateJobExecutionRequest) Updates the status of a job execution.
Requires permission to access the UpdateJobExecution action.
This is a convenience which creates an instance of the
UpdateJobExecutionRequest.Builder
avoiding the need to create one manually viaUpdateJobExecutionRequest.builder()
- Parameters:
updateJobExecutionRequest
- AConsumer
that will call methods onUpdateJobExecutionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the UpdateJobExecution operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InvalidRequestException The contents of the request were invalid.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The rate exceeds the limit.
- ServiceUnavailableException The service is temporarily unavailable.
- CertificateValidationException The certificate is invalid.
- InvalidStateTransitionException An update attempted to change the job execution to a state that is invalid because of the job execution's current state (for example, an attempt to change a request in state SUCCESS to state IN_PROGRESS). In this case, the body of the error message also contains the executionState field.
- 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.
- IotJobsDataPlaneException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
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
-
create
Create aIotJobsDataPlaneAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aIotJobsDataPlaneAsyncClient
.
-