Class: AWSCDK::Batch::UnmanagedComputeEnvironmentProps
- Inherits:
-
ComputeEnvironmentProps
- Object
- ComputeEnvironmentProps
- AWSCDK::Batch::UnmanagedComputeEnvironmentProps
- Defined in:
- batch/unmanaged_compute_environment_props.rb
Overview
Represents an UnmanagedComputeEnvironment.
Batch will not provision instances on your behalf in this ComputeEvironment.
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.
-
#unmanagedv_cpus ⇒ Numeric?
readonly
The vCPUs this Compute Environment provides.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(compute_environment_name: nil, enabled: nil, service_role: nil, unmanagedv_cpus: nil) ⇒ UnmanagedComputeEnvironmentProps
constructor
A new instance of UnmanagedComputeEnvironmentProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(compute_environment_name: nil, enabled: nil, service_role: nil, unmanagedv_cpus: nil) ⇒ UnmanagedComputeEnvironmentProps
Returns a new instance of UnmanagedComputeEnvironmentProps.
14 15 16 17 18 19 20 21 22 23 |
# File 'batch/unmanaged_compute_environment_props.rb', line 14 def initialize(compute_environment_name: nil, enabled: nil, service_role: nil, unmanagedv_cpus: 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? @unmanagedv_cpus = unmanagedv_cpus Jsii::Type.check_type(@unmanagedv_cpus, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "unmanagedvCpus") unless @unmanagedv_cpus.nil? end |
Instance Attribute Details
#compute_environment_name ⇒ String? (readonly)
Default: - generated by CloudFormation
The name of the ComputeEnvironment.
29 30 31 |
# File 'batch/unmanaged_compute_environment_props.rb', line 29 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.
45 46 47 |
# File 'batch/unmanaged_compute_environment_props.rb', line 45 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.
50 51 52 |
# File 'batch/unmanaged_compute_environment_props.rb', line 50 def service_role @service_role end |
#unmanagedv_cpus ⇒ Numeric? (readonly)
Default: 0
The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs in Queues that use FairshareSchedulingPolicys.
If this parameter is not provided on a fairshare queue, no capacity is reserved;
that is, the FairshareSchedulingPolicy is ignored.
58 59 60 |
# File 'batch/unmanaged_compute_environment_props.rb', line 58 def unmanagedv_cpus @unmanagedv_cpus end |
Class Method Details
.jsii_properties ⇒ Object
60 61 62 63 64 65 66 67 |
# File 'batch/unmanaged_compute_environment_props.rb', line 60 def self.jsii_properties { :compute_environment_name => "computeEnvironmentName", :enabled => "enabled", :service_role => "serviceRole", :unmanagedv_cpus => "unmanagedvCpus", } end |
Instance Method Details
#to_jsii ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 |
# File 'batch/unmanaged_compute_environment_props.rb', line 69 def to_jsii result = {} result.merge!(super) result.merge!({ "computeEnvironmentName" => @compute_environment_name, "enabled" => @enabled, "serviceRole" => @service_role, "unmanagedvCpus" => @unmanagedv_cpus, }) result.compact end |