CfnJobPropsMixin

class aws_cdk.cfn_property_mixins.aws_iot.CfnJobPropsMixin(props, *, strategy=None)

Bases: Mixin

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-job.html

CloudformationResource:

AWS::IoT::Job

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_job_props_mixin = iot.CfnJobPropsMixin(iot.CfnJobMixinProps(
    abort_config=iot.CfnJobPropsMixin.AbortConfigProperty(
        criteria_list=[iot.CfnJobPropsMixin.AbortCriteriaProperty(
            action="action",
            failure_type="failureType",
            min_number_of_executed_things=123,
            threshold_percentage=123
        )]
    ),
    description="description",
    destination_package_versions=["destinationPackageVersions"],
    document="document",
    document_parameters={
        "document_parameters_key": "documentParameters"
    },
    document_source="documentSource",
    job_executions_retry_config=iot.CfnJobPropsMixin.JobExecutionsRetryConfigProperty(
        criteria_list=[iot.CfnJobPropsMixin.RetryCriteriaProperty(
            failure_type="failureType",
            number_of_retries=123
        )]
    ),
    job_executions_rollout_config=iot.CfnJobPropsMixin.JobExecutionsRolloutConfigProperty(
        exponential_rate=iot.CfnJobPropsMixin.ExponentialRolloutRateProperty(
            base_rate_per_minute=123,
            increment_factor=123,
            rate_increase_criteria=iot.CfnJobPropsMixin.RateIncreaseCriteriaProperty(
                number_of_notified_things=123,
                number_of_succeeded_things=123
            )
        ),
        maximum_per_minute=123
    ),
    job_id="jobId",
    job_template_arn="jobTemplateArn",
    presigned_url_config=iot.CfnJobPropsMixin.PresignedUrlConfigProperty(
        expires_in_sec=123,
        role_arn="roleArn"
    ),
    scheduling_config=iot.CfnJobPropsMixin.SchedulingConfigProperty(
        end_behavior="endBehavior",
        end_time="endTime",
        maintenance_windows=[iot.CfnJobPropsMixin.MaintenanceWindowProperty(
            duration_in_minutes=123,
            start_time="startTime"
        )],
        start_time="startTime"
    ),
    tags=[cdk.CfnTag(
        key="key",
        value="value"
    )],
    targets=["targets"],
    target_selection="targetSelection",
    timeout_config=iot.CfnJobPropsMixin.TimeoutConfigProperty(
        in_progress_timeout_in_minutes=123
    )
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::IoT::Job.

Parameters:
  • props (Union[CfnJobMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['abortConfig', 'description', 'destinationPackageVersions', 'document', 'documentParameters', 'documentSource', 'jobExecutionsRetryConfig', 'jobExecutionsRolloutConfig', 'jobId', 'jobTemplateArn', 'presignedUrlConfig', 'schedulingConfig', 'tags', 'targets', 'targetSelection', 'timeoutConfig']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

AbortConfigProperty

class CfnJobPropsMixin.AbortConfigProperty(*, criteria_list=None)

Bases: object

The criteria that determine when and how a job abort takes place.

Parameters:

criteria_list (Union[IResolvable, Sequence[Union[IResolvable, AbortCriteriaProperty, Dict[str, Any]]], None]) – The list of criteria that determine when and how to abort the job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-abortconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

abort_config_property = iot.CfnJobPropsMixin.AbortConfigProperty(
    criteria_list=[iot.CfnJobPropsMixin.AbortCriteriaProperty(
        action="action",
        failure_type="failureType",
        min_number_of_executed_things=123,
        threshold_percentage=123
    )]
)

Attributes

criteria_list

The list of criteria that determine when and how to abort the job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-abortconfig.html#cfn-iot-job-abortconfig-criterialist

AbortCriteriaProperty

class CfnJobPropsMixin.AbortCriteriaProperty(*, action=None, failure_type=None, min_number_of_executed_things=None, threshold_percentage=None)

Bases: object

The criteria that determine when and how a job abort takes place.

Parameters:
  • action (Optional[str]) – The type of job action to take to initiate the job abort.

  • failure_type (Optional[str]) – The type of job execution failures that can initiate a job abort.

  • min_number_of_executed_things (Union[int, float, None]) – The minimum number of things which must receive job execution notifications before the job can be aborted.

  • threshold_percentage (Union[int, float, None]) – The minimum percentage of job execution failures that must occur to initiate the job abort.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-abortcriteria.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

abort_criteria_property = iot.CfnJobPropsMixin.AbortCriteriaProperty(
    action="action",
    failure_type="failureType",
    min_number_of_executed_things=123,
    threshold_percentage=123
)

Attributes

action

The type of job action to take to initiate the job abort.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-abortcriteria.html#cfn-iot-job-abortcriteria-action

failure_type

The type of job execution failures that can initiate a job abort.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-abortcriteria.html#cfn-iot-job-abortcriteria-failuretype

min_number_of_executed_things

The minimum number of things which must receive job execution notifications before the job can be aborted.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-abortcriteria.html#cfn-iot-job-abortcriteria-minnumberofexecutedthings

threshold_percentage

The minimum percentage of job execution failures that must occur to initiate the job abort.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-abortcriteria.html#cfn-iot-job-abortcriteria-thresholdpercentage

ExponentialRolloutRateProperty

class CfnJobPropsMixin.ExponentialRolloutRateProperty(*, base_rate_per_minute=None, increment_factor=None, rate_increase_criteria=None)

Bases: object

Allows you to create an exponential rate of rollout for a job.

Parameters:
  • base_rate_per_minute (Union[int, float, None]) – The minimum number of things that will be notified of a pending job, per minute at the start of job rollout.

  • increment_factor (Union[int, float, None]) – The exponential factor to increase the rate of rollout for a job.

  • rate_increase_criteria (Union[IResolvable, RateIncreaseCriteriaProperty, Dict[str, Any], None]) – Allows you to define a criteria to initiate the increase in rate of rollout for a job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-exponentialrolloutrate.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

exponential_rollout_rate_property = iot.CfnJobPropsMixin.ExponentialRolloutRateProperty(
    base_rate_per_minute=123,
    increment_factor=123,
    rate_increase_criteria=iot.CfnJobPropsMixin.RateIncreaseCriteriaProperty(
        number_of_notified_things=123,
        number_of_succeeded_things=123
    )
)

Attributes

base_rate_per_minute

The minimum number of things that will be notified of a pending job, per minute at the start of job rollout.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-exponentialrolloutrate.html#cfn-iot-job-exponentialrolloutrate-baserateperminute

increment_factor

The exponential factor to increase the rate of rollout for a job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-exponentialrolloutrate.html#cfn-iot-job-exponentialrolloutrate-incrementfactor

rate_increase_criteria

Allows you to define a criteria to initiate the increase in rate of rollout for a job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-exponentialrolloutrate.html#cfn-iot-job-exponentialrolloutrate-rateincreasecriteria

JobExecutionsRetryConfigProperty

class CfnJobPropsMixin.JobExecutionsRetryConfigProperty(*, criteria_list=None)

Bases: object

The configuration that determines how many retries are allowed for each failure type for a job.

Parameters:

criteria_list (Union[IResolvable, Sequence[Union[IResolvable, RetryCriteriaProperty, Dict[str, Any]]], None]) – The list of criteria that determines how many retries are allowed for each failure type for a job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-jobexecutionsretryconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

job_executions_retry_config_property = iot.CfnJobPropsMixin.JobExecutionsRetryConfigProperty(
    criteria_list=[iot.CfnJobPropsMixin.RetryCriteriaProperty(
        failure_type="failureType",
        number_of_retries=123
    )]
)

Attributes

criteria_list

The list of criteria that determines how many retries are allowed for each failure type for a job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-jobexecutionsretryconfig.html#cfn-iot-job-jobexecutionsretryconfig-criterialist

JobExecutionsRolloutConfigProperty

class CfnJobPropsMixin.JobExecutionsRolloutConfigProperty(*, exponential_rate=None, maximum_per_minute=None)

Bases: object

Allows you to create a staged rollout of a job.

Parameters:
  • exponential_rate (Union[IResolvable, ExponentialRolloutRateProperty, Dict[str, Any], None]) – Allows you to create an exponential rate of rollout for a job.

  • maximum_per_minute (Union[int, float, None]) – The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-jobexecutionsrolloutconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

job_executions_rollout_config_property = iot.CfnJobPropsMixin.JobExecutionsRolloutConfigProperty(
    exponential_rate=iot.CfnJobPropsMixin.ExponentialRolloutRateProperty(
        base_rate_per_minute=123,
        increment_factor=123,
        rate_increase_criteria=iot.CfnJobPropsMixin.RateIncreaseCriteriaProperty(
            number_of_notified_things=123,
            number_of_succeeded_things=123
        )
    ),
    maximum_per_minute=123
)

Attributes

exponential_rate

Allows you to create an exponential rate of rollout for a job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-jobexecutionsrolloutconfig.html#cfn-iot-job-jobexecutionsrolloutconfig-exponentialrate

maximum_per_minute

The maximum number of things that will be notified of a pending job, per minute.

This parameter allows you to create a staged rollout.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-jobexecutionsrolloutconfig.html#cfn-iot-job-jobexecutionsrolloutconfig-maximumperminute

MaintenanceWindowProperty

class CfnJobPropsMixin.MaintenanceWindowProperty(*, duration_in_minutes=None, start_time=None)

Bases: object

An 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.

Parameters:
  • duration_in_minutes (Union[int, float, None]) – Displays the duration of the next maintenance window.

  • start_time (Optional[str]) – Displays the start time of the next maintenance window.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-maintenancewindow.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

maintenance_window_property = iot.CfnJobPropsMixin.MaintenanceWindowProperty(
    duration_in_minutes=123,
    start_time="startTime"
)

Attributes

duration_in_minutes

Displays the duration of the next maintenance window.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-maintenancewindow.html#cfn-iot-job-maintenancewindow-durationinminutes

start_time

Displays the start time of the next maintenance window.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-maintenancewindow.html#cfn-iot-job-maintenancewindow-starttime

PresignedUrlConfigProperty

class CfnJobPropsMixin.PresignedUrlConfigProperty(*, expires_in_sec=None, role_arn=None)

Bases: object

Configuration for pre-signed S3 URLs.

Parameters:
  • expires_in_sec (Union[int, float, None]) – How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds.

  • role_arn (Optional[str]) – The ARN of an IAM role that grants permission to download files from the S3 bucket where the job data/updates are stored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-presignedurlconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

presigned_url_config_property = iot.CfnJobPropsMixin.PresignedUrlConfigProperty(
    expires_in_sec=123,
    role_arn="roleArn"
)

Attributes

expires_in_sec

How long (in seconds) pre-signed URLs are valid.

Valid values are 60 - 3600, the default value is 3600 seconds.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-presignedurlconfig.html#cfn-iot-job-presignedurlconfig-expiresinsec

role_arn

The ARN of an IAM role that grants permission to download files from the S3 bucket where the job data/updates are stored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-presignedurlconfig.html#cfn-iot-job-presignedurlconfig-rolearn

RateIncreaseCriteriaProperty

class CfnJobPropsMixin.RateIncreaseCriteriaProperty(*, number_of_notified_things=None, number_of_succeeded_things=None)

Bases: object

Allows you to define a criteria to initiate the increase in rate of rollout for a job.

Parameters:
  • number_of_notified_things (Union[int, float, None]) – The threshold for number of notified things that will initiate the increase in rate of rollout.

  • number_of_succeeded_things (Union[int, float, None]) – The threshold for number of succeeded things that will initiate the increase in rate of rollout.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-rateincreasecriteria.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

rate_increase_criteria_property = iot.CfnJobPropsMixin.RateIncreaseCriteriaProperty(
    number_of_notified_things=123,
    number_of_succeeded_things=123
)

Attributes

number_of_notified_things

The threshold for number of notified things that will initiate the increase in rate of rollout.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-rateincreasecriteria.html#cfn-iot-job-rateincreasecriteria-numberofnotifiedthings

number_of_succeeded_things

The threshold for number of succeeded things that will initiate the increase in rate of rollout.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-rateincreasecriteria.html#cfn-iot-job-rateincreasecriteria-numberofsucceededthings

RetryCriteriaProperty

class CfnJobPropsMixin.RetryCriteriaProperty(*, failure_type=None, number_of_retries=None)

Bases: object

The criteria that determines how many retries are allowed for each failure type for a job.

Parameters:
  • failure_type (Optional[str]) – The type of job execution failures that can initiate a job retry.

  • number_of_retries (Union[int, float, None]) – The number of retries allowed for a failure type for the job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-retrycriteria.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

retry_criteria_property = iot.CfnJobPropsMixin.RetryCriteriaProperty(
    failure_type="failureType",
    number_of_retries=123
)

Attributes

failure_type

The type of job execution failures that can initiate a job retry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-retrycriteria.html#cfn-iot-job-retrycriteria-failuretype

number_of_retries

The number of retries allowed for a failure type for the job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-retrycriteria.html#cfn-iot-job-retrycriteria-numberofretries

SchedulingConfigProperty

class CfnJobPropsMixin.SchedulingConfigProperty(*, end_behavior=None, end_time=None, maintenance_windows=None, start_time=None)

Bases: object

Specifies the date and time that a job will begin the rollout of the job document to all devices in the target group.

Parameters:
  • end_behavior (Optional[str]) – Specifies the end behavior for all job executions after a job reaches the selected endTime.

  • end_time (Optional[str]) – The time a job will stop rollout of the job document to all devices in the target group for a job.

  • maintenance_windows (Union[IResolvable, Sequence[Union[IResolvable, MaintenanceWindowProperty, Dict[str, Any]]], None]) – An optional configuration within the SchedulingConfig to setup a recurring maintenance window.

  • start_time (Optional[str]) – The time a job will begin rollout of the job document to all devices in the target group for a job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-schedulingconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

scheduling_config_property = iot.CfnJobPropsMixin.SchedulingConfigProperty(
    end_behavior="endBehavior",
    end_time="endTime",
    maintenance_windows=[iot.CfnJobPropsMixin.MaintenanceWindowProperty(
        duration_in_minutes=123,
        start_time="startTime"
    )],
    start_time="startTime"
)

Attributes

end_behavior

Specifies the end behavior for all job executions after a job reaches the selected endTime.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-schedulingconfig.html#cfn-iot-job-schedulingconfig-endbehavior

end_time

The time a job will stop rollout of the job document to all devices in the target group for a job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-schedulingconfig.html#cfn-iot-job-schedulingconfig-endtime

maintenance_windows

An optional configuration within the SchedulingConfig to setup a recurring maintenance window.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-schedulingconfig.html#cfn-iot-job-schedulingconfig-maintenancewindows

start_time

The time a job will begin rollout of the job document to all devices in the target group for a job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-schedulingconfig.html#cfn-iot-job-schedulingconfig-starttime

TimeoutConfigProperty

class CfnJobPropsMixin.TimeoutConfigProperty(*, in_progress_timeout_in_minutes=None)

Bases: object

Specifies the amount of time each device has to finish its execution of the job.

Parameters:

in_progress_timeout_in_minutes (Union[int, float, None]) – Specifies the amount of time, in minutes, this device has to finish execution of this job. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-timeoutconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_iot as iot

timeout_config_property = iot.CfnJobPropsMixin.TimeoutConfigProperty(
    in_progress_timeout_in_minutes=123
)

Attributes

in_progress_timeout_in_minutes

Specifies the amount of time, in minutes, this device has to finish execution of this job.

The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-job-timeoutconfig.html#cfn-iot-job-timeoutconfig-inprogresstimeoutinminutes