You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Batch::Types::CreateComputeEnvironmentRequest

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing CreateComputeEnvironmentRequest as input to an Aws::Client method, you can use a vanilla Hash:

{
  compute_environment_name: "String", # required
  type: "MANAGED", # required, accepts MANAGED, UNMANAGED
  state: "ENABLED", # accepts ENABLED, DISABLED
  compute_resources: {
    type: "EC2", # required, accepts EC2, SPOT
    allocation_strategy: "BEST_FIT", # accepts BEST_FIT, BEST_FIT_PROGRESSIVE, SPOT_CAPACITY_OPTIMIZED
    minv_cpus: 1, # required
    maxv_cpus: 1, # required
    desiredv_cpus: 1,
    instance_types: ["String"], # required
    image_id: "String",
    subnets: ["String"], # required
    security_group_ids: ["String"],
    ec2_key_pair: "String",
    instance_role: "String", # required
    tags: {
      "String" => "String",
    },
    placement_group: "String",
    bid_percentage: 1,
    spot_iam_fleet_role: "String",
    launch_template: {
      launch_template_id: "String",
      launch_template_name: "String",
      version: "String",
    },
  },
  service_role: "String", # required
  tags: {
    "TagKey" => "TagValue",
  },
}

Instance Attribute Summary collapse

Instance Attribute Details

#compute_environment_nameString

The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.

Returns:

  • (String)

    The name for your compute environment.

#compute_resourcesTypes::ComputeResource

Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. For more information, see Compute Environments in the AWS Batch User Guide.

Returns:

#service_roleString

The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.

If your specified role has a path other than /, then you must either specify the full role ARN (this is recommended) or prefix the role name with the path.

Depending on how you created your AWS Batch service role, its ARN may contain the service-role path prefix. When you only specify the name of the service role, AWS Batch assumes that your ARN does not use the service-role path prefix. Because of this, we recommend that you specify the full ARN of your service role when you create compute environments.

Returns:

  • (String)

    The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.

#stateString

The state of the compute environment. If the state is ENABLED, then the compute environment accepts jobs from a queue and can scale out automatically based on queues.

Possible values:

  • ENABLED
  • DISABLED

Returns:

  • (String)

    The state of the compute environment.

#tagsHash<String,String>

The tags that you apply to the compute environment to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging AWS Resources in AWS General Reference.

These tags can be updated or removed using the TagResource and UntagResource API operations. These tags do not propagate to the underlying compute resources.

Returns:

  • (Hash<String,String>)

    The tags that you apply to the compute environment to help you categorize and organize your resources.

#typeString

The type of the compute environment. For more information, see Compute Environments in the AWS Batch User Guide.

Returns:

  • (String)

    The type of the compute environment.