Module: AWSCDK::Batch::IJobDefinition
- Includes:
- IResource, Interfaces::AWSBatch::IJobDefinitionRef
- Included in:
- ECSJobDefinition, EKSJobDefinition, IEKSJobDefinition, MultiNodeJobDefinition
- Defined in:
- batch/i_job_definition.rb
Overview
Represents a JobDefinition.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_retry_strategy(strategy) ⇒ void
Add a RetryStrategy to this JobDefinition.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#job_definition_arn ⇒ String
The ARN of this job definition.
-
#job_definition_name ⇒ String
The name of this job definition.
-
#job_definition_ref ⇒ AWSCDK::Interfaces::AWSBatch::JobDefinitionReference
A reference to a JobDefinition resource.
-
#node ⇒ Constructs::Node
The tree node.
-
#parameters ⇒ Hash{String => Object}?
The default parameters passed to the container These parameters can be referenced in the
commandthat you give to the container. -
#retry_attempts ⇒ Numeric?
The number of times to retry a job.
-
#retry_strategies ⇒ Array<AWSCDK::Batch::RetryStrategy>
Defines the retry behavior for this job.
-
#scheduling_priority ⇒ Numeric?
The priority of this Job.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#timeout ⇒ AWSCDK::Duration?
The timeout time for jobs that are submitted with this job definition.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'batch/i_job_definition.rb', line 149 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :job_definition_ref => { kind: :property, name: "jobDefinitionRef", is_optional: false }, :job_definition_arn => { kind: :property, name: "jobDefinitionArn", is_optional: false }, :job_definition_name => { kind: :property, name: "jobDefinitionName", is_optional: false }, :retry_strategies => { kind: :property, name: "retryStrategies", is_optional: false }, :parameters => { kind: :property, name: "parameters", is_optional: true }, :retry_attempts => { kind: :property, name: "retryAttempts", is_optional: true }, :scheduling_priority => { kind: :property, name: "schedulingPriority", is_optional: true }, :timeout => { kind: :property, name: "timeout", is_optional: true }, :with => { kind: :method, name: "with", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :add_retry_strategy => { kind: :method, name: "addRetryStrategy", is_optional: false }, } end |
Instance Method Details
#add_retry_strategy(strategy) ⇒ void
This method returns an undefined value.
Add a RetryStrategy to this JobDefinition.
144 145 146 147 |
# File 'batch/i_job_definition.rb', line 144 def add_retry_strategy(strategy) Jsii::Type.check_type(strategy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guUmV0cnlTdHJhdGVneSJ9")), "strategy") jsii_call_method("addRetryStrategy", [strategy]) end |
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
135 136 137 138 |
# File 'batch/i_job_definition.rb', line 135 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
27 28 29 |
# File 'batch/i_job_definition.rb', line 27 def env() jsii_get_property("env") end |
#job_definition_arn ⇒ String
The ARN of this job definition.
48 49 50 |
# File 'batch/i_job_definition.rb', line 48 def job_definition_arn() jsii_get_property("jobDefinitionArn") end |
#job_definition_name ⇒ String
The name of this job definition.
55 56 57 |
# File 'batch/i_job_definition.rb', line 55 def job_definition_name() jsii_get_property("jobDefinitionName") end |
#job_definition_ref ⇒ AWSCDK::Interfaces::AWSBatch::JobDefinitionReference
A reference to a JobDefinition resource.
41 42 43 |
# File 'batch/i_job_definition.rb', line 41 def job_definition_ref() jsii_get_property("jobDefinitionRef") end |
#node ⇒ Constructs::Node
The tree node.
12 13 14 |
# File 'batch/i_job_definition.rb', line 12 def node() jsii_get_property("node") end |
#parameters ⇒ Hash{String => Object}?
Default: none
The default parameters passed to the container These parameters can be referenced in the command that you give to the container.
72 73 74 |
# File 'batch/i_job_definition.rb', line 72 def parameters() jsii_get_property("parameters") end |
#retry_attempts ⇒ Numeric?
Default: 1
The number of times to retry a job.
The job is retried on failure the same number of attempts as the value.
82 83 84 |
# File 'batch/i_job_definition.rb', line 82 def retry_attempts() jsii_get_property("retryAttempts") end |
#retry_strategies ⇒ Array<AWSCDK::Batch::RetryStrategy>
Default: - no RetryStrategy
Defines the retry behavior for this job.
63 64 65 |
# File 'batch/i_job_definition.rb', line 63 def retry_strategies() jsii_get_property("retryStrategies") end |
#scheduling_priority ⇒ Numeric?
Default: none
The priority of this Job.
Only used in Fairshare Scheduling to decide which job to run first when there are multiple jobs with the same share identifier.
94 95 96 |
# File 'batch/i_job_definition.rb', line 94 def scheduling_priority() jsii_get_property("schedulingPriority") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
34 35 36 |
# File 'batch/i_job_definition.rb', line 34 def stack() jsii_get_property("stack") end |
#timeout ⇒ AWSCDK::Duration?
Default: - no timeout
The timeout time for jobs that are submitted with this job definition.
After the amount of time you specify passes, Batch terminates your jobs if they aren't finished.
105 106 107 |
# File 'batch/i_job_definition.rb', line 105 def timeout() jsii_get_property("timeout") end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
116 117 118 119 120 121 |
# File 'batch/i_job_definition.rb', line 116 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |