Class CfnJob
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.iot.CfnJob
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IJobRef,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-09-02T11:03:11.765Z")
@Stability(Stable)
public class CfnJob
extends CfnResource
implements IInspectable, IJobRef, ITaggableV2
Use the AWS::IoT::Job resource to declare an AWS IoT job.
A job can be used to define a set of remote operations that are sent to and run on one or more devices (things or thing groups) connected to AWS IoT.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;
CfnJob cfnJob = CfnJob.Builder.create(this, "MyCfnJob")
.jobId("jobId")
.targets(List.of("targets"))
// the properties below are optional
.abortConfig(AbortConfigProperty.builder()
.criteriaList(List.of(AbortCriteriaProperty.builder()
.action("action")
.failureType("failureType")
.minNumberOfExecutedThings(123)
.thresholdPercentage(123)
.build()))
.build())
.description("description")
.destinationPackageVersions(List.of("destinationPackageVersions"))
.document("document")
.documentParameters(Map.of(
"documentParametersKey", "documentParameters"))
.documentSource("documentSource")
.jobExecutionsRetryConfig(JobExecutionsRetryConfigProperty.builder()
.criteriaList(List.of(RetryCriteriaProperty.builder()
.failureType("failureType")
.numberOfRetries(123)
.build()))
.build())
.jobExecutionsRolloutConfig(JobExecutionsRolloutConfigProperty.builder()
.exponentialRate(ExponentialRolloutRateProperty.builder()
.baseRatePerMinute(123)
.incrementFactor(123)
.rateIncreaseCriteria(RateIncreaseCriteriaProperty.builder()
.numberOfNotifiedThings(123)
.numberOfSucceededThings(123)
.build())
.build())
.maximumPerMinute(123)
.build())
.jobTemplateArn("jobTemplateArn")
.presignedUrlConfig(PresignedUrlConfigProperty.builder()
.expiresInSec(123)
.roleArn("roleArn")
.build())
.schedulingConfig(SchedulingConfigProperty.builder()
.endBehavior("endBehavior")
.endTime("endTime")
.maintenanceWindows(List.of(MaintenanceWindowProperty.builder()
.durationInMinutes(123)
.startTime("startTime")
.build()))
.startTime("startTime")
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.targetSelection("targetSelection")
.timeoutConfig(TimeoutConfigProperty.builder()
.inProgressTimeoutInMinutes(123)
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe criteria that determine when and how a job abort takes place.static interfaceThe criteria that determine when and how a job abort takes place.static final classA fluent builder forCfnJob.static interfaceAllows you to create an exponential rate of rollout for a job.static interfaceThe configuration that determines how many retries are allowed for each failure type for a job.static interfaceAllows you to create a staged rollout of a job.static interfaceAn optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.static interfaceConfiguration for pre-signed S3 URLs.static interfaceAllows you to define a criteria to initiate the increase in rate of rollout for a job.static interfaceThe criteria that determines how many retries are allowed for each failure type for a job.static interfaceSpecifies the date and time that a job will begin the rollout of the job document to all devices in the target group.static interfaceSpecifies the amount of time each device has to finish its execution of the job.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.iot.IJobRef
IJobRef.Jsii$Default, IJobRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnJob(software.amazon.jsii.JsiiObjectRef objRef) CfnJob(software.constructs.Construct scope, String id, CfnJobProps props) Create a newAWS::IoT::Job. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringThe criteria that determine when and how a job abort takes place.The Amazon Resource Name (ARN) of the job.The time when the job was created, in ISO 8601 date-time format.Tag Manager which manages the tags for this resource.A short text description of the job.The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes.The job document.Parameters of an Amazon Web Services managed template that you can specify to create the job document.An S3 link, or S3 object URL, to the job document.The configuration that determines how many retries are allowed for each failure type for a job.Allows you to create a staged rollout of a job.getJobId()A job identifier which must be unique for your AWS account.A reference to a Job resource.The ARN of the job template used to create the job.Configuration for pre-signed S3 URLs.Specifies the date and time that a job will begin the rollout of the job document to all devices in the target group.getTags()Metadata which can be used to manage the job.A list of things and thing groups to which the job should be sent.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).Specifies the amount of time each device has to finish its execution of the job.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnJob.renderProperties(Map<String, Object> props) voidsetAbortConfig(IResolvable value) The criteria that determine when and how a job abort takes place.voidThe criteria that determine when and how a job abort takes place.voidsetDescription(String value) A short text description of the job.voidsetDestinationPackageVersions(List<String> value) The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes.voidsetDocument(String value) The job document.voidsetDocumentParameters(Map<String, String> value) Parameters of an Amazon Web Services managed template that you can specify to create the job document.voidsetDocumentParameters(IResolvable value) Parameters of an Amazon Web Services managed template that you can specify to create the job document.voidsetDocumentSource(String value) An S3 link, or S3 object URL, to the job document.voidThe configuration that determines how many retries are allowed for each failure type for a job.voidThe configuration that determines how many retries are allowed for each failure type for a job.voidAllows you to create a staged rollout of a job.voidAllows you to create a staged rollout of a job.voidA job identifier which must be unique for your AWS account.voidsetJobTemplateArn(String value) The ARN of the job template used to create the job.voidsetPresignedUrlConfig(IResolvable value) Configuration for pre-signed S3 URLs.voidConfiguration for pre-signed S3 URLs.voidsetSchedulingConfig(IResolvable value) Specifies the date and time that a job will begin the rollout of the job document to all devices in the target group.voidSpecifies the date and time that a job will begin the rollout of the job document to all devices in the target group.voidMetadata which can be used to manage the job.voidsetTargets(List<String> value) A list of things and thing groups to which the job should be sent.voidsetTargetSelection(String value) 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).voidsetTimeoutConfig(IResolvable value) Specifies the amount of time each device has to finish its execution of the job.voidSpecifies the amount of time each device has to finish its execution of the job.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, addResourceDependency, addResourceDependency, applyCrossStackReferenceStrength, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, cfnPropertyName, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, removeDependency, removeResourceDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId, withMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnJob
protected CfnJob(software.amazon.jsii.JsiiObjectRef objRef) -
CfnJob
protected CfnJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnJob
@Stability(Stable) public CfnJob(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnJobProps props) Create a newAWS::IoT::Job.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForJob
- Parameters:
resource- This parameter is required.
-
isCfnJob
Checks whether the given object is a CfnJob.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the job. -
getAttrCreatedAt
The time when the job was created, in ISO 8601 date-time format. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getCfnPropertyNames
- Overrides:
getCfnPropertyNamesin classCfnResource
-
getJobRef
A reference to a Job resource. -
getJobId
A job identifier which must be unique for your AWS account. -
setJobId
A job identifier which must be unique for your AWS account. -
getTargets
A list of things and thing groups to which the job should be sent. -
setTargets
A list of things and thing groups to which the job should be sent. -
getAbortConfig
The criteria that determine when and how a job abort takes place.Returns union: either
IResolvableorCfnJob.AbortConfigProperty -
setAbortConfig
The criteria that determine when and how a job abort takes place. -
setAbortConfig
The criteria that determine when and how a job abort takes place. -
getDescription
A short text description of the job. -
setDescription
A short text description of the job. -
getDestinationPackageVersions
The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. -
setDestinationPackageVersions
The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. -
getDocument
The job document. -
setDocument
The job document. -
getDocumentParameters
Parameters of an Amazon Web Services managed template that you can specify to create the job document.Returns union: either
IResolvableor Mapinvalid input: '<'String,String> -
setDocumentParameters
Parameters of an Amazon Web Services managed template that you can specify to create the job document. -
setDocumentParameters
Parameters of an Amazon Web Services managed template that you can specify to create the job document. -
getDocumentSource
An S3 link, or S3 object URL, to the job document. -
setDocumentSource
An S3 link, or S3 object URL, to the job document. -
getJobExecutionsRetryConfig
The configuration that determines how many retries are allowed for each failure type for a job.Returns union: either
IResolvableorCfnJob.JobExecutionsRetryConfigProperty -
setJobExecutionsRetryConfig
The configuration that determines how many retries are allowed for each failure type for a job. -
setJobExecutionsRetryConfig
@Stability(Stable) public void setJobExecutionsRetryConfig(@Nullable CfnJob.JobExecutionsRetryConfigProperty value) The configuration that determines how many retries are allowed for each failure type for a job. -
getJobExecutionsRolloutConfig
Allows you to create a staged rollout of a job.Returns union: either
IResolvableorCfnJob.JobExecutionsRolloutConfigProperty -
setJobExecutionsRolloutConfig
Allows you to create a staged rollout of a job. -
setJobExecutionsRolloutConfig
@Stability(Stable) public void setJobExecutionsRolloutConfig(@Nullable CfnJob.JobExecutionsRolloutConfigProperty value) Allows you to create a staged rollout of a job. -
getJobTemplateArn
The ARN of the job template used to create the job. -
setJobTemplateArn
The ARN of the job template used to create the job. -
getPresignedUrlConfig
Configuration for pre-signed S3 URLs.Returns union: either
IResolvableorCfnJob.PresignedUrlConfigProperty -
setPresignedUrlConfig
Configuration for pre-signed S3 URLs. -
setPresignedUrlConfig
@Stability(Stable) public void setPresignedUrlConfig(@Nullable CfnJob.PresignedUrlConfigProperty value) Configuration for pre-signed S3 URLs. -
getSchedulingConfig
Specifies the date and time that a job will begin the rollout of the job document to all devices in the target group.Returns union: either
IResolvableorCfnJob.SchedulingConfigProperty -
setSchedulingConfig
Specifies the date and time that a job will begin the rollout of the job document to all devices in the target group. -
setSchedulingConfig
Specifies the date and time that a job will begin the rollout of the job document to all devices in the target group. -
getTags
Metadata which can be used to manage the job. -
setTags
Metadata which can be used to manage the job. -
getTargetSelection
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). -
setTargetSelection
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). -
getTimeoutConfig
Specifies the amount of time each device has to finish its execution of the job.Returns union: either
IResolvableorCfnJob.TimeoutConfigProperty -
setTimeoutConfig
Specifies the amount of time each device has to finish its execution of the job. -
setTimeoutConfig
Specifies the amount of time each device has to finish its execution of the job.
-