Class: AWSCDK::Pipes::CfnPipe::PipeTargetBatchJobParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pipes/cfn_pipe.rb

Overview

The parameters for using an AWS Batch job as a target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job_definition:, job_name:, array_properties: nil, container_overrides: nil, depends_on: nil, parameters: nil, retry_strategy: nil) ⇒ PipeTargetBatchJobParametersProperty

Returns a new instance of PipeTargetBatchJobParametersProperty.

Parameters:



2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
# File 'pipes/cfn_pipe.rb', line 2970

def initialize(job_definition:, job_name:, array_properties: nil, container_overrides: nil, depends_on: nil, parameters: nil, retry_strategy: nil)
  @job_definition = job_definition
  Jsii::Type.check_type(@job_definition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jobDefinition")
  @job_name = job_name
  Jsii::Type.check_type(@job_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "jobName")
  @array_properties = array_properties.is_a?(Hash) ? ::AWSCDK::Pipes::CfnPipe::BatchArrayPropertiesProperty.new(**array_properties.transform_keys(&:to_sym)) : array_properties
  Jsii::Type.check_type(@array_properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waXBlcy5DZm5QaXBlLkJhdGNoQXJyYXlQcm9wZXJ0aWVzUHJvcGVydHkifV19fQ==")), "arrayProperties") unless @array_properties.nil?
  @container_overrides = container_overrides.is_a?(Hash) ? ::AWSCDK::Pipes::CfnPipe::BatchContainerOverridesProperty.new(**container_overrides.transform_keys(&:to_sym)) : container_overrides
  Jsii::Type.check_type(@container_overrides, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waXBlcy5DZm5QaXBlLkJhdGNoQ29udGFpbmVyT3ZlcnJpZGVzUHJvcGVydHkifV19fQ==")), "containerOverrides") unless @container_overrides.nil?
  @depends_on = depends_on
  Jsii::Type.check_type(@depends_on, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlwZXMuQ2ZuUGlwZS5CYXRjaEpvYkRlcGVuZGVuY3lQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "dependsOn") unless @depends_on.nil?
  @parameters = parameters
  Jsii::Type.check_type(@parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "parameters") unless @parameters.nil?
  @retry_strategy = retry_strategy.is_a?(Hash) ? ::AWSCDK::Pipes::CfnPipe::BatchRetryStrategyProperty.new(**retry_strategy.transform_keys(&:to_sym)) : retry_strategy
  Jsii::Type.check_type(@retry_strategy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waXBlcy5DZm5QaXBlLkJhdGNoUmV0cnlTdHJhdGVneVByb3BlcnR5In1dfX0=")), "retryStrategy") unless @retry_strategy.nil?
end

Instance Attribute Details

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

The array properties for the submitted job, such as the size of the array.

The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an AWS Batch job.



3007
3008
3009
# File 'pipes/cfn_pipe.rb', line 3007

def array_properties
  @array_properties
end

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

The overrides that are sent to a container.



3012
3013
3014
# File 'pipes/cfn_pipe.rb', line 3012

def container_overrides
  @container_overrides
end

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

A list of dependencies for the job.

A job can depend upon a maximum of 20 jobs. You can specify a SEQUENTIAL type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an N_TO_N type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.



3019
3020
3021
# File 'pipes/cfn_pipe.rb', line 3019

def depends_on
  @depends_on
end

#job_definitionString (readonly)

The job definition used by this job.

This value can be one of name , name:revision , or the Amazon Resource Name (ARN) for the job definition. If name is specified without a revision then the latest active revision is used.



2993
2994
2995
# File 'pipes/cfn_pipe.rb', line 2993

def job_definition
  @job_definition
end

#job_nameString (readonly)

The name of the job.

It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).



3000
3001
3002
# File 'pipes/cfn_pipe.rb', line 3000

def job_name
  @job_name
end

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

Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition.

Parameters are specified as a key and value pair mapping. Parameters included here override any corresponding parameter defaults from the job definition.



3026
3027
3028
# File 'pipes/cfn_pipe.rb', line 3026

def parameters
  @parameters
end

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

The retry strategy to use for failed jobs.

When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.



3033
3034
3035
# File 'pipes/cfn_pipe.rb', line 3033

def retry_strategy
  @retry_strategy
end

Class Method Details

.jsii_propertiesObject



3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
# File 'pipes/cfn_pipe.rb', line 3035

def self.jsii_properties
  {
    :job_definition => "jobDefinition",
    :job_name => "jobName",
    :array_properties => "arrayProperties",
    :container_overrides => "containerOverrides",
    :depends_on => "dependsOn",
    :parameters => "parameters",
    :retry_strategy => "retryStrategy",
  }
end

Instance Method Details

#to_jsiiObject



3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
# File 'pipes/cfn_pipe.rb', line 3047

def to_jsii
  result = {}
  result.merge!({
    "jobDefinition" => @job_definition,
    "jobName" => @job_name,
    "arrayProperties" => @array_properties,
    "containerOverrides" => @container_overrides,
    "dependsOn" => @depends_on,
    "parameters" => @parameters,
    "retryStrategy" => @retry_strategy,
  })
  result.compact
end