Class: AWSCDK::Batch::ComputeEnvironmentProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::ComputeEnvironmentProps
- Defined in:
- batch/compute_environment_props.rb
Overview
Props common to all ComputeEnvironments.
Direct Known Subclasses
ManagedComputeEnvironmentProps, UnmanagedComputeEnvironmentProps
Instance Attribute Summary collapse
-
#compute_environment_name ⇒ String?
readonly
The name of the ComputeEnvironment.
-
#enabled ⇒ Boolean?
readonly
Whether or not this ComputeEnvironment can accept jobs from a Queue.
-
#service_role ⇒ AWSCDK::IAM::IRole?
readonly
The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(compute_environment_name: nil, enabled: nil, service_role: nil) ⇒ ComputeEnvironmentProps
constructor
A new instance of ComputeEnvironmentProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(compute_environment_name: nil, enabled: nil, service_role: nil) ⇒ ComputeEnvironmentProps
Returns a new instance of ComputeEnvironmentProps.
10 11 12 13 14 15 16 17 |
# File 'batch/compute_environment_props.rb', line 10 def initialize(compute_environment_name: nil, enabled: nil, service_role: nil) @compute_environment_name = compute_environment_name Jsii::Type.check_type(@compute_environment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "computeEnvironmentName") unless @compute_environment_name.nil? @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil? @service_role = service_role Jsii::Type.check_type(@service_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "serviceRole") unless @service_role.nil? end |
Instance Attribute Details
#compute_environment_name ⇒ String? (readonly)
Default: - generated by CloudFormation
The name of the ComputeEnvironment.
23 24 25 |
# File 'batch/compute_environment_props.rb', line 23 def compute_environment_name @compute_environment_name end |
#enabled ⇒ Boolean? (readonly)
Default: true
Whether or not this ComputeEnvironment can accept jobs from a Queue.
Enabled ComputeEnvironments can accept jobs from a Queue and can scale instances up or down. Disabled ComputeEnvironments cannot accept jobs from a Queue or scale instances up or down.
If you change a ComputeEnvironment from enabled to disabled while it is executing jobs,
Jobs in the STARTED or RUNNING states will not
be interrupted. As jobs complete, the ComputeEnvironment will scale instances down to minv_cpus.
To ensure you aren't billed for unused capacity, set minv_cpus to 0.
39 40 41 |
# File 'batch/compute_environment_props.rb', line 39 def enabled @enabled end |
#service_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - a serviceRole will be created for managed CEs, none for unmanaged CEs
The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.
44 45 46 |
# File 'batch/compute_environment_props.rb', line 44 def service_role @service_role end |
Class Method Details
.jsii_properties ⇒ Object
46 47 48 49 50 51 52 |
# File 'batch/compute_environment_props.rb', line 46 def self.jsii_properties { :compute_environment_name => "computeEnvironmentName", :enabled => "enabled", :service_role => "serviceRole", } end |
Instance Method Details
#to_jsii ⇒ Object
54 55 56 57 58 59 60 61 62 |
# File 'batch/compute_environment_props.rb', line 54 def to_jsii result = {} result.merge!({ "computeEnvironmentName" => @compute_environment_name, "enabled" => @enabled, "serviceRole" => @service_role, }) result.compact end |