Interface Job.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<Job.Builder,
,Job> SdkBuilder<Job.Builder,
,Job> SdkPojo
- Enclosing class:
Job
-
Method Summary
Modifier and TypeMethodDescriptiondefault Job.Builder
abortConfig
(Consumer<AbortConfig.Builder> abortConfig) Configuration for criteria to abort the job.abortConfig
(AbortConfig abortConfig) Configuration for criteria to abort the job.If the job was updated, describes the reason for the update.completedAt
(Instant completedAt) The time, in seconds since the epoch, when the job was completed.The time, in seconds since the epoch, when the job was created.description
(String description) A short text description of the job.destinationPackageVersions
(String... destinationPackageVersions) The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes.destinationPackageVersions
(Collection<String> destinationPackageVersions) The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes.documentParameters
(Map<String, String> documentParameters) A key-value map that pairs the patterns that need to be replaced in a managed template job document schema.forceCanceled
(Boolean forceCanceled) Will betrue
if the job was canceled with the optionalforce
parameter set totrue
.isConcurrent
(Boolean isConcurrent) Indicates whether a job is concurrent.An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".default Job.Builder
jobExecutionsRetryConfig
(Consumer<JobExecutionsRetryConfig.Builder> jobExecutionsRetryConfig) The configuration for the criteria to retry the job.jobExecutionsRetryConfig
(JobExecutionsRetryConfig jobExecutionsRetryConfig) The configuration for the criteria to retry the job.default Job.Builder
jobExecutionsRolloutConfig
(Consumer<JobExecutionsRolloutConfig.Builder> jobExecutionsRolloutConfig) Allows you to create a staged rollout of a job.jobExecutionsRolloutConfig
(JobExecutionsRolloutConfig jobExecutionsRolloutConfig) Allows you to create a staged rollout of a job.The unique identifier you assigned to this job when it was created.default Job.Builder
jobProcessDetails
(Consumer<JobProcessDetails.Builder> jobProcessDetails) Details about the job process.jobProcessDetails
(JobProcessDetails jobProcessDetails) Details about the job process.jobTemplateArn
(String jobTemplateArn) The ARN of the job template used to create the job.lastUpdatedAt
(Instant lastUpdatedAt) The time, in seconds since the epoch, when the job was last updated.namespaceId
(String namespaceId) The namespace used to indicate that a job is a customer-managed job.default Job.Builder
presignedUrlConfig
(Consumer<PresignedUrlConfig.Builder> presignedUrlConfig) Configuration for pre-signed S3 URLs.presignedUrlConfig
(PresignedUrlConfig presignedUrlConfig) Configuration for pre-signed S3 URLs.reasonCode
(String reasonCode) If the job was updated, provides the reason code for the update.scheduledJobRollouts
(Collection<ScheduledJobRollout> scheduledJobRollouts) Displays the next seven maintenance window occurrences and their start times.scheduledJobRollouts
(Consumer<ScheduledJobRollout.Builder>... scheduledJobRollouts) Displays the next seven maintenance window occurrences and their start times.scheduledJobRollouts
(ScheduledJobRollout... scheduledJobRollouts) Displays the next seven maintenance window occurrences and their start times.default Job.Builder
schedulingConfig
(Consumer<SchedulingConfig.Builder> schedulingConfig) The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.schedulingConfig
(SchedulingConfig schedulingConfig) The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.The status of the job, one ofIN_PROGRESS
,CANCELED
,DELETION_IN_PROGRESS
orCOMPLETED
.The status of the job, one ofIN_PROGRESS
,CANCELED
,DELETION_IN_PROGRESS
orCOMPLETED
.A list of IoT things and thing groups to which the job should be sent.targets
(Collection<String> targets) A list of IoT things and thing groups to which the job should be sent.targetSelection
(String targetSelection) Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT).targetSelection
(TargetSelection targetSelection) Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT).default Job.Builder
timeoutConfig
(Consumer<TimeoutConfig.Builder> timeoutConfig) Specifies the amount of time each device has to finish its execution of the job.timeoutConfig
(TimeoutConfig timeoutConfig) Specifies the amount of time each device has to finish its execution of the job.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
jobArn
An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".
- Parameters:
jobArn
- An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
jobId
The unique identifier you assigned to this job when it was created.
- Parameters:
jobId
- The unique identifier you assigned to this job when it was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targetSelection
Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.
We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
- Parameters:
targetSelection
- Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
targetSelection
Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.
We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
- Parameters:
targetSelection
- Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
status
The status of the job, one of
IN_PROGRESS
,CANCELED
,DELETION_IN_PROGRESS
orCOMPLETED
.- Parameters:
status
- The status of the job, one ofIN_PROGRESS
,CANCELED
,DELETION_IN_PROGRESS
orCOMPLETED
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
status
The status of the job, one of
IN_PROGRESS
,CANCELED
,DELETION_IN_PROGRESS
orCOMPLETED
.- Parameters:
status
- The status of the job, one ofIN_PROGRESS
,CANCELED
,DELETION_IN_PROGRESS
orCOMPLETED
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
forceCanceled
Will be
true
if the job was canceled with the optionalforce
parameter set totrue
.- Parameters:
forceCanceled
- Will betrue
if the job was canceled with the optionalforce
parameter set totrue
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
reasonCode
If the job was updated, provides the reason code for the update.
- Parameters:
reasonCode
- If the job was updated, provides the reason code for the update.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
comment
If the job was updated, describes the reason for the update.
- Parameters:
comment
- If the job was updated, describes the reason for the update.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targets
A list of IoT things and thing groups to which the job should be sent.
- Parameters:
targets
- A list of IoT things and thing groups to which the job should be sent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targets
A list of IoT things and thing groups to which the job should be sent.
- Parameters:
targets
- A list of IoT things and thing groups to which the job should be sent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
A short text description of the job.
- Parameters:
description
- A short text description of the job.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
presignedUrlConfig
Configuration for pre-signed S3 URLs.
- Parameters:
presignedUrlConfig
- Configuration for pre-signed S3 URLs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
presignedUrlConfig
Configuration for pre-signed S3 URLs.
This is a convenience method that creates an instance of thePresignedUrlConfig.Builder
avoiding the need to create one manually viaPresignedUrlConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed topresignedUrlConfig(PresignedUrlConfig)
.- Parameters:
presignedUrlConfig
- a consumer that will call methods onPresignedUrlConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
jobExecutionsRolloutConfig
Allows you to create a staged rollout of a job.
- Parameters:
jobExecutionsRolloutConfig
- Allows you to create a staged rollout of a job.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
jobExecutionsRolloutConfig
default Job.Builder jobExecutionsRolloutConfig(Consumer<JobExecutionsRolloutConfig.Builder> jobExecutionsRolloutConfig) Allows you to create a staged rollout of a job.
This is a convenience method that creates an instance of theJobExecutionsRolloutConfig.Builder
avoiding the need to create one manually viaJobExecutionsRolloutConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tojobExecutionsRolloutConfig(JobExecutionsRolloutConfig)
.- Parameters:
jobExecutionsRolloutConfig
- a consumer that will call methods onJobExecutionsRolloutConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
abortConfig
Configuration for criteria to abort the job.
- Parameters:
abortConfig
- Configuration for criteria to abort the job.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
abortConfig
Configuration for criteria to abort the job.
This is a convenience method that creates an instance of theAbortConfig.Builder
avoiding the need to create one manually viaAbortConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toabortConfig(AbortConfig)
.- Parameters:
abortConfig
- a consumer that will call methods onAbortConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
createdAt
The time, in seconds since the epoch, when the job was created.
- Parameters:
createdAt
- The time, in seconds since the epoch, when the job was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
lastUpdatedAt
The time, in seconds since the epoch, when the job was last updated.
- Parameters:
lastUpdatedAt
- The time, in seconds since the epoch, when the job was last updated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
completedAt
The time, in seconds since the epoch, when the job was completed.
- Parameters:
completedAt
- The time, in seconds since the epoch, when the job was completed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
jobProcessDetails
Details about the job process.
- Parameters:
jobProcessDetails
- Details about the job process.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
jobProcessDetails
Details about the job process.
This is a convenience method that creates an instance of theJobProcessDetails.Builder
avoiding the need to create one manually viaJobProcessDetails.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tojobProcessDetails(JobProcessDetails)
.- Parameters:
jobProcessDetails
- a consumer that will call methods onJobProcessDetails.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
timeoutConfig
Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to
IN_PROGRESS
. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set toTIMED_OUT
.- Parameters:
timeoutConfig
- Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set toIN_PROGRESS
. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set toTIMED_OUT
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
timeoutConfig
Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to
This is a convenience method that creates an instance of theIN_PROGRESS
. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set toTIMED_OUT
.TimeoutConfig.Builder
avoiding the need to create one manually viaTimeoutConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totimeoutConfig(TimeoutConfig)
.- Parameters:
timeoutConfig
- a consumer that will call methods onTimeoutConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
namespaceId
The namespace used to indicate that a job is a customer-managed job.
When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.
$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
The
namespaceId
feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.- Parameters:
namespaceId
- The namespace used to indicate that a job is a customer-managed job.When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.
$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/
The
namespaceId
feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
jobTemplateArn
The ARN of the job template used to create the job.
- Parameters:
jobTemplateArn
- The ARN of the job template used to create the job.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
jobExecutionsRetryConfig
The configuration for the criteria to retry the job.
- Parameters:
jobExecutionsRetryConfig
- The configuration for the criteria to retry the job.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
jobExecutionsRetryConfig
default Job.Builder jobExecutionsRetryConfig(Consumer<JobExecutionsRetryConfig.Builder> jobExecutionsRetryConfig) The configuration for the criteria to retry the job.
This is a convenience method that creates an instance of theJobExecutionsRetryConfig.Builder
avoiding the need to create one manually viaJobExecutionsRetryConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tojobExecutionsRetryConfig(JobExecutionsRetryConfig)
.- Parameters:
jobExecutionsRetryConfig
- a consumer that will call methods onJobExecutionsRetryConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
documentParameters
A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.
documentParameters
can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.- Parameters:
documentParameters
- A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.documentParameters
can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isConcurrent
Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.
- Parameters:
isConcurrent
- Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
schedulingConfig
The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.
- Parameters:
schedulingConfig
- The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
schedulingConfig
The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.
This is a convenience method that creates an instance of theSchedulingConfig.Builder
avoiding the need to create one manually viaSchedulingConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toschedulingConfig(SchedulingConfig)
.- Parameters:
schedulingConfig
- a consumer that will call methods onSchedulingConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
scheduledJobRollouts
Displays the next seven maintenance window occurrences and their start times.
- Parameters:
scheduledJobRollouts
- Displays the next seven maintenance window occurrences and their start times.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scheduledJobRollouts
Displays the next seven maintenance window occurrences and their start times.
- Parameters:
scheduledJobRollouts
- Displays the next seven maintenance window occurrences and their start times.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scheduledJobRollouts
Displays the next seven maintenance window occurrences and their start times.
This is a convenience method that creates an instance of theScheduledJobRollout.Builder
avoiding the need to create one manually viaScheduledJobRollout.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toscheduledJobRollouts(List<ScheduledJobRollout>)
.- Parameters:
scheduledJobRollouts
- a consumer that will call methods onScheduledJobRollout.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
destinationPackageVersions
The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.
Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
- Parameters:
destinationPackageVersions
- The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
destinationPackageVersions
The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.
Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
- Parameters:
destinationPackageVersions
- The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-