Class: AWSCDK::Events::CfnRule::BatchParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
events/cfn_rule.rb

Overview

The custom parameters to be used when the target is an AWS Batch job.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job_definition:, job_name:, array_properties: nil, retry_strategy: nil) ⇒ BatchParametersProperty

Returns a new instance of BatchParametersProperty.

Parameters:



790
791
792
793
794
795
796
797
798
799
# File 'events/cfn_rule.rb', line 790

def initialize(job_definition:, job_name:, array_properties: 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::Events::CfnRule::BatchArrayPropertiesProperty.new(**array_properties.transform_keys(&:to_sym)) : array_properties
  Jsii::Type.check_type(@array_properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5CYXRjaEFycmF5UHJvcGVydGllc1Byb3BlcnR5In1dfX0=")), "arrayProperties") unless @array_properties.nil?
  @retry_strategy = retry_strategy.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::BatchRetryStrategyProperty.new(**retry_strategy.transform_keys(&:to_sym)) : retry_strategy
  Jsii::Type.check_type(@retry_strategy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5CYXRjaFJldHJ5U3RyYXRlZ3lQcm9wZXJ0eSJ9XX19")), "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.



819
820
821
# File 'events/cfn_rule.rb', line 819

def array_properties
  @array_properties
end

#job_definitionString (readonly)

The ARN or name of the job definition to use if the event target is an AWS Batch job.

This job definition must already exist.



807
808
809
# File 'events/cfn_rule.rb', line 807

def job_definition
  @job_definition
end

#job_nameString (readonly)

The name to use for this execution of the job, if the target is an AWS Batch job.



812
813
814
# File 'events/cfn_rule.rb', line 812

def job_name
  @job_name
end

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

The retry strategy to use for failed jobs, if the target is an AWS Batch job.

The retry strategy is the number of times to retry the failed job execution. Valid values are 1–10. When you specify a retry strategy here, it overrides the retry strategy defined in the job definition.



826
827
828
# File 'events/cfn_rule.rb', line 826

def retry_strategy
  @retry_strategy
end

Class Method Details

.jsii_propertiesObject



828
829
830
831
832
833
834
835
# File 'events/cfn_rule.rb', line 828

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

Instance Method Details

#to_jsiiObject



837
838
839
840
841
842
843
844
845
846
# File 'events/cfn_rule.rb', line 837

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