Interface IotJobsDataPlaneClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface IotJobsDataPlaneClient extends AwsClient
Service client for accessing AWS IoT Jobs Data Plane. This can be created using the staticbuilder()method.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:JobsThe 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
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static IotJobsDataPlaneClientBuilderbuilder()Create a builder that can be used to configure and create aIotJobsDataPlaneClient.static IotJobsDataPlaneClientcreate()Create aIotJobsDataPlaneClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default DescribeJobExecutionResponsedescribeJobExecution(Consumer<DescribeJobExecutionRequest.Builder> describeJobExecutionRequest)Gets details of a job execution.default DescribeJobExecutionResponsedescribeJobExecution(DescribeJobExecutionRequest describeJobExecutionRequest)Gets details of a job execution.default GetPendingJobExecutionsResponsegetPendingJobExecutions(Consumer<GetPendingJobExecutionsRequest.Builder> getPendingJobExecutionsRequest)Gets the list of all jobs for a thing that are not in a terminal status.default GetPendingJobExecutionsResponsegetPendingJobExecutions(GetPendingJobExecutionsRequest getPendingJobExecutionsRequest)Gets the list of all jobs for a thing that are not in a terminal status.default IotJobsDataPlaneServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default StartCommandExecutionResponsestartCommandExecution(Consumer<StartCommandExecutionRequest.Builder> startCommandExecutionRequest)Using the command created with theCreateCommandAPI, start a command execution on a specific device.default StartCommandExecutionResponsestartCommandExecution(StartCommandExecutionRequest startCommandExecutionRequest)Using the command created with theCreateCommandAPI, start a command execution on a specific device.default StartNextPendingJobExecutionResponsestartNextPendingJobExecution(Consumer<StartNextPendingJobExecutionRequest.Builder> startNextPendingJobExecutionRequest)Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.default StartNextPendingJobExecutionResponsestartNextPendingJobExecution(StartNextPendingJobExecutionRequest startNextPendingJobExecutionRequest)Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.default UpdateJobExecutionResponseupdateJobExecution(Consumer<UpdateJobExecutionRequest.Builder> updateJobExecutionRequest)Updates the status of a job execution.default UpdateJobExecutionResponseupdateJobExecution(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 Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
describeJobExecution
default DescribeJobExecutionResponse describeJobExecution(DescribeJobExecutionRequest describeJobExecutionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, CertificateValidationException, TerminalStateException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
Gets details of a job execution.
Requires permission to access the DescribeJobExecution action.
- Parameters:
describeJobExecutionRequest-- Returns:
- Result of the DescribeJobExecution operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
describeJobExecution
default DescribeJobExecutionResponse describeJobExecution(Consumer<DescribeJobExecutionRequest.Builder> describeJobExecutionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, CertificateValidationException, TerminalStateException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
Gets details of a job execution.
Requires permission to access the DescribeJobExecution action.
This is a convenience which creates an instance of the
DescribeJobExecutionRequest.Builderavoiding the need to create one manually viaDescribeJobExecutionRequest.builder()- Parameters:
describeJobExecutionRequest- AConsumerthat will call methods onDescribeJobExecutionRequest.Builderto create a request.- Returns:
- Result of the DescribeJobExecution operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getPendingJobExecutions
default GetPendingJobExecutionsResponse getPendingJobExecutions(GetPendingJobExecutionsRequest getPendingJobExecutionsRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, CertificateValidationException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
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:
- Result of the GetPendingJobExecutions operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getPendingJobExecutions
default GetPendingJobExecutionsResponse getPendingJobExecutions(Consumer<GetPendingJobExecutionsRequest.Builder> getPendingJobExecutionsRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, CertificateValidationException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
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.Builderavoiding the need to create one manually viaGetPendingJobExecutionsRequest.builder()- Parameters:
getPendingJobExecutionsRequest- AConsumerthat will call methods onGetPendingJobExecutionsRequest.Builderto create a request.- Returns:
- Result of the GetPendingJobExecutions operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
startCommandExecution
default StartCommandExecutionResponse startCommandExecution(StartCommandExecutionRequest startCommandExecutionRequest) throws ValidationException, ResourceNotFoundException, ConflictException, ThrottlingException, ServiceQuotaExceededException, InternalServerException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
Using the command created with the
CreateCommandAPI, start a command execution on a specific device.- Parameters:
startCommandExecutionRequest-- Returns:
- Result of the StartCommandExecution operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
startCommandExecution
default StartCommandExecutionResponse startCommandExecution(Consumer<StartCommandExecutionRequest.Builder> startCommandExecutionRequest) throws ValidationException, ResourceNotFoundException, ConflictException, ThrottlingException, ServiceQuotaExceededException, InternalServerException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
Using the command created with the
CreateCommandAPI, start a command execution on a specific device.
This is a convenience which creates an instance of the
StartCommandExecutionRequest.Builderavoiding the need to create one manually viaStartCommandExecutionRequest.builder()- Parameters:
startCommandExecutionRequest- AConsumerthat will call methods onStartCommandExecutionRequest.Builderto create a request.- Returns:
- Result of the StartCommandExecution operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
startNextPendingJobExecution
default StartNextPendingJobExecutionResponse startNextPendingJobExecution(StartNextPendingJobExecutionRequest startNextPendingJobExecutionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, CertificateValidationException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
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:
- Result of the StartNextPendingJobExecution operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
startNextPendingJobExecution
default StartNextPendingJobExecutionResponse startNextPendingJobExecution(Consumer<StartNextPendingJobExecutionRequest.Builder> startNextPendingJobExecutionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, CertificateValidationException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
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.Builderavoiding the need to create one manually viaStartNextPendingJobExecutionRequest.builder()- Parameters:
startNextPendingJobExecutionRequest- AConsumerthat will call methods onStartNextPendingJobExecutionRequest.Builderto create a request.- Returns:
- Result of the StartNextPendingJobExecution operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
updateJobExecution
default UpdateJobExecutionResponse updateJobExecution(UpdateJobExecutionRequest updateJobExecutionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, CertificateValidationException, InvalidStateTransitionException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
Updates the status of a job execution.
Requires permission to access the UpdateJobExecution action.
- Parameters:
updateJobExecutionRequest-- Returns:
- Result of the UpdateJobExecution operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
updateJobExecution
default UpdateJobExecutionResponse updateJobExecution(Consumer<UpdateJobExecutionRequest.Builder> updateJobExecutionRequest) throws InvalidRequestException, ResourceNotFoundException, ThrottlingException, ServiceUnavailableException, CertificateValidationException, InvalidStateTransitionException, AwsServiceException, SdkClientException, IotJobsDataPlaneException
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.Builderavoiding the need to create one manually viaUpdateJobExecutionRequest.builder()- Parameters:
updateJobExecutionRequest- AConsumerthat will call methods onUpdateJobExecutionRequest.Builderto create a request.- Returns:
- Result of the UpdateJobExecution operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
create
static IotJobsDataPlaneClient create()
Create aIotJobsDataPlaneClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static IotJobsDataPlaneClientBuilder builder()
Create a builder that can be used to configure and create aIotJobsDataPlaneClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default IotJobsDataPlaneServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-