Class: AWSCDK::IoT::CfnJobTemplateProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_job_template_props.rb

Overview

Properties for defining a CfnJobTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(description:, job_template_id:, abort_config: nil, destination_package_versions: nil, document: nil, document_source: nil, job_arn: nil, job_executions_retry_config: nil, job_executions_rollout_config: nil, maintenance_windows: nil, presigned_url_config: nil, tags: nil, timeout_config: nil) ⇒ CfnJobTemplateProps

Returns a new instance of CfnJobTemplateProps.

Parameters:

  • description (String)

    A description of the job template.

  • job_template_id (String)

    A unique identifier for the job template.

  • abort_config (Object, nil) (defaults to: nil)

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

  • destination_package_versions (Array<String>, nil) (defaults to: nil)

    The package version Amazon Resource Names (ARNs) that are installed on the device’s reserved named shadow ( $package ) when the job successfully completes.

  • document (String, nil) (defaults to: nil)

    The job document.

  • document_source (String, nil) (defaults to: nil)

    An S3 link, or S3 object URL, to the job document.

  • job_arn (String, nil) (defaults to: nil)

    The ARN of the job to use as the basis for the job template.

  • job_executions_retry_config (AWSCDK::IResolvable, AWSCDK::IoT::CfnJobTemplate::JobExecutionsRetryConfigProperty, nil) (defaults to: nil)

    Allows you to create the criteria to retry a job.

  • job_executions_rollout_config (Object, nil) (defaults to: nil)

    Allows you to create a staged rollout of a job.

  • maintenance_windows (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::IoT::CfnJobTemplate::MaintenanceWindowProperty>, nil) (defaults to: nil)

    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.

  • presigned_url_config (Object, nil) (defaults to: nil)

    Configuration for pre-signed S3 URLs.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Metadata that can be used to manage the job template.

  • timeout_config (Object, nil) (defaults to: nil)

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



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'io_t/cfn_job_template_props.rb', line 22

def initialize(description:, job_template_id:, abort_config: nil, destination_package_versions: nil, document: nil, document_source: nil, job_arn: nil, job_executions_retry_config: nil, job_executions_rollout_config: nil, maintenance_windows: nil, presigned_url_config: nil, tags: nil, timeout_config: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description")
  @job_template_id = job_template_id
  Jsii::Type.check_type(@job_template_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jobTemplateId")
  @abort_config = abort_config
  Jsii::Type.check_type(@abort_config, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "abortConfig") unless @abort_config.nil?
  @destination_package_versions = destination_package_versions
  Jsii::Type.check_type(@destination_package_versions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "destinationPackageVersions") unless @destination_package_versions.nil?
  @document = document
  Jsii::Type.check_type(@document, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "document") unless @document.nil?
  @document_source = document_source
  Jsii::Type.check_type(@document_source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentSource") unless @document_source.nil?
  @job_arn = job_arn
  Jsii::Type.check_type(@job_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jobArn") unless @job_arn.nil?
  @job_executions_retry_config = job_executions_retry_config.is_a?(Hash) ? ::AWSCDK::IoT::CfnJobTemplate::JobExecutionsRetryConfigProperty.new(**job_executions_retry_config.transform_keys(&:to_sym)) : job_executions_retry_config
  Jsii::Type.check_type(@job_executions_retry_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuSm9iVGVtcGxhdGUuSm9iRXhlY3V0aW9uc1JldHJ5Q29uZmlnUHJvcGVydHkifV19fQ==")), "jobExecutionsRetryConfig") unless @job_executions_retry_config.nil?
  @job_executions_rollout_config = job_executions_rollout_config
  Jsii::Type.check_type(@job_executions_rollout_config, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "jobExecutionsRolloutConfig") unless @job_executions_rollout_config.nil?
  @maintenance_windows = maintenance_windows
  Jsii::Type.check_type(@maintenance_windows, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90LkNmbkpvYlRlbXBsYXRlLk1haW50ZW5hbmNlV2luZG93UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "maintenanceWindows") unless @maintenance_windows.nil?
  @presigned_url_config = presigned_url_config
  Jsii::Type.check_type(@presigned_url_config, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "presignedUrlConfig") unless @presigned_url_config.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @timeout_config = timeout_config
  Jsii::Type.check_type(@timeout_config, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "timeoutConfig") unless @timeout_config.nil?
end

Instance Attribute Details

#abort_configObject? (readonly)

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



67
68
69
# File 'io_t/cfn_job_template_props.rb', line 67

def abort_config
  @abort_config
end

#descriptionString (readonly)

A description of the job template.



55
56
57
# File 'io_t/cfn_job_template_props.rb', line 55

def description
  @description
end

#destination_package_versionsArray<String>? (readonly)

The package version Amazon Resource Names (ARNs) that are installed on the device’s reserved named shadow ( $package ) when the job successfully completes.

Note: Up to 25 package version ARNS are allowed.



74
75
76
# File 'io_t/cfn_job_template_props.rb', line 74

def destination_package_versions
  @destination_package_versions
end

#documentString? (readonly)

The job document.

Required if you don't specify a value for document_source .



81
82
83
# File 'io_t/cfn_job_template_props.rb', line 81

def document
  @document
end

#document_sourceString? (readonly)

An S3 link, or S3 object URL, to the job document.

The link is an Amazon S3 object URL and is required if you don't specify a value for document .

For example, --document-source https://s3. *region-code* .amazonaws.com/example-firmware/device-firmware.1.0

For more information, see Methods for accessing a bucket .



92
93
94
# File 'io_t/cfn_job_template_props.rb', line 92

def document_source
  @document_source
end

#job_arnString? (readonly)

The ARN of the job to use as the basis for the job template.



97
98
99
# File 'io_t/cfn_job_template_props.rb', line 97

def job_arn
  @job_arn
end

#job_executions_retry_configAWSCDK::IResolvable, ... (readonly)

Allows you to create the criteria to retry a job.



102
103
104
# File 'io_t/cfn_job_template_props.rb', line 102

def job_executions_retry_config
  @job_executions_retry_config
end

#job_executions_rollout_configObject? (readonly)

Allows you to create a staged rollout of a job.



107
108
109
# File 'io_t/cfn_job_template_props.rb', line 107

def job_executions_rollout_config
  @job_executions_rollout_config
end

#job_template_idString (readonly)

A unique identifier for the job template.

We recommend using a UUID. Alpha-numeric characters, "-", and "_" are valid for use here.



62
63
64
# File 'io_t/cfn_job_template_props.rb', line 62

def job_template_id
  @job_template_id
end

#maintenance_windowsAWSCDK::IResolvable, ... (readonly)

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.



112
113
114
# File 'io_t/cfn_job_template_props.rb', line 112

def maintenance_windows
  @maintenance_windows
end

#presigned_url_configObject? (readonly)

Configuration for pre-signed S3 URLs.



117
118
119
# File 'io_t/cfn_job_template_props.rb', line 117

def presigned_url_config
  @presigned_url_config
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

Metadata that can be used to manage the job template.



122
123
124
# File 'io_t/cfn_job_template_props.rb', line 122

def tags
  @tags
end

#timeout_configObject? (readonly)

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 to TIMED_OUT .



129
130
131
# File 'io_t/cfn_job_template_props.rb', line 129

def timeout_config
  @timeout_config
end

Class Method Details

.jsii_propertiesObject



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'io_t/cfn_job_template_props.rb', line 131

def self.jsii_properties
  {
    :description => "description",
    :job_template_id => "jobTemplateId",
    :abort_config => "abortConfig",
    :destination_package_versions => "destinationPackageVersions",
    :document => "document",
    :document_source => "documentSource",
    :job_arn => "jobArn",
    :job_executions_retry_config => "jobExecutionsRetryConfig",
    :job_executions_rollout_config => "jobExecutionsRolloutConfig",
    :maintenance_windows => "maintenanceWindows",
    :presigned_url_config => "presignedUrlConfig",
    :tags => "tags",
    :timeout_config => "timeoutConfig",
  }
end

Instance Method Details

#to_jsiiObject



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'io_t/cfn_job_template_props.rb', line 149

def to_jsii
  result = {}
  result.merge!({
    "description" => @description,
    "jobTemplateId" => @job_template_id,
    "abortConfig" => @abort_config,
    "destinationPackageVersions" => @destination_package_versions,
    "document" => @document,
    "documentSource" => @document_source,
    "jobArn" => @job_arn,
    "jobExecutionsRetryConfig" => @job_executions_retry_config,
    "jobExecutionsRolloutConfig" => @job_executions_rollout_config,
    "maintenanceWindows" => @maintenance_windows,
    "presignedUrlConfig" => @presigned_url_config,
    "tags" => @tags,
    "timeoutConfig" => @timeout_config,
  })
  result.compact
end