Class: AWSCDK::Batch::ManagedEC2ECSComputeEnvironmentProps

Inherits:
ManagedEC2ComputeEnvironmentProps
  • Object
show all
Defined in:
batch/managed_ec2_ecs_compute_environment_props.rb

Overview

Props for a ManagedEc2EcsComputeEnvironment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(compute_environment_name: nil, enabled: nil, service_role: nil, vpc:, maxv_cpus: nil, replace_compute_environment: nil, security_groups: nil, spot: nil, terminate_on_update: nil, update_timeout: nil, update_to_latest_image_version: nil, vpc_subnets: nil, instance_classes: nil, instance_types: nil, allocation_strategy: nil, default_instance_classes: nil, images: nil, instance_role: nil, launch_template: nil, minv_cpus: nil, placement_group: nil, spot_bid_percentage: nil, spot_fleet_role: nil, use_optimal_instance_classes: nil) ⇒ ManagedEC2ECSComputeEnvironmentProps

Returns a new instance of ManagedEC2ECSComputeEnvironmentProps.

Parameters:

  • compute_environment_name (String, nil) (defaults to: nil)

    The name of the ComputeEnvironment.

  • enabled (Boolean, nil) (defaults to: nil)

    Whether or not this ComputeEnvironment can accept jobs from a Queue.

  • service_role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.

  • vpc (AWSCDK::EC2::IVPC)

    VPC in which this Compute Environment will launch Instances.

  • maxv_cpus (Numeric, nil) (defaults to: nil)

    The maximum vCpus this ManagedComputeEnvironment can scale up to. Each vCPU is equivalent to 1024 CPU shares.

  • replace_compute_environment (Boolean, nil) (defaults to: nil)

    Specifies whether this Compute Environment is replaced if an update is made that requires replacing its instances.

  • security_groups (Array<AWSCDK::EC2::ISecurityGroup>, nil) (defaults to: nil)

    The security groups this Compute Environment will launch instances in.

  • spot (Boolean, nil) (defaults to: nil)

    Whether or not to use spot instances.

  • terminate_on_update (Boolean, nil) (defaults to: nil)

    Whether or not any running jobs will be immediately terminated when an infrastructure update occurs.

  • update_timeout (AWSCDK::Duration, nil) (defaults to: nil)

    Only meaningful if terminateOnUpdate is false.

  • update_to_latest_image_version (Boolean, nil) (defaults to: nil)

    Whether or not the AMI is updated to the latest one supported by Batch when an infrastructure update occurs.

  • vpc_subnets (AWSCDK::EC2::SubnetSelection, nil) (defaults to: nil)

    The VPC Subnets this Compute Environment will launch instances in.

  • instance_classes (Array<AWSCDK::EC2::InstanceClass>, nil) (defaults to: nil)

    The instance classes that this Compute Environment can launch.

  • instance_types (Array<AWSCDK::EC2::InstanceType>, nil) (defaults to: nil)

    The instance types that this Compute Environment can launch.

  • allocation_strategy (AWSCDK::Batch::AllocationStrategy, nil) (defaults to: nil)

    The allocation strategy to use if not enough instances of the best fitting instance type can be allocated.

  • default_instance_classes (Array<AWSCDK::Batch::DefaultInstanceClass>, nil) (defaults to: nil)

    Use batch's default instance types.

  • images (Array<AWSCDK::Batch::ECSMachineImage>, nil) (defaults to: nil)

    Configure which AMIs this Compute Environment can launch.

  • instance_role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The execution Role that instances launched by this Compute Environment will use.

  • launch_template (AWSCDK::EC2::ILaunchTemplate, nil) (defaults to: nil)

    The Launch Template that this Compute Environment will use to provision EC2 Instances.

  • minv_cpus (Numeric, nil) (defaults to: nil)

    The minimum vCPUs that an environment should maintain, even if the compute environment is DISABLED.

  • placement_group (AWSCDK::Interfaces::AWSEC2::IPlacementGroupRef, nil) (defaults to: nil)

    The EC2 placement group to associate with your compute resources.

  • spot_bid_percentage (Numeric, nil) (defaults to: nil)

    The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.

  • spot_fleet_role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The service-linked role that Spot Fleet needs to launch instances on your behalf.

  • use_optimal_instance_classes (Boolean, nil) (defaults to: nil)

    Whether or not to use batch's optimal instance type.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 31

def initialize(compute_environment_name: nil, enabled: nil, service_role: nil, vpc:, maxv_cpus: nil, replace_compute_environment: nil, security_groups: nil, spot: nil, terminate_on_update: nil, update_timeout: nil, update_to_latest_image_version: nil, vpc_subnets: nil, instance_classes: nil, instance_types: nil, allocation_strategy: nil, default_instance_classes: nil, images: nil, instance_role: nil, launch_template: nil, minv_cpus: nil, placement_group: nil, spot_bid_percentage: nil, spot_fleet_role: nil, use_optimal_instance_classes: 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?
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc")
  @maxv_cpus = maxv_cpus
  Jsii::Type.check_type(@maxv_cpus, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxvCpus") unless @maxv_cpus.nil?
  @replace_compute_environment = replace_compute_environment
  Jsii::Type.check_type(@replace_compute_environment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "replaceComputeEnvironment") unless @replace_compute_environment.nil?
  @security_groups = security_groups
  Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil?
  @spot = spot
  Jsii::Type.check_type(@spot, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "spot") unless @spot.nil?
  @terminate_on_update = terminate_on_update
  Jsii::Type.check_type(@terminate_on_update, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "terminateOnUpdate") unless @terminate_on_update.nil?
  @update_timeout = update_timeout
  Jsii::Type.check_type(@update_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "updateTimeout") unless @update_timeout.nil?
  @update_to_latest_image_version = update_to_latest_image_version
  Jsii::Type.check_type(@update_to_latest_image_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "updateToLatestImageVersion") unless @update_to_latest_image_version.nil?
  @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets
  Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil?
  @instance_classes = instance_classes
  Jsii::Type.check_type(@instance_classes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSW5zdGFuY2VDbGFzcyJ9LCJraW5kIjoiYXJyYXkifX0=")), "instanceClasses") unless @instance_classes.nil?
  @instance_types = instance_types
  Jsii::Type.check_type(@instance_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSW5zdGFuY2VUeXBlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "instanceTypes") unless @instance_types.nil?
  @allocation_strategy = allocation_strategy
  Jsii::Type.check_type(@allocation_strategy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQWxsb2NhdGlvblN0cmF0ZWd5In0=")), "allocationStrategy") unless @allocation_strategy.nil?
  @default_instance_classes = default_instance_classes
  Jsii::Type.check_type(@default_instance_classes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5EZWZhdWx0SW5zdGFuY2VDbGFzcyJ9LCJraW5kIjoiYXJyYXkifX0=")), "defaultInstanceClasses") unless @default_instance_classes.nil?
  @images = images.is_a?(Array) ? images.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::Batch::ECSMachineImage.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : images
  Jsii::Type.check_type(@images, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5FY3NNYWNoaW5lSW1hZ2UifSwia2luZCI6ImFycmF5In19")), "images") unless @images.nil?
  @instance_role = instance_role
  Jsii::Type.check_type(@instance_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "instanceRole") unless @instance_role.nil?
  @launch_template = launch_template
  Jsii::Type.check_type(@launch_template, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklMYXVuY2hUZW1wbGF0ZSJ9")), "launchTemplate") unless @launch_template.nil?
  @minv_cpus = minv_cpus
  Jsii::Type.check_type(@minv_cpus, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minvCpus") unless @minv_cpus.nil?
  @placement_group = placement_group
  Jsii::Type.check_type(@placement_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVBsYWNlbWVudEdyb3VwUmVmIn0=")), "placementGroup") unless @placement_group.nil?
  @spot_bid_percentage = spot_bid_percentage
  Jsii::Type.check_type(@spot_bid_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "spotBidPercentage") unless @spot_bid_percentage.nil?
  @spot_fleet_role = spot_fleet_role
  Jsii::Type.check_type(@spot_fleet_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "spotFleetRole") unless @spot_fleet_role.nil?
  @use_optimal_instance_classes = use_optimal_instance_classes
  Jsii::Type.check_type(@use_optimal_instance_classes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "useOptimalInstanceClasses") unless @use_optimal_instance_classes.nil?
end

Instance Attribute Details

#allocation_strategyAWSCDK::Batch::AllocationStrategy? (readonly)

Note:

Default: - BEST_FIT_PROGRESSIVE if not using Spot instances, SPOT_PRICE_CAPACITY_OPTIMIZED if using Spot instances.

The allocation strategy to use if not enough instances of the best fitting instance type can be allocated.



208
209
210
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 208

def allocation_strategy
  @allocation_strategy
end

#compute_environment_nameString? (readonly)

Note:

Default: - generated by CloudFormation

The name of the ComputeEnvironment.

Returns:

  • (String, nil)


86
87
88
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 86

def compute_environment_name
  @compute_environment_name
end

#default_instance_classesArray<AWSCDK::Batch::DefaultInstanceClass>? (readonly)

Note:

Default: - choose from instanceTypes and instanceClasses

Use batch's default instance types.

A simpler way to choose up-to-date instance classes based on region instead of specifying exact instance classes.



217
218
219
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 217

def default_instance_classes
  @default_instance_classes
end

#enabledBoolean? (readonly)

Note:

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.

Returns:

  • (Boolean, nil)


102
103
104
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 102

def enabled
  @enabled
end

#imagesArray<AWSCDK::Batch::ECSMachineImage>? (readonly)

Note:

Default: - ECS_AL2 for non-GPU instances, ECS_AL2_NVIDIA for GPU instances. If the '@aws-cdk/aws-batch:defaultToAL2023' feature flag is set, ECS_AL2023 will be used instead of ECS_AL2.

Configure which AMIs this Compute Environment can launch.

If you specify this property with only image specified, then the image_type will default to ECS_AL2 (or ECS_AL2023 if the @aws-cdk/aws-batch:defaultToAL2023 feature flag is set). If your image needs GPU resources, specify ECS_AL2_NVIDIA or ECS_AL2023_NVIDIA; otherwise, the instances will not be able to properly join the ComputeEnvironment.

Returns:



229
230
231
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 229

def images
  @images
end

#instance_classesArray<AWSCDK::EC2::InstanceClass>? (readonly)

Note:

Default: - the instances Batch considers will be used (currently C4, M4, and R4)

The instance classes that this Compute Environment can launch.

Which one is chosen depends on the AllocationStrategy used. Batch will automatically choose the instance size.

Returns:



196
197
198
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 196

def instance_classes
  @instance_classes
end

#instance_roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - a role will be created

The execution Role that instances launched by this Compute Environment will use.

Returns:



234
235
236
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 234

def instance_role
  @instance_role
end

#instance_typesArray<AWSCDK::EC2::InstanceType>? (readonly)

Note:

Default: - the instances Batch considers will be used (currently C4, M4, and R4)

The instance types that this Compute Environment can launch.

Which one is chosen depends on the AllocationStrategy used.

Returns:



203
204
205
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 203

def instance_types
  @instance_types
end

#launch_templateAWSCDK::EC2::ILaunchTemplate? (readonly)

Note:

Default: no launch template

The Launch Template that this Compute Environment will use to provision EC2 Instances.

Note: if security_groups is specified on both your launch template and this Compute Environment, **the security_groups on the Compute Environment override the ones on the launch template.



244
245
246
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 244

def launch_template
  @launch_template
end

#maxv_cpusNumeric? (readonly)

Note:

Default: 256

The maximum vCpus this ManagedComputeEnvironment can scale up to. Each vCPU is equivalent to 1024 CPU shares.

Note: if this Compute Environment uses EC2 resources (not Fargate) with either AllocationStrategy.BEST_FIT_PROGRESSIVE or AllocationStrategy.SPOT_CAPACITY_OPTIMIZED, or AllocationStrategy.BEST_FIT with Spot instances, The scheduler may exceed this number by at most one of the instances specified in instance_types or instance_classes.

Returns:

  • (Numeric, nil)


121
122
123
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 121

def maxv_cpus
  @maxv_cpus
end

#minv_cpusNumeric? (readonly)

Note:

Default: 0

The minimum vCPUs that an environment should maintain, even if the compute environment is DISABLED.

Returns:

  • (Numeric, nil)


249
250
251
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 249

def minv_cpus
  @minv_cpus
end

#placement_groupAWSCDK::Interfaces::AWSEC2::IPlacementGroupRef? (readonly)

Note:

Default: - no placement group

The EC2 placement group to associate with your compute resources.

If you intend to submit multi-node parallel jobs to this Compute Environment, you should consider creating a cluster placement group and associate it with your compute resources. This keeps your multi-node parallel job on a logical grouping of instances within a single Availability Zone with high network flow potential.



260
261
262
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 260

def placement_group
  @placement_group
end

#replace_compute_environmentBoolean? (readonly)

Note:

Default: false

Specifies whether this Compute Environment is replaced if an update is made that requires replacing its instances.

To enable more properties to be updated, set this property to false. When changing the value of this property to false, do not change any other properties at the same time. If other properties are changed at the same time, and the change needs to be rolled back but it can't, it's possible for the stack to go into the UPDATE_ROLLBACK_FAILED state. You can't update a stack that is in the UPDATE_ROLLBACK_FAILED state. However, if you can continue to roll it back, you can return the stack to its original settings and then try to update it again.

The properties which require a replacement of the Compute Environment are:



139
140
141
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 139

def replace_compute_environment
  @replace_compute_environment
end

#security_groupsArray<AWSCDK::EC2::ISecurityGroup>? (readonly)

Note:

Default: new security groups will be created

The security groups this Compute Environment will launch instances in.

Returns:



144
145
146
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 144

def security_groups
  @security_groups
end

#service_roleAWSCDK::IAM::IRole? (readonly)

Note:

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.

Returns:



107
108
109
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 107

def service_role
  @service_role
end

#spotBoolean? (readonly)

Note:

Default: false

Whether or not to use spot instances.

Spot instances are less expensive EC2 instances that can be reclaimed by EC2 at any time; your job will be given two minutes of notice before reclamation.

Returns:

  • (Boolean, nil)


153
154
155
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 153

def spot
  @spot
end

#spot_bid_percentageNumeric? (readonly)

Note:

Default: 100%

The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.

For example, if your maximum percentage is 20%, the Spot price must be less than 20% of the current On-Demand price for that Instance. You always pay the lowest market price and never more than your maximum percentage. For most use cases, Batch recommends leaving this field empty.

Implies spot == true if set

Returns:

  • (Numeric, nil)


272
273
274
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 272

def spot_bid_percentage
  @spot_bid_percentage
end

#spot_fleet_roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - a new role will be created

The service-linked role that Spot Fleet needs to launch instances on your behalf.



278
279
280
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 278

def spot_fleet_role
  @spot_fleet_role
end

#terminate_on_updateBoolean? (readonly)

Note:

Default: false

Whether or not any running jobs will be immediately terminated when an infrastructure update occurs.

If this is enabled, any terminated jobs may be retried, depending on the job's retry policy.



162
163
164
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 162

def terminate_on_update
  @terminate_on_update
end

#update_timeoutAWSCDK::Duration? (readonly)

Note:

Default: 30 minutes

Only meaningful if terminateOnUpdate is false.

If so, when an infrastructure update is triggered, any running jobs will be allowed to run until update_timeout has expired.



172
173
174
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 172

def update_timeout
  @update_timeout
end

#update_to_latest_image_versionBoolean? (readonly)

Note:

Default: false

Whether or not the AMI is updated to the latest one supported by Batch when an infrastructure update occurs.

If you specify a specific AMI, this property will be ignored.

Note: the CDK will never set this value by default, false will set by CFN. This is to avoid a deployment failure that occurs when this value is set.

Returns:

  • (Boolean, nil)

See Also:



183
184
185
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 183

def update_to_latest_image_version
  @update_to_latest_image_version
end

#use_optimal_instance_classesBoolean? (readonly)

Note:

Default: true

Whether or not to use batch's optimal instance type.

The optimal instance type is equivalent to adding the C4, M4, and R4 instance classes. You can specify other instance classes (of the same architecture) in addition to the optimal instance classes.

Returns:

  • (Boolean, nil)


287
288
289
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 287

def use_optimal_instance_classes
  @use_optimal_instance_classes
end

#vpcAWSCDK::EC2::IVPC (readonly)

VPC in which this Compute Environment will launch Instances.

Returns:



111
112
113
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 111

def vpc
  @vpc
end

#vpc_subnetsAWSCDK::EC2::SubnetSelection? (readonly)

Note:

Default: new subnets will be created

The VPC Subnets this Compute Environment will launch instances in.



188
189
190
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 188

def vpc_subnets
  @vpc_subnets
end

Class Method Details

.jsii_propertiesObject



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 289

def self.jsii_properties
  {
    :compute_environment_name => "computeEnvironmentName",
    :enabled => "enabled",
    :service_role => "serviceRole",
    :vpc => "vpc",
    :maxv_cpus => "maxvCpus",
    :replace_compute_environment => "replaceComputeEnvironment",
    :security_groups => "securityGroups",
    :spot => "spot",
    :terminate_on_update => "terminateOnUpdate",
    :update_timeout => "updateTimeout",
    :update_to_latest_image_version => "updateToLatestImageVersion",
    :vpc_subnets => "vpcSubnets",
    :instance_classes => "instanceClasses",
    :instance_types => "instanceTypes",
    :allocation_strategy => "allocationStrategy",
    :default_instance_classes => "defaultInstanceClasses",
    :images => "images",
    :instance_role => "instanceRole",
    :launch_template => "launchTemplate",
    :minv_cpus => "minvCpus",
    :placement_group => "placementGroup",
    :spot_bid_percentage => "spotBidPercentage",
    :spot_fleet_role => "spotFleetRole",
    :use_optimal_instance_classes => "useOptimalInstanceClasses",
  }
end

Instance Method Details

#to_jsiiObject



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'batch/managed_ec2_ecs_compute_environment_props.rb', line 318

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "computeEnvironmentName" => @compute_environment_name,
    "enabled" => @enabled,
    "serviceRole" => @service_role,
    "vpc" => @vpc,
    "maxvCpus" => @maxv_cpus,
    "replaceComputeEnvironment" => @replace_compute_environment,
    "securityGroups" => @security_groups,
    "spot" => @spot,
    "terminateOnUpdate" => @terminate_on_update,
    "updateTimeout" => @update_timeout,
    "updateToLatestImageVersion" => @update_to_latest_image_version,
    "vpcSubnets" => @vpc_subnets,
    "instanceClasses" => @instance_classes,
    "instanceTypes" => @instance_types,
    "allocationStrategy" => @allocation_strategy,
    "defaultInstanceClasses" => @default_instance_classes,
    "images" => @images,
    "instanceRole" => @instance_role,
    "launchTemplate" => @launch_template,
    "minvCpus" => @minv_cpus,
    "placementGroup" => @placement_group,
    "spotBidPercentage" => @spot_bid_percentage,
    "spotFleetRole" => @spot_fleet_role,
    "useOptimalInstanceClasses" => @use_optimal_instance_classes,
  })
  result.compact
end