Class: Aws::IoT::Types::CreateJobRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb

Overview

Note:

When making an API call, you may pass CreateJobRequest data as a hash:

{
  job_id: "JobId", # required
  targets: ["TargetArn"], # required
  document_source: "JobDocumentSource",
  document: "JobDocument",
  description: "JobDescription",
  presigned_url_config: {
    role_arn: "RoleArn",
    expires_in_sec: 1,
  },
  target_selection: "CONTINUOUS", # accepts CONTINUOUS, SNAPSHOT
  job_executions_rollout_config: {
    maximum_per_minute: 1,
    exponential_rate: {
      base_rate_per_minute: 1, # required
      increment_factor: 1.0, # required
      rate_increase_criteria: { # required
        number_of_notified_things: 1,
        number_of_succeeded_things: 1,
      },
    },
  },
  abort_config: {
    criteria_list: [ # required
      {
        failure_type: "FAILED", # required, accepts FAILED, REJECTED, TIMED_OUT, ALL
        action: "CANCEL", # required, accepts CANCEL
        threshold_percentage: 1.0, # required
        min_number_of_executed_things: 1, # required
      },
    ],
  },
  timeout_config: {
    in_progress_timeout_in_minutes: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  namespace_id: "NamespaceId",
  job_template_arn: "JobTemplateArn",
  job_executions_retry_config: {
    criteria_list: [ # required
      {
        failure_type: "FAILED", # required, accepts FAILED, TIMED_OUT, ALL
        number_of_retries: 1, # required
      },
    ],
  },
  document_parameters: {
    "ParameterKey" => "ParameterValue",
  },
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#abort_configTypes::AbortConfig

Allows you to create the criteria to abort a job.

Returns:



3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#descriptionString

A short text description of the job.

Returns:

  • (String)


3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#documentString

The job document. Required if you don't specify a value for documentSource.

Returns:

  • (String)


3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#document_parametersHash<String,String>

Parameters of a managed template that you can specify to create the job document.

Returns:

  • (Hash<String,String>)


3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#document_sourceString

An S3 link to the job document. Required if you don't specify a value for document.

If the job document resides in an S3 bucket, you must use a placeholder link when specifying the document.

The placeholder link is of the following form:

$\{aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key\}

where bucket is your bucket name and key is the object in the bucket to which you are linking.

Returns:

  • (String)


3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#job_executions_retry_configTypes::JobExecutionsRetryConfig

Allows you to create the criteria to retry a job.



3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#job_executions_rollout_configTypes::JobExecutionsRolloutConfig

Allows you to create a staged rollout of the job.



3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#job_idString

A job identifier which must be unique for your Amazon Web Services account. We recommend using a UUID. Alpha-numeric characters, "-" and "_" are valid for use here.

Returns:

  • (String)


3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#job_template_arnString

The ARN of the job template used to create the job.

Returns:

  • (String)


3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#namespace_idString

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 in public preview.

Returns:

  • (String)


3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#presigned_url_configTypes::PresignedUrlConfig

Configuration information for pre-signed S3 URLs.



3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#tagsArray<Types::Tag>

Metadata which can be used to manage the job.

Returns:



3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#target_selectionString

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 thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

Returns:

  • (String)


3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#targetsArray<String>

A list of things and thing groups to which the job should be sent.

Returns:

  • (Array<String>)


3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end

#timeout_configTypes::TimeoutConfig

Specifies the amount of time each device has to finish its execution of the job. The 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 time expires, it will be automatically set to TIMED_OUT.



3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
# File 'gems/aws-sdk-iot/lib/aws-sdk-iot/types.rb', line 3637

class CreateJobRequest < Struct.new(
  :job_id,
  :targets,
  :document_source,
  :document,
  :description,
  :presigned_url_config,
  :target_selection,
  :job_executions_rollout_config,
  :abort_config,
  :timeout_config,
  :tags,
  :namespace_id,
  :job_template_arn,
  :job_executions_retry_config,
  :document_parameters)
  SENSITIVE = []
  include Aws::Structure
end