1. Packages
  2. AWS
  3. API Docs
  4. batch
  5. ComputeEnvironment
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.batch.ComputeEnvironment

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Creates a AWS Batch compute environment. Compute environments contain the Amazon ECS container instances that are used to run containerized batch jobs.

    For information about AWS Batch, see What is AWS Batch? . For information about compute environment, see Compute Environments .

    Note: To prevent a race condition during environment deletion, make sure to set depends_on to the related aws.iam.RolePolicyAttachment; otherwise, the policy may be destroyed too soon and the compute environment will then get stuck in the DELETING state, see Troubleshooting AWS Batch .

    Example Usage

    EC2 Type

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const ec2AssumeRole = aws.iam.getPolicyDocument({
        statements: [{
            effect: "Allow",
            principals: [{
                type: "Service",
                identifiers: ["ec2.amazonaws.com"],
            }],
            actions: ["sts:AssumeRole"],
        }],
    });
    const ecsInstanceRole = new aws.iam.Role("ecs_instance_role", {
        name: "ecs_instance_role",
        assumeRolePolicy: ec2AssumeRole.then(ec2AssumeRole => ec2AssumeRole.json),
    });
    const ecsInstanceRoleRolePolicyAttachment = new aws.iam.RolePolicyAttachment("ecs_instance_role", {
        role: ecsInstanceRole.name,
        policyArn: "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role",
    });
    const ecsInstanceRoleInstanceProfile = new aws.iam.InstanceProfile("ecs_instance_role", {
        name: "ecs_instance_role",
        role: ecsInstanceRole.name,
    });
    const batchAssumeRole = aws.iam.getPolicyDocument({
        statements: [{
            effect: "Allow",
            principals: [{
                type: "Service",
                identifiers: ["batch.amazonaws.com"],
            }],
            actions: ["sts:AssumeRole"],
        }],
    });
    const awsBatchServiceRole = new aws.iam.Role("aws_batch_service_role", {
        name: "aws_batch_service_role",
        assumeRolePolicy: batchAssumeRole.then(batchAssumeRole => batchAssumeRole.json),
    });
    const awsBatchServiceRoleRolePolicyAttachment = new aws.iam.RolePolicyAttachment("aws_batch_service_role", {
        role: awsBatchServiceRole.name,
        policyArn: "arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole",
    });
    const sample = new aws.ec2.SecurityGroup("sample", {
        name: "aws_batch_compute_environment_security_group",
        egress: [{
            fromPort: 0,
            toPort: 0,
            protocol: "-1",
            cidrBlocks: ["0.0.0.0/0"],
        }],
    });
    const sampleVpc = new aws.ec2.Vpc("sample", {cidrBlock: "10.1.0.0/16"});
    const sampleSubnet = new aws.ec2.Subnet("sample", {
        vpcId: sampleVpc.id,
        cidrBlock: "10.1.1.0/24",
    });
    const samplePlacementGroup = new aws.ec2.PlacementGroup("sample", {
        name: "sample",
        strategy: aws.ec2.PlacementStrategy.Cluster,
    });
    const sampleComputeEnvironment = new aws.batch.ComputeEnvironment("sample", {
        computeEnvironmentName: "sample",
        computeResources: {
            instanceRole: ecsInstanceRoleInstanceProfile.arn,
            instanceTypes: ["c4.large"],
            maxVcpus: 16,
            minVcpus: 0,
            placementGroup: samplePlacementGroup.name,
            securityGroupIds: [sample.id],
            subnets: [sampleSubnet.id],
            type: "EC2",
        },
        serviceRole: awsBatchServiceRole.arn,
        type: "MANAGED",
    }, {
        dependsOn: [awsBatchServiceRoleRolePolicyAttachment],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    ec2_assume_role = aws.iam.get_policy_document(statements=[{
        "effect": "Allow",
        "principals": [{
            "type": "Service",
            "identifiers": ["ec2.amazonaws.com"],
        }],
        "actions": ["sts:AssumeRole"],
    }])
    ecs_instance_role = aws.iam.Role("ecs_instance_role",
        name="ecs_instance_role",
        assume_role_policy=ec2_assume_role.json)
    ecs_instance_role_role_policy_attachment = aws.iam.RolePolicyAttachment("ecs_instance_role",
        role=ecs_instance_role.name,
        policy_arn="arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role")
    ecs_instance_role_instance_profile = aws.iam.InstanceProfile("ecs_instance_role",
        name="ecs_instance_role",
        role=ecs_instance_role.name)
    batch_assume_role = aws.iam.get_policy_document(statements=[{
        "effect": "Allow",
        "principals": [{
            "type": "Service",
            "identifiers": ["batch.amazonaws.com"],
        }],
        "actions": ["sts:AssumeRole"],
    }])
    aws_batch_service_role = aws.iam.Role("aws_batch_service_role",
        name="aws_batch_service_role",
        assume_role_policy=batch_assume_role.json)
    aws_batch_service_role_role_policy_attachment = aws.iam.RolePolicyAttachment("aws_batch_service_role",
        role=aws_batch_service_role.name,
        policy_arn="arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole")
    sample = aws.ec2.SecurityGroup("sample",
        name="aws_batch_compute_environment_security_group",
        egress=[{
            "from_port": 0,
            "to_port": 0,
            "protocol": "-1",
            "cidr_blocks": ["0.0.0.0/0"],
        }])
    sample_vpc = aws.ec2.Vpc("sample", cidr_block="10.1.0.0/16")
    sample_subnet = aws.ec2.Subnet("sample",
        vpc_id=sample_vpc.id,
        cidr_block="10.1.1.0/24")
    sample_placement_group = aws.ec2.PlacementGroup("sample",
        name="sample",
        strategy=aws.ec2.PlacementStrategy.CLUSTER)
    sample_compute_environment = aws.batch.ComputeEnvironment("sample",
        compute_environment_name="sample",
        compute_resources={
            "instance_role": ecs_instance_role_instance_profile.arn,
            "instance_types": ["c4.large"],
            "max_vcpus": 16,
            "min_vcpus": 0,
            "placement_group": sample_placement_group.name,
            "security_group_ids": [sample.id],
            "subnets": [sample_subnet.id],
            "type": "EC2",
        },
        service_role=aws_batch_service_role.arn,
        type="MANAGED",
        opts = pulumi.ResourceOptions(depends_on=[aws_batch_service_role_role_policy_attachment]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ec2AssumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    			Statements: []iam.GetPolicyDocumentStatement{
    				{
    					Effect: pulumi.StringRef("Allow"),
    					Principals: []iam.GetPolicyDocumentStatementPrincipal{
    						{
    							Type: "Service",
    							Identifiers: []string{
    								"ec2.amazonaws.com",
    							},
    						},
    					},
    					Actions: []string{
    						"sts:AssumeRole",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ecsInstanceRole, err := iam.NewRole(ctx, "ecs_instance_role", &iam.RoleArgs{
    			Name:             pulumi.String("ecs_instance_role"),
    			AssumeRolePolicy: pulumi.String(ec2AssumeRole.Json),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = iam.NewRolePolicyAttachment(ctx, "ecs_instance_role", &iam.RolePolicyAttachmentArgs{
    			Role:      ecsInstanceRole.Name,
    			PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role"),
    		})
    		if err != nil {
    			return err
    		}
    		ecsInstanceRoleInstanceProfile, err := iam.NewInstanceProfile(ctx, "ecs_instance_role", &iam.InstanceProfileArgs{
    			Name: pulumi.String("ecs_instance_role"),
    			Role: ecsInstanceRole.Name,
    		})
    		if err != nil {
    			return err
    		}
    		batchAssumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    			Statements: []iam.GetPolicyDocumentStatement{
    				{
    					Effect: pulumi.StringRef("Allow"),
    					Principals: []iam.GetPolicyDocumentStatementPrincipal{
    						{
    							Type: "Service",
    							Identifiers: []string{
    								"batch.amazonaws.com",
    							},
    						},
    					},
    					Actions: []string{
    						"sts:AssumeRole",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		awsBatchServiceRole, err := iam.NewRole(ctx, "aws_batch_service_role", &iam.RoleArgs{
    			Name:             pulumi.String("aws_batch_service_role"),
    			AssumeRolePolicy: pulumi.String(batchAssumeRole.Json),
    		})
    		if err != nil {
    			return err
    		}
    		awsBatchServiceRoleRolePolicyAttachment, err := iam.NewRolePolicyAttachment(ctx, "aws_batch_service_role", &iam.RolePolicyAttachmentArgs{
    			Role:      awsBatchServiceRole.Name,
    			PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole"),
    		})
    		if err != nil {
    			return err
    		}
    		sample, err := ec2.NewSecurityGroup(ctx, "sample", &ec2.SecurityGroupArgs{
    			Name: pulumi.String("aws_batch_compute_environment_security_group"),
    			Egress: ec2.SecurityGroupEgressArray{
    				&ec2.SecurityGroupEgressArgs{
    					FromPort: pulumi.Int(0),
    					ToPort:   pulumi.Int(0),
    					Protocol: pulumi.String("-1"),
    					CidrBlocks: pulumi.StringArray{
    						pulumi.String("0.0.0.0/0"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		sampleVpc, err := ec2.NewVpc(ctx, "sample", &ec2.VpcArgs{
    			CidrBlock: pulumi.String("10.1.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		sampleSubnet, err := ec2.NewSubnet(ctx, "sample", &ec2.SubnetArgs{
    			VpcId:     sampleVpc.ID(),
    			CidrBlock: pulumi.String("10.1.1.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		samplePlacementGroup, err := ec2.NewPlacementGroup(ctx, "sample", &ec2.PlacementGroupArgs{
    			Name:     pulumi.String("sample"),
    			Strategy: pulumi.String(ec2.PlacementStrategyCluster),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = batch.NewComputeEnvironment(ctx, "sample", &batch.ComputeEnvironmentArgs{
    			ComputeEnvironmentName: pulumi.String("sample"),
    			ComputeResources: &batch.ComputeEnvironmentComputeResourcesArgs{
    				InstanceRole: ecsInstanceRoleInstanceProfile.Arn,
    				InstanceTypes: pulumi.StringArray{
    					pulumi.String("c4.large"),
    				},
    				MaxVcpus:       pulumi.Int(16),
    				MinVcpus:       pulumi.Int(0),
    				PlacementGroup: samplePlacementGroup.Name,
    				SecurityGroupIds: pulumi.StringArray{
    					sample.ID(),
    				},
    				Subnets: pulumi.StringArray{
    					sampleSubnet.ID(),
    				},
    				Type: pulumi.String("EC2"),
    			},
    			ServiceRole: awsBatchServiceRole.Arn,
    			Type:        pulumi.String("MANAGED"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			awsBatchServiceRoleRolePolicyAttachment,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ec2AssumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Effect = "Allow",
                    Principals = new[]
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                        {
                            Type = "Service",
                            Identifiers = new[]
                            {
                                "ec2.amazonaws.com",
                            },
                        },
                    },
                    Actions = new[]
                    {
                        "sts:AssumeRole",
                    },
                },
            },
        });
    
        var ecsInstanceRole = new Aws.Iam.Role("ecs_instance_role", new()
        {
            Name = "ecs_instance_role",
            AssumeRolePolicy = ec2AssumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
        var ecsInstanceRoleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment("ecs_instance_role", new()
        {
            Role = ecsInstanceRole.Name,
            PolicyArn = "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role",
        });
    
        var ecsInstanceRoleInstanceProfile = new Aws.Iam.InstanceProfile("ecs_instance_role", new()
        {
            Name = "ecs_instance_role",
            Role = ecsInstanceRole.Name,
        });
    
        var batchAssumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Effect = "Allow",
                    Principals = new[]
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                        {
                            Type = "Service",
                            Identifiers = new[]
                            {
                                "batch.amazonaws.com",
                            },
                        },
                    },
                    Actions = new[]
                    {
                        "sts:AssumeRole",
                    },
                },
            },
        });
    
        var awsBatchServiceRole = new Aws.Iam.Role("aws_batch_service_role", new()
        {
            Name = "aws_batch_service_role",
            AssumeRolePolicy = batchAssumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
        var awsBatchServiceRoleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment("aws_batch_service_role", new()
        {
            Role = awsBatchServiceRole.Name,
            PolicyArn = "arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole",
        });
    
        var sample = new Aws.Ec2.SecurityGroup("sample", new()
        {
            Name = "aws_batch_compute_environment_security_group",
            Egress = new[]
            {
                new Aws.Ec2.Inputs.SecurityGroupEgressArgs
                {
                    FromPort = 0,
                    ToPort = 0,
                    Protocol = "-1",
                    CidrBlocks = new[]
                    {
                        "0.0.0.0/0",
                    },
                },
            },
        });
    
        var sampleVpc = new Aws.Ec2.Vpc("sample", new()
        {
            CidrBlock = "10.1.0.0/16",
        });
    
        var sampleSubnet = new Aws.Ec2.Subnet("sample", new()
        {
            VpcId = sampleVpc.Id,
            CidrBlock = "10.1.1.0/24",
        });
    
        var samplePlacementGroup = new Aws.Ec2.PlacementGroup("sample", new()
        {
            Name = "sample",
            Strategy = Aws.Ec2.PlacementStrategy.Cluster,
        });
    
        var sampleComputeEnvironment = new Aws.Batch.ComputeEnvironment("sample", new()
        {
            ComputeEnvironmentName = "sample",
            ComputeResources = new Aws.Batch.Inputs.ComputeEnvironmentComputeResourcesArgs
            {
                InstanceRole = ecsInstanceRoleInstanceProfile.Arn,
                InstanceTypes = new[]
                {
                    "c4.large",
                },
                MaxVcpus = 16,
                MinVcpus = 0,
                PlacementGroup = samplePlacementGroup.Name,
                SecurityGroupIds = new[]
                {
                    sample.Id,
                },
                Subnets = new[]
                {
                    sampleSubnet.Id,
                },
                Type = "EC2",
            },
            ServiceRole = awsBatchServiceRole.Arn,
            Type = "MANAGED",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                awsBatchServiceRoleRolePolicyAttachment,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iam.IamFunctions;
    import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
    import com.pulumi.aws.iam.Role;
    import com.pulumi.aws.iam.RoleArgs;
    import com.pulumi.aws.iam.RolePolicyAttachment;
    import com.pulumi.aws.iam.RolePolicyAttachmentArgs;
    import com.pulumi.aws.iam.InstanceProfile;
    import com.pulumi.aws.iam.InstanceProfileArgs;
    import com.pulumi.aws.ec2.SecurityGroup;
    import com.pulumi.aws.ec2.SecurityGroupArgs;
    import com.pulumi.aws.ec2.inputs.SecurityGroupEgressArgs;
    import com.pulumi.aws.ec2.Vpc;
    import com.pulumi.aws.ec2.VpcArgs;
    import com.pulumi.aws.ec2.Subnet;
    import com.pulumi.aws.ec2.SubnetArgs;
    import com.pulumi.aws.ec2.PlacementGroup;
    import com.pulumi.aws.ec2.PlacementGroupArgs;
    import com.pulumi.aws.batch.ComputeEnvironment;
    import com.pulumi.aws.batch.ComputeEnvironmentArgs;
    import com.pulumi.aws.batch.inputs.ComputeEnvironmentComputeResourcesArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var ec2AssumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .effect("Allow")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .type("Service")
                        .identifiers("ec2.amazonaws.com")
                        .build())
                    .actions("sts:AssumeRole")
                    .build())
                .build());
    
            var ecsInstanceRole = new Role("ecsInstanceRole", RoleArgs.builder()
                .name("ecs_instance_role")
                .assumeRolePolicy(ec2AssumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .build());
    
            var ecsInstanceRoleRolePolicyAttachment = new RolePolicyAttachment("ecsInstanceRoleRolePolicyAttachment", RolePolicyAttachmentArgs.builder()
                .role(ecsInstanceRole.name())
                .policyArn("arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role")
                .build());
    
            var ecsInstanceRoleInstanceProfile = new InstanceProfile("ecsInstanceRoleInstanceProfile", InstanceProfileArgs.builder()
                .name("ecs_instance_role")
                .role(ecsInstanceRole.name())
                .build());
    
            final var batchAssumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .effect("Allow")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .type("Service")
                        .identifiers("batch.amazonaws.com")
                        .build())
                    .actions("sts:AssumeRole")
                    .build())
                .build());
    
            var awsBatchServiceRole = new Role("awsBatchServiceRole", RoleArgs.builder()
                .name("aws_batch_service_role")
                .assumeRolePolicy(batchAssumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .build());
    
            var awsBatchServiceRoleRolePolicyAttachment = new RolePolicyAttachment("awsBatchServiceRoleRolePolicyAttachment", RolePolicyAttachmentArgs.builder()
                .role(awsBatchServiceRole.name())
                .policyArn("arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole")
                .build());
    
            var sample = new SecurityGroup("sample", SecurityGroupArgs.builder()
                .name("aws_batch_compute_environment_security_group")
                .egress(SecurityGroupEgressArgs.builder()
                    .fromPort(0)
                    .toPort(0)
                    .protocol("-1")
                    .cidrBlocks("0.0.0.0/0")
                    .build())
                .build());
    
            var sampleVpc = new Vpc("sampleVpc", VpcArgs.builder()
                .cidrBlock("10.1.0.0/16")
                .build());
    
            var sampleSubnet = new Subnet("sampleSubnet", SubnetArgs.builder()
                .vpcId(sampleVpc.id())
                .cidrBlock("10.1.1.0/24")
                .build());
    
            var samplePlacementGroup = new PlacementGroup("samplePlacementGroup", PlacementGroupArgs.builder()
                .name("sample")
                .strategy("cluster")
                .build());
    
            var sampleComputeEnvironment = new ComputeEnvironment("sampleComputeEnvironment", ComputeEnvironmentArgs.builder()
                .computeEnvironmentName("sample")
                .computeResources(ComputeEnvironmentComputeResourcesArgs.builder()
                    .instanceRole(ecsInstanceRoleInstanceProfile.arn())
                    .instanceTypes("c4.large")
                    .maxVcpus(16)
                    .minVcpus(0)
                    .placementGroup(samplePlacementGroup.name())
                    .securityGroupIds(sample.id())
                    .subnets(sampleSubnet.id())
                    .type("EC2")
                    .build())
                .serviceRole(awsBatchServiceRole.arn())
                .type("MANAGED")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(awsBatchServiceRoleRolePolicyAttachment)
                    .build());
    
        }
    }
    
    resources:
      ecsInstanceRole:
        type: aws:iam:Role
        name: ecs_instance_role
        properties:
          name: ecs_instance_role
          assumeRolePolicy: ${ec2AssumeRole.json}
      ecsInstanceRoleRolePolicyAttachment:
        type: aws:iam:RolePolicyAttachment
        name: ecs_instance_role
        properties:
          role: ${ecsInstanceRole.name}
          policyArn: arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role
      ecsInstanceRoleInstanceProfile:
        type: aws:iam:InstanceProfile
        name: ecs_instance_role
        properties:
          name: ecs_instance_role
          role: ${ecsInstanceRole.name}
      awsBatchServiceRole:
        type: aws:iam:Role
        name: aws_batch_service_role
        properties:
          name: aws_batch_service_role
          assumeRolePolicy: ${batchAssumeRole.json}
      awsBatchServiceRoleRolePolicyAttachment:
        type: aws:iam:RolePolicyAttachment
        name: aws_batch_service_role
        properties:
          role: ${awsBatchServiceRole.name}
          policyArn: arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole
      sample:
        type: aws:ec2:SecurityGroup
        properties:
          name: aws_batch_compute_environment_security_group
          egress:
            - fromPort: 0
              toPort: 0
              protocol: '-1'
              cidrBlocks:
                - 0.0.0.0/0
      sampleVpc:
        type: aws:ec2:Vpc
        name: sample
        properties:
          cidrBlock: 10.1.0.0/16
      sampleSubnet:
        type: aws:ec2:Subnet
        name: sample
        properties:
          vpcId: ${sampleVpc.id}
          cidrBlock: 10.1.1.0/24
      samplePlacementGroup:
        type: aws:ec2:PlacementGroup
        name: sample
        properties:
          name: sample
          strategy: cluster
      sampleComputeEnvironment:
        type: aws:batch:ComputeEnvironment
        name: sample
        properties:
          computeEnvironmentName: sample
          computeResources:
            instanceRole: ${ecsInstanceRoleInstanceProfile.arn}
            instanceTypes:
              - c4.large
            maxVcpus: 16
            minVcpus: 0
            placementGroup: ${samplePlacementGroup.name}
            securityGroupIds:
              - ${sample.id}
            subnets:
              - ${sampleSubnet.id}
            type: EC2
          serviceRole: ${awsBatchServiceRole.arn}
          type: MANAGED
        options:
          dependson:
            - ${awsBatchServiceRoleRolePolicyAttachment}
    variables:
      ec2AssumeRole:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - effect: Allow
                principals:
                  - type: Service
                    identifiers:
                      - ec2.amazonaws.com
                actions:
                  - sts:AssumeRole
      batchAssumeRole:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - effect: Allow
                principals:
                  - type: Service
                    identifiers:
                      - batch.amazonaws.com
                actions:
                  - sts:AssumeRole
    

    Fargate Type

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const sample = new aws.batch.ComputeEnvironment("sample", {
        computeEnvironmentName: "sample",
        computeResources: {
            maxVcpus: 16,
            securityGroupIds: [sampleAwsSecurityGroup.id],
            subnets: [sampleAwsSubnet.id],
            type: "FARGATE",
        },
        serviceRole: awsBatchServiceRoleAwsIamRole.arn,
        type: "MANAGED",
    }, {
        dependsOn: [awsBatchServiceRole],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    sample = aws.batch.ComputeEnvironment("sample",
        compute_environment_name="sample",
        compute_resources={
            "max_vcpus": 16,
            "security_group_ids": [sample_aws_security_group["id"]],
            "subnets": [sample_aws_subnet["id"]],
            "type": "FARGATE",
        },
        service_role=aws_batch_service_role_aws_iam_role["arn"],
        type="MANAGED",
        opts = pulumi.ResourceOptions(depends_on=[aws_batch_service_role]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := batch.NewComputeEnvironment(ctx, "sample", &batch.ComputeEnvironmentArgs{
    			ComputeEnvironmentName: pulumi.String("sample"),
    			ComputeResources: &batch.ComputeEnvironmentComputeResourcesArgs{
    				MaxVcpus: pulumi.Int(16),
    				SecurityGroupIds: pulumi.StringArray{
    					sampleAwsSecurityGroup.Id,
    				},
    				Subnets: pulumi.StringArray{
    					sampleAwsSubnet.Id,
    				},
    				Type: pulumi.String("FARGATE"),
    			},
    			ServiceRole: pulumi.Any(awsBatchServiceRoleAwsIamRole.Arn),
    			Type:        pulumi.String("MANAGED"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			awsBatchServiceRole,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var sample = new Aws.Batch.ComputeEnvironment("sample", new()
        {
            ComputeEnvironmentName = "sample",
            ComputeResources = new Aws.Batch.Inputs.ComputeEnvironmentComputeResourcesArgs
            {
                MaxVcpus = 16,
                SecurityGroupIds = new[]
                {
                    sampleAwsSecurityGroup.Id,
                },
                Subnets = new[]
                {
                    sampleAwsSubnet.Id,
                },
                Type = "FARGATE",
            },
            ServiceRole = awsBatchServiceRoleAwsIamRole.Arn,
            Type = "MANAGED",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                awsBatchServiceRole,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.batch.ComputeEnvironment;
    import com.pulumi.aws.batch.ComputeEnvironmentArgs;
    import com.pulumi.aws.batch.inputs.ComputeEnvironmentComputeResourcesArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var sample = new ComputeEnvironment("sample", ComputeEnvironmentArgs.builder()
                .computeEnvironmentName("sample")
                .computeResources(ComputeEnvironmentComputeResourcesArgs.builder()
                    .maxVcpus(16)
                    .securityGroupIds(sampleAwsSecurityGroup.id())
                    .subnets(sampleAwsSubnet.id())
                    .type("FARGATE")
                    .build())
                .serviceRole(awsBatchServiceRoleAwsIamRole.arn())
                .type("MANAGED")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(awsBatchServiceRole)
                    .build());
    
        }
    }
    
    resources:
      sample:
        type: aws:batch:ComputeEnvironment
        properties:
          computeEnvironmentName: sample
          computeResources:
            maxVcpus: 16
            securityGroupIds:
              - ${sampleAwsSecurityGroup.id}
            subnets:
              - ${sampleAwsSubnet.id}
            type: FARGATE
          serviceRole: ${awsBatchServiceRoleAwsIamRole.arn}
          type: MANAGED
        options:
          dependson:
            - ${awsBatchServiceRole}
    

    Setting Update Policy

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const sample = new aws.batch.ComputeEnvironment("sample", {
        computeEnvironmentName: "sample",
        computeResources: {
            allocationStrategy: "BEST_FIT_PROGRESSIVE",
            instanceRole: ecsInstance.arn,
            instanceTypes: ["optimal"],
            maxVcpus: 4,
            minVcpus: 0,
            securityGroupIds: [sampleAwsSecurityGroup.id],
            subnets: [sampleAwsSubnet.id],
            type: "EC2",
        },
        updatePolicy: {
            jobExecutionTimeoutMinutes: 30,
            terminateJobsOnUpdate: false,
        },
        type: "MANAGED",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    sample = aws.batch.ComputeEnvironment("sample",
        compute_environment_name="sample",
        compute_resources={
            "allocation_strategy": "BEST_FIT_PROGRESSIVE",
            "instance_role": ecs_instance["arn"],
            "instance_types": ["optimal"],
            "max_vcpus": 4,
            "min_vcpus": 0,
            "security_group_ids": [sample_aws_security_group["id"]],
            "subnets": [sample_aws_subnet["id"]],
            "type": "EC2",
        },
        update_policy={
            "job_execution_timeout_minutes": 30,
            "terminate_jobs_on_update": False,
        },
        type="MANAGED")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/batch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := batch.NewComputeEnvironment(ctx, "sample", &batch.ComputeEnvironmentArgs{
    			ComputeEnvironmentName: pulumi.String("sample"),
    			ComputeResources: &batch.ComputeEnvironmentComputeResourcesArgs{
    				AllocationStrategy: pulumi.String("BEST_FIT_PROGRESSIVE"),
    				InstanceRole:       pulumi.Any(ecsInstance.Arn),
    				InstanceTypes: pulumi.StringArray{
    					pulumi.String("optimal"),
    				},
    				MaxVcpus: pulumi.Int(4),
    				MinVcpus: pulumi.Int(0),
    				SecurityGroupIds: pulumi.StringArray{
    					sampleAwsSecurityGroup.Id,
    				},
    				Subnets: pulumi.StringArray{
    					sampleAwsSubnet.Id,
    				},
    				Type: pulumi.String("EC2"),
    			},
    			UpdatePolicy: &batch.ComputeEnvironmentUpdatePolicyArgs{
    				JobExecutionTimeoutMinutes: pulumi.Int(30),
    				TerminateJobsOnUpdate:      pulumi.Bool(false),
    			},
    			Type: pulumi.String("MANAGED"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var sample = new Aws.Batch.ComputeEnvironment("sample", new()
        {
            ComputeEnvironmentName = "sample",
            ComputeResources = new Aws.Batch.Inputs.ComputeEnvironmentComputeResourcesArgs
            {
                AllocationStrategy = "BEST_FIT_PROGRESSIVE",
                InstanceRole = ecsInstance.Arn,
                InstanceTypes = new[]
                {
                    "optimal",
                },
                MaxVcpus = 4,
                MinVcpus = 0,
                SecurityGroupIds = new[]
                {
                    sampleAwsSecurityGroup.Id,
                },
                Subnets = new[]
                {
                    sampleAwsSubnet.Id,
                },
                Type = "EC2",
            },
            UpdatePolicy = new Aws.Batch.Inputs.ComputeEnvironmentUpdatePolicyArgs
            {
                JobExecutionTimeoutMinutes = 30,
                TerminateJobsOnUpdate = false,
            },
            Type = "MANAGED",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.batch.ComputeEnvironment;
    import com.pulumi.aws.batch.ComputeEnvironmentArgs;
    import com.pulumi.aws.batch.inputs.ComputeEnvironmentComputeResourcesArgs;
    import com.pulumi.aws.batch.inputs.ComputeEnvironmentUpdatePolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var sample = new ComputeEnvironment("sample", ComputeEnvironmentArgs.builder()
                .computeEnvironmentName("sample")
                .computeResources(ComputeEnvironmentComputeResourcesArgs.builder()
                    .allocationStrategy("BEST_FIT_PROGRESSIVE")
                    .instanceRole(ecsInstance.arn())
                    .instanceTypes("optimal")
                    .maxVcpus(4)
                    .minVcpus(0)
                    .securityGroupIds(sampleAwsSecurityGroup.id())
                    .subnets(sampleAwsSubnet.id())
                    .type("EC2")
                    .build())
                .updatePolicy(ComputeEnvironmentUpdatePolicyArgs.builder()
                    .jobExecutionTimeoutMinutes(30)
                    .terminateJobsOnUpdate(false)
                    .build())
                .type("MANAGED")
                .build());
    
        }
    }
    
    resources:
      sample:
        type: aws:batch:ComputeEnvironment
        properties:
          computeEnvironmentName: sample
          computeResources:
            allocationStrategy: BEST_FIT_PROGRESSIVE
            instanceRole: ${ecsInstance.arn}
            instanceTypes:
              - optimal
            maxVcpus: 4
            minVcpus: 0
            securityGroupIds:
              - ${sampleAwsSecurityGroup.id}
            subnets:
              - ${sampleAwsSubnet.id}
            type: EC2
          updatePolicy:
            jobExecutionTimeoutMinutes: 30
            terminateJobsOnUpdate: false
          type: MANAGED
    

    Create ComputeEnvironment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ComputeEnvironment(name: string, args: ComputeEnvironmentArgs, opts?: CustomResourceOptions);
    @overload
    def ComputeEnvironment(resource_name: str,
                           args: ComputeEnvironmentArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ComputeEnvironment(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           type: Optional[str] = None,
                           compute_environment_name: Optional[str] = None,
                           compute_environment_name_prefix: Optional[str] = None,
                           compute_resources: Optional[ComputeEnvironmentComputeResourcesArgs] = None,
                           eks_configuration: Optional[ComputeEnvironmentEksConfigurationArgs] = None,
                           service_role: Optional[str] = None,
                           state: Optional[str] = None,
                           tags: Optional[Mapping[str, str]] = None,
                           update_policy: Optional[ComputeEnvironmentUpdatePolicyArgs] = None)
    func NewComputeEnvironment(ctx *Context, name string, args ComputeEnvironmentArgs, opts ...ResourceOption) (*ComputeEnvironment, error)
    public ComputeEnvironment(string name, ComputeEnvironmentArgs args, CustomResourceOptions? opts = null)
    public ComputeEnvironment(String name, ComputeEnvironmentArgs args)
    public ComputeEnvironment(String name, ComputeEnvironmentArgs args, CustomResourceOptions options)
    
    type: aws:batch:ComputeEnvironment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ComputeEnvironmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ComputeEnvironmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ComputeEnvironmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComputeEnvironmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComputeEnvironmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var computeEnvironmentResource = new Aws.Batch.ComputeEnvironment("computeEnvironmentResource", new()
    {
        Type = "string",
        ComputeEnvironmentName = "string",
        ComputeEnvironmentNamePrefix = "string",
        ComputeResources = new Aws.Batch.Inputs.ComputeEnvironmentComputeResourcesArgs
        {
            MaxVcpus = 0,
            Type = "string",
            Subnets = new[]
            {
                "string",
            },
            LaunchTemplate = new Aws.Batch.Inputs.ComputeEnvironmentComputeResourcesLaunchTemplateArgs
            {
                LaunchTemplateId = "string",
                LaunchTemplateName = "string",
                Version = "string",
            },
            MinVcpus = 0,
            ImageId = "string",
            InstanceRole = "string",
            InstanceTypes = new[]
            {
                "string",
            },
            AllocationStrategy = "string",
            Ec2Configurations = new[]
            {
                new Aws.Batch.Inputs.ComputeEnvironmentComputeResourcesEc2ConfigurationArgs
                {
                    ImageIdOverride = "string",
                    ImageType = "string",
                },
            },
            Ec2KeyPair = "string",
            PlacementGroup = "string",
            SecurityGroupIds = new[]
            {
                "string",
            },
            SpotIamFleetRole = "string",
            DesiredVcpus = 0,
            Tags = 
            {
                { "string", "string" },
            },
            BidPercentage = 0,
        },
        EksConfiguration = new Aws.Batch.Inputs.ComputeEnvironmentEksConfigurationArgs
        {
            EksClusterArn = "string",
            KubernetesNamespace = "string",
        },
        ServiceRole = "string",
        State = "string",
        Tags = 
        {
            { "string", "string" },
        },
        UpdatePolicy = new Aws.Batch.Inputs.ComputeEnvironmentUpdatePolicyArgs
        {
            JobExecutionTimeoutMinutes = 0,
            TerminateJobsOnUpdate = false,
        },
    });
    
    example, err := batch.NewComputeEnvironment(ctx, "computeEnvironmentResource", &batch.ComputeEnvironmentArgs{
    	Type:                         pulumi.String("string"),
    	ComputeEnvironmentName:       pulumi.String("string"),
    	ComputeEnvironmentNamePrefix: pulumi.String("string"),
    	ComputeResources: &batch.ComputeEnvironmentComputeResourcesArgs{
    		MaxVcpus: pulumi.Int(0),
    		Type:     pulumi.String("string"),
    		Subnets: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		LaunchTemplate: &batch.ComputeEnvironmentComputeResourcesLaunchTemplateArgs{
    			LaunchTemplateId:   pulumi.String("string"),
    			LaunchTemplateName: pulumi.String("string"),
    			Version:            pulumi.String("string"),
    		},
    		MinVcpus:     pulumi.Int(0),
    		ImageId:      pulumi.String("string"),
    		InstanceRole: pulumi.String("string"),
    		InstanceTypes: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		AllocationStrategy: pulumi.String("string"),
    		Ec2Configurations: batch.ComputeEnvironmentComputeResourcesEc2ConfigurationArray{
    			&batch.ComputeEnvironmentComputeResourcesEc2ConfigurationArgs{
    				ImageIdOverride: pulumi.String("string"),
    				ImageType:       pulumi.String("string"),
    			},
    		},
    		Ec2KeyPair:     pulumi.String("string"),
    		PlacementGroup: pulumi.String("string"),
    		SecurityGroupIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		SpotIamFleetRole: pulumi.String("string"),
    		DesiredVcpus:     pulumi.Int(0),
    		Tags: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		BidPercentage: pulumi.Int(0),
    	},
    	EksConfiguration: &batch.ComputeEnvironmentEksConfigurationArgs{
    		EksClusterArn:       pulumi.String("string"),
    		KubernetesNamespace: pulumi.String("string"),
    	},
    	ServiceRole: pulumi.String("string"),
    	State:       pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	UpdatePolicy: &batch.ComputeEnvironmentUpdatePolicyArgs{
    		JobExecutionTimeoutMinutes: pulumi.Int(0),
    		TerminateJobsOnUpdate:      pulumi.Bool(false),
    	},
    })
    
    var computeEnvironmentResource = new ComputeEnvironment("computeEnvironmentResource", ComputeEnvironmentArgs.builder()
        .type("string")
        .computeEnvironmentName("string")
        .computeEnvironmentNamePrefix("string")
        .computeResources(ComputeEnvironmentComputeResourcesArgs.builder()
            .maxVcpus(0)
            .type("string")
            .subnets("string")
            .launchTemplate(ComputeEnvironmentComputeResourcesLaunchTemplateArgs.builder()
                .launchTemplateId("string")
                .launchTemplateName("string")
                .version("string")
                .build())
            .minVcpus(0)
            .imageId("string")
            .instanceRole("string")
            .instanceTypes("string")
            .allocationStrategy("string")
            .ec2Configurations(ComputeEnvironmentComputeResourcesEc2ConfigurationArgs.builder()
                .imageIdOverride("string")
                .imageType("string")
                .build())
            .ec2KeyPair("string")
            .placementGroup("string")
            .securityGroupIds("string")
            .spotIamFleetRole("string")
            .desiredVcpus(0)
            .tags(Map.of("string", "string"))
            .bidPercentage(0)
            .build())
        .eksConfiguration(ComputeEnvironmentEksConfigurationArgs.builder()
            .eksClusterArn("string")
            .kubernetesNamespace("string")
            .build())
        .serviceRole("string")
        .state("string")
        .tags(Map.of("string", "string"))
        .updatePolicy(ComputeEnvironmentUpdatePolicyArgs.builder()
            .jobExecutionTimeoutMinutes(0)
            .terminateJobsOnUpdate(false)
            .build())
        .build());
    
    compute_environment_resource = aws.batch.ComputeEnvironment("computeEnvironmentResource",
        type="string",
        compute_environment_name="string",
        compute_environment_name_prefix="string",
        compute_resources={
            "max_vcpus": 0,
            "type": "string",
            "subnets": ["string"],
            "launch_template": {
                "launch_template_id": "string",
                "launch_template_name": "string",
                "version": "string",
            },
            "min_vcpus": 0,
            "image_id": "string",
            "instance_role": "string",
            "instance_types": ["string"],
            "allocation_strategy": "string",
            "ec2_configurations": [{
                "image_id_override": "string",
                "image_type": "string",
            }],
            "ec2_key_pair": "string",
            "placement_group": "string",
            "security_group_ids": ["string"],
            "spot_iam_fleet_role": "string",
            "desired_vcpus": 0,
            "tags": {
                "string": "string",
            },
            "bid_percentage": 0,
        },
        eks_configuration={
            "eks_cluster_arn": "string",
            "kubernetes_namespace": "string",
        },
        service_role="string",
        state="string",
        tags={
            "string": "string",
        },
        update_policy={
            "job_execution_timeout_minutes": 0,
            "terminate_jobs_on_update": False,
        })
    
    const computeEnvironmentResource = new aws.batch.ComputeEnvironment("computeEnvironmentResource", {
        type: "string",
        computeEnvironmentName: "string",
        computeEnvironmentNamePrefix: "string",
        computeResources: {
            maxVcpus: 0,
            type: "string",
            subnets: ["string"],
            launchTemplate: {
                launchTemplateId: "string",
                launchTemplateName: "string",
                version: "string",
            },
            minVcpus: 0,
            imageId: "string",
            instanceRole: "string",
            instanceTypes: ["string"],
            allocationStrategy: "string",
            ec2Configurations: [{
                imageIdOverride: "string",
                imageType: "string",
            }],
            ec2KeyPair: "string",
            placementGroup: "string",
            securityGroupIds: ["string"],
            spotIamFleetRole: "string",
            desiredVcpus: 0,
            tags: {
                string: "string",
            },
            bidPercentage: 0,
        },
        eksConfiguration: {
            eksClusterArn: "string",
            kubernetesNamespace: "string",
        },
        serviceRole: "string",
        state: "string",
        tags: {
            string: "string",
        },
        updatePolicy: {
            jobExecutionTimeoutMinutes: 0,
            terminateJobsOnUpdate: false,
        },
    });
    
    type: aws:batch:ComputeEnvironment
    properties:
        computeEnvironmentName: string
        computeEnvironmentNamePrefix: string
        computeResources:
            allocationStrategy: string
            bidPercentage: 0
            desiredVcpus: 0
            ec2Configurations:
                - imageIdOverride: string
                  imageType: string
            ec2KeyPair: string
            imageId: string
            instanceRole: string
            instanceTypes:
                - string
            launchTemplate:
                launchTemplateId: string
                launchTemplateName: string
                version: string
            maxVcpus: 0
            minVcpus: 0
            placementGroup: string
            securityGroupIds:
                - string
            spotIamFleetRole: string
            subnets:
                - string
            tags:
                string: string
            type: string
        eksConfiguration:
            eksClusterArn: string
            kubernetesNamespace: string
        serviceRole: string
        state: string
        tags:
            string: string
        type: string
        updatePolicy:
            jobExecutionTimeoutMinutes: 0
            terminateJobsOnUpdate: false
    

    ComputeEnvironment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ComputeEnvironment resource accepts the following input properties:

    Type string
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    ComputeEnvironmentName string
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    ComputeEnvironmentNamePrefix string
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    ComputeResources ComputeEnvironmentComputeResources
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    EksConfiguration ComputeEnvironmentEksConfiguration
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    ServiceRole 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.
    State string
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    UpdatePolicy ComputeEnvironmentUpdatePolicy
    Specifies the infrastructure update policy for the compute environment. See details below.
    Type string
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    ComputeEnvironmentName string
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    ComputeEnvironmentNamePrefix string
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    ComputeResources ComputeEnvironmentComputeResourcesArgs
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    EksConfiguration ComputeEnvironmentEksConfigurationArgs
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    ServiceRole 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.
    State string
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    UpdatePolicy ComputeEnvironmentUpdatePolicyArgs
    Specifies the infrastructure update policy for the compute environment. See details below.
    type String
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    computeEnvironmentName String
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    computeEnvironmentNamePrefix String
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    computeResources ComputeEnvironmentComputeResources
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    eksConfiguration ComputeEnvironmentEksConfiguration
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    serviceRole 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.
    state String
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    updatePolicy ComputeEnvironmentUpdatePolicy
    Specifies the infrastructure update policy for the compute environment. See details below.
    type string
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    computeEnvironmentName string
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    computeEnvironmentNamePrefix string
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    computeResources ComputeEnvironmentComputeResources
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    eksConfiguration ComputeEnvironmentEksConfiguration
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    serviceRole 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.
    state string
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    updatePolicy ComputeEnvironmentUpdatePolicy
    Specifies the infrastructure update policy for the compute environment. See details below.
    type str
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    compute_environment_name str
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    compute_environment_name_prefix str
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    compute_resources ComputeEnvironmentComputeResourcesArgs
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    eks_configuration ComputeEnvironmentEksConfigurationArgs
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    service_role str
    The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
    state str
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    update_policy ComputeEnvironmentUpdatePolicyArgs
    Specifies the infrastructure update policy for the compute environment. See details below.
    type String
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    computeEnvironmentName String
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    computeEnvironmentNamePrefix String
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    computeResources Property Map
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    eksConfiguration Property Map
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    serviceRole 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.
    state String
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    updatePolicy Property Map
    Specifies the infrastructure update policy for the compute environment. See details below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ComputeEnvironment resource produces the following output properties:

    Arn string
    The Amazon Resource Name (ARN) of the compute environment.
    EcsClusterArn string
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current status of the compute environment (for example, CREATING or VALID).
    StatusReason string
    A short, human-readable string to provide additional details about the current status of the compute environment.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name (ARN) of the compute environment.
    EcsClusterArn string
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The current status of the compute environment (for example, CREATING or VALID).
    StatusReason string
    A short, human-readable string to provide additional details about the current status of the compute environment.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the compute environment.
    ecsClusterArn String
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current status of the compute environment (for example, CREATING or VALID).
    statusReason String
    A short, human-readable string to provide additional details about the current status of the compute environment.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name (ARN) of the compute environment.
    ecsClusterArn string
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The current status of the compute environment (for example, CREATING or VALID).
    statusReason string
    A short, human-readable string to provide additional details about the current status of the compute environment.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    The Amazon Resource Name (ARN) of the compute environment.
    ecs_cluster_arn str
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The current status of the compute environment (for example, CREATING or VALID).
    status_reason str
    A short, human-readable string to provide additional details about the current status of the compute environment.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the compute environment.
    ecsClusterArn String
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The current status of the compute environment (for example, CREATING or VALID).
    statusReason String
    A short, human-readable string to provide additional details about the current status of the compute environment.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing ComputeEnvironment Resource

    Get an existing ComputeEnvironment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ComputeEnvironmentState, opts?: CustomResourceOptions): ComputeEnvironment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            compute_environment_name: Optional[str] = None,
            compute_environment_name_prefix: Optional[str] = None,
            compute_resources: Optional[ComputeEnvironmentComputeResourcesArgs] = None,
            ecs_cluster_arn: Optional[str] = None,
            eks_configuration: Optional[ComputeEnvironmentEksConfigurationArgs] = None,
            service_role: Optional[str] = None,
            state: Optional[str] = None,
            status: Optional[str] = None,
            status_reason: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            type: Optional[str] = None,
            update_policy: Optional[ComputeEnvironmentUpdatePolicyArgs] = None) -> ComputeEnvironment
    func GetComputeEnvironment(ctx *Context, name string, id IDInput, state *ComputeEnvironmentState, opts ...ResourceOption) (*ComputeEnvironment, error)
    public static ComputeEnvironment Get(string name, Input<string> id, ComputeEnvironmentState? state, CustomResourceOptions? opts = null)
    public static ComputeEnvironment get(String name, Output<String> id, ComputeEnvironmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The Amazon Resource Name (ARN) of the compute environment.
    ComputeEnvironmentName string
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    ComputeEnvironmentNamePrefix string
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    ComputeResources ComputeEnvironmentComputeResources
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    EcsClusterArn string
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    EksConfiguration ComputeEnvironmentEksConfiguration
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    ServiceRole 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.
    State string
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    Status string
    The current status of the compute environment (for example, CREATING or VALID).
    StatusReason string
    A short, human-readable string to provide additional details about the current status of the compute environment.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    UpdatePolicy ComputeEnvironmentUpdatePolicy
    Specifies the infrastructure update policy for the compute environment. See details below.
    Arn string
    The Amazon Resource Name (ARN) of the compute environment.
    ComputeEnvironmentName string
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    ComputeEnvironmentNamePrefix string
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    ComputeResources ComputeEnvironmentComputeResourcesArgs
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    EcsClusterArn string
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    EksConfiguration ComputeEnvironmentEksConfigurationArgs
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    ServiceRole 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.
    State string
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    Status string
    The current status of the compute environment (for example, CREATING or VALID).
    StatusReason string
    A short, human-readable string to provide additional details about the current status of the compute environment.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    UpdatePolicy ComputeEnvironmentUpdatePolicyArgs
    Specifies the infrastructure update policy for the compute environment. See details below.
    arn String
    The Amazon Resource Name (ARN) of the compute environment.
    computeEnvironmentName String
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    computeEnvironmentNamePrefix String
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    computeResources ComputeEnvironmentComputeResources
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    ecsClusterArn String
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    eksConfiguration ComputeEnvironmentEksConfiguration
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    serviceRole 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.
    state String
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    status String
    The current status of the compute environment (for example, CREATING or VALID).
    statusReason String
    A short, human-readable string to provide additional details about the current status of the compute environment.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    updatePolicy ComputeEnvironmentUpdatePolicy
    Specifies the infrastructure update policy for the compute environment. See details below.
    arn string
    The Amazon Resource Name (ARN) of the compute environment.
    computeEnvironmentName string
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    computeEnvironmentNamePrefix string
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    computeResources ComputeEnvironmentComputeResources
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    ecsClusterArn string
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    eksConfiguration ComputeEnvironmentEksConfiguration
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    serviceRole 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.
    state string
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    status string
    The current status of the compute environment (for example, CREATING or VALID).
    statusReason string
    A short, human-readable string to provide additional details about the current status of the compute environment.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type string
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    updatePolicy ComputeEnvironmentUpdatePolicy
    Specifies the infrastructure update policy for the compute environment. See details below.
    arn str
    The Amazon Resource Name (ARN) of the compute environment.
    compute_environment_name str
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    compute_environment_name_prefix str
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    compute_resources ComputeEnvironmentComputeResourcesArgs
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    ecs_cluster_arn str
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    eks_configuration ComputeEnvironmentEksConfigurationArgs
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    service_role str
    The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
    state str
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    status str
    The current status of the compute environment (for example, CREATING or VALID).
    status_reason str
    A short, human-readable string to provide additional details about the current status of the compute environment.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type str
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    update_policy ComputeEnvironmentUpdatePolicyArgs
    Specifies the infrastructure update policy for the compute environment. See details below.
    arn String
    The Amazon Resource Name (ARN) of the compute environment.
    computeEnvironmentName String
    The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers, and underscores are allowed. If omitted, the provider will assign a random, unique name.
    computeEnvironmentNamePrefix String
    Creates a unique compute environment name beginning with the specified prefix. Conflicts with compute_environment_name.
    computeResources Property Map
    Details of the compute resources managed by the compute environment. This parameter is required for managed compute environments. See details below.
    ecsClusterArn String
    The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the compute environment.
    eksConfiguration Property Map
    Details for the Amazon EKS cluster that supports the compute environment. See details below.
    serviceRole 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.
    state String
    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. Valid items are ENABLED or DISABLED. Defaults to ENABLED.
    status String
    The current status of the compute environment (for example, CREATING or VALID).
    statusReason String
    A short, human-readable string to provide additional details about the current status of the compute environment.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    The type of the compute environment. Valid items are MANAGED or UNMANAGED.
    updatePolicy Property Map
    Specifies the infrastructure update policy for the compute environment. See details below.

    Supporting Types

    ComputeEnvironmentComputeResources, ComputeEnvironmentComputeResourcesArgs

    MaxVcpus int
    The maximum number of EC2 vCPUs that an environment can reach.
    Subnets List<string>
    A list of VPC subnets into which the compute resources are launched.
    Type string
    The type of compute environment. Valid items are EC2, SPOT, FARGATE or FARGATE_SPOT.
    AllocationStrategy string
    The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated. For valid values, refer to the AWS documentation. Defaults to BEST_FIT. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    BidPercentage int
    Integer of 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 bid percentage is 20% (20), then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. If you leave this field empty, the default value is 100% of the On-Demand price. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    DesiredVcpus int
    The desired number of EC2 vCPUS in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    Ec2Configurations List<ComputeEnvironmentComputeResourcesEc2Configuration>
    Provides information used to select Amazon Machine Images (AMIs) for EC2 instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2. This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
    Ec2KeyPair string
    The EC2 key pair that is used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    ImageId string
    The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified. (Deprecated, use ec2_configuration image_id_override instead)
    InstanceRole string
    The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    InstanceTypes List<string>
    A list of instance types that may be launched. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    LaunchTemplate ComputeEnvironmentComputeResourcesLaunchTemplate
    The launch template to use for your compute resources. See details below. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    MinVcpus int
    The minimum number of EC2 vCPUs that an environment should maintain. For EC2 or SPOT compute environments, if the parameter is not explicitly defined, a 0 default value will be set. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    PlacementGroup string
    The Amazon EC2 placement group to associate with your compute resources.
    SecurityGroupIds List<string>
    A list of EC2 security group that are associated with instances launched in the compute environment. This parameter is required for Fargate compute environments.
    SpotIamFleetRole string
    The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment. This parameter is required for SPOT compute environments. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    Tags Dictionary<string, string>
    Key-value pair tags to be applied to resources that are launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    MaxVcpus int
    The maximum number of EC2 vCPUs that an environment can reach.
    Subnets []string
    A list of VPC subnets into which the compute resources are launched.
    Type string
    The type of compute environment. Valid items are EC2, SPOT, FARGATE or FARGATE_SPOT.
    AllocationStrategy string
    The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated. For valid values, refer to the AWS documentation. Defaults to BEST_FIT. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    BidPercentage int
    Integer of 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 bid percentage is 20% (20), then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. If you leave this field empty, the default value is 100% of the On-Demand price. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    DesiredVcpus int
    The desired number of EC2 vCPUS in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    Ec2Configurations []ComputeEnvironmentComputeResourcesEc2Configuration
    Provides information used to select Amazon Machine Images (AMIs) for EC2 instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2. This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
    Ec2KeyPair string
    The EC2 key pair that is used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    ImageId string
    The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified. (Deprecated, use ec2_configuration image_id_override instead)
    InstanceRole string
    The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    InstanceTypes []string
    A list of instance types that may be launched. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    LaunchTemplate ComputeEnvironmentComputeResourcesLaunchTemplate
    The launch template to use for your compute resources. See details below. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    MinVcpus int
    The minimum number of EC2 vCPUs that an environment should maintain. For EC2 or SPOT compute environments, if the parameter is not explicitly defined, a 0 default value will be set. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    PlacementGroup string
    The Amazon EC2 placement group to associate with your compute resources.
    SecurityGroupIds []string
    A list of EC2 security group that are associated with instances launched in the compute environment. This parameter is required for Fargate compute environments.
    SpotIamFleetRole string
    The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment. This parameter is required for SPOT compute environments. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    Tags map[string]string
    Key-value pair tags to be applied to resources that are launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    maxVcpus Integer
    The maximum number of EC2 vCPUs that an environment can reach.
    subnets List<String>
    A list of VPC subnets into which the compute resources are launched.
    type String
    The type of compute environment. Valid items are EC2, SPOT, FARGATE or FARGATE_SPOT.
    allocationStrategy String
    The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated. For valid values, refer to the AWS documentation. Defaults to BEST_FIT. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    bidPercentage Integer
    Integer of 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 bid percentage is 20% (20), then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. If you leave this field empty, the default value is 100% of the On-Demand price. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    desiredVcpus Integer
    The desired number of EC2 vCPUS in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    ec2Configurations List<ComputeEnvironmentComputeResourcesEc2Configuration>
    Provides information used to select Amazon Machine Images (AMIs) for EC2 instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2. This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
    ec2KeyPair String
    The EC2 key pair that is used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    imageId String
    The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified. (Deprecated, use ec2_configuration image_id_override instead)
    instanceRole String
    The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    instanceTypes List<String>
    A list of instance types that may be launched. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    launchTemplate ComputeEnvironmentComputeResourcesLaunchTemplate
    The launch template to use for your compute resources. See details below. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    minVcpus Integer
    The minimum number of EC2 vCPUs that an environment should maintain. For EC2 or SPOT compute environments, if the parameter is not explicitly defined, a 0 default value will be set. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    placementGroup String
    The Amazon EC2 placement group to associate with your compute resources.
    securityGroupIds List<String>
    A list of EC2 security group that are associated with instances launched in the compute environment. This parameter is required for Fargate compute environments.
    spotIamFleetRole String
    The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment. This parameter is required for SPOT compute environments. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    tags Map<String,String>
    Key-value pair tags to be applied to resources that are launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    maxVcpus number
    The maximum number of EC2 vCPUs that an environment can reach.
    subnets string[]
    A list of VPC subnets into which the compute resources are launched.
    type string
    The type of compute environment. Valid items are EC2, SPOT, FARGATE or FARGATE_SPOT.
    allocationStrategy string
    The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated. For valid values, refer to the AWS documentation. Defaults to BEST_FIT. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    bidPercentage number
    Integer of 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 bid percentage is 20% (20), then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. If you leave this field empty, the default value is 100% of the On-Demand price. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    desiredVcpus number
    The desired number of EC2 vCPUS in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    ec2Configurations ComputeEnvironmentComputeResourcesEc2Configuration[]
    Provides information used to select Amazon Machine Images (AMIs) for EC2 instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2. This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
    ec2KeyPair string
    The EC2 key pair that is used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    imageId string
    The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified. (Deprecated, use ec2_configuration image_id_override instead)
    instanceRole string
    The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    instanceTypes string[]
    A list of instance types that may be launched. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    launchTemplate ComputeEnvironmentComputeResourcesLaunchTemplate
    The launch template to use for your compute resources. See details below. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    minVcpus number
    The minimum number of EC2 vCPUs that an environment should maintain. For EC2 or SPOT compute environments, if the parameter is not explicitly defined, a 0 default value will be set. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    placementGroup string
    The Amazon EC2 placement group to associate with your compute resources.
    securityGroupIds string[]
    A list of EC2 security group that are associated with instances launched in the compute environment. This parameter is required for Fargate compute environments.
    spotIamFleetRole string
    The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment. This parameter is required for SPOT compute environments. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    tags {[key: string]: string}
    Key-value pair tags to be applied to resources that are launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    max_vcpus int
    The maximum number of EC2 vCPUs that an environment can reach.
    subnets Sequence[str]
    A list of VPC subnets into which the compute resources are launched.
    type str
    The type of compute environment. Valid items are EC2, SPOT, FARGATE or FARGATE_SPOT.
    allocation_strategy str
    The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated. For valid values, refer to the AWS documentation. Defaults to BEST_FIT. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    bid_percentage int
    Integer of 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 bid percentage is 20% (20), then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. If you leave this field empty, the default value is 100% of the On-Demand price. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    desired_vcpus int
    The desired number of EC2 vCPUS in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    ec2_configurations Sequence[ComputeEnvironmentComputeResourcesEc2Configuration]
    Provides information used to select Amazon Machine Images (AMIs) for EC2 instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2. This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
    ec2_key_pair str
    The EC2 key pair that is used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    image_id str
    The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified. (Deprecated, use ec2_configuration image_id_override instead)
    instance_role str
    The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    instance_types Sequence[str]
    A list of instance types that may be launched. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    launch_template ComputeEnvironmentComputeResourcesLaunchTemplate
    The launch template to use for your compute resources. See details below. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    min_vcpus int
    The minimum number of EC2 vCPUs that an environment should maintain. For EC2 or SPOT compute environments, if the parameter is not explicitly defined, a 0 default value will be set. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    placement_group str
    The Amazon EC2 placement group to associate with your compute resources.
    security_group_ids Sequence[str]
    A list of EC2 security group that are associated with instances launched in the compute environment. This parameter is required for Fargate compute environments.
    spot_iam_fleet_role str
    The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment. This parameter is required for SPOT compute environments. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    tags Mapping[str, str]
    Key-value pair tags to be applied to resources that are launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    maxVcpus Number
    The maximum number of EC2 vCPUs that an environment can reach.
    subnets List<String>
    A list of VPC subnets into which the compute resources are launched.
    type String
    The type of compute environment. Valid items are EC2, SPOT, FARGATE or FARGATE_SPOT.
    allocationStrategy String
    The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated. For valid values, refer to the AWS documentation. Defaults to BEST_FIT. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    bidPercentage Number
    Integer of 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 bid percentage is 20% (20), then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. If you leave this field empty, the default value is 100% of the On-Demand price. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    desiredVcpus Number
    The desired number of EC2 vCPUS in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    ec2Configurations List<Property Map>
    Provides information used to select Amazon Machine Images (AMIs) for EC2 instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2. This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
    ec2KeyPair String
    The EC2 key pair that is used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    imageId String
    The Amazon Machine Image (AMI) ID used for instances launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified. (Deprecated, use ec2_configuration image_id_override instead)
    instanceRole String
    The Amazon ECS instance role applied to Amazon EC2 instances in a compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    instanceTypes List<String>
    A list of instance types that may be launched. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    launchTemplate Property Map
    The launch template to use for your compute resources. See details below. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    minVcpus Number
    The minimum number of EC2 vCPUs that an environment should maintain. For EC2 or SPOT compute environments, if the parameter is not explicitly defined, a 0 default value will be set. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    placementGroup String
    The Amazon EC2 placement group to associate with your compute resources.
    securityGroupIds List<String>
    A list of EC2 security group that are associated with instances launched in the compute environment. This parameter is required for Fargate compute environments.
    spotIamFleetRole String
    The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment. This parameter is required for SPOT compute environments. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
    tags Map<String>
    Key-value pair tags to be applied to resources that are launched in the compute environment. This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.

    ComputeEnvironmentComputeResourcesEc2Configuration, ComputeEnvironmentComputeResourcesEc2ConfigurationArgs

    ImageIdOverride string
    The AMI ID used for instances launched in the compute environment that match the image type. This setting overrides the image_id argument in the compute_resources block.
    ImageType string
    The image type to match with the instance type to select an AMI. If the image_id_override parameter isn't specified, then a recent Amazon ECS-optimized Amazon Linux 2 AMI (ECS_AL2) is used.
    ImageIdOverride string
    The AMI ID used for instances launched in the compute environment that match the image type. This setting overrides the image_id argument in the compute_resources block.
    ImageType string
    The image type to match with the instance type to select an AMI. If the image_id_override parameter isn't specified, then a recent Amazon ECS-optimized Amazon Linux 2 AMI (ECS_AL2) is used.
    imageIdOverride String
    The AMI ID used for instances launched in the compute environment that match the image type. This setting overrides the image_id argument in the compute_resources block.
    imageType String
    The image type to match with the instance type to select an AMI. If the image_id_override parameter isn't specified, then a recent Amazon ECS-optimized Amazon Linux 2 AMI (ECS_AL2) is used.
    imageIdOverride string
    The AMI ID used for instances launched in the compute environment that match the image type. This setting overrides the image_id argument in the compute_resources block.
    imageType string
    The image type to match with the instance type to select an AMI. If the image_id_override parameter isn't specified, then a recent Amazon ECS-optimized Amazon Linux 2 AMI (ECS_AL2) is used.
    image_id_override str
    The AMI ID used for instances launched in the compute environment that match the image type. This setting overrides the image_id argument in the compute_resources block.
    image_type str
    The image type to match with the instance type to select an AMI. If the image_id_override parameter isn't specified, then a recent Amazon ECS-optimized Amazon Linux 2 AMI (ECS_AL2) is used.
    imageIdOverride String
    The AMI ID used for instances launched in the compute environment that match the image type. This setting overrides the image_id argument in the compute_resources block.
    imageType String
    The image type to match with the instance type to select an AMI. If the image_id_override parameter isn't specified, then a recent Amazon ECS-optimized Amazon Linux 2 AMI (ECS_AL2) is used.

    ComputeEnvironmentComputeResourcesLaunchTemplate, ComputeEnvironmentComputeResourcesLaunchTemplateArgs

    LaunchTemplateId string
    ID of the launch template. You must specify either the launch template ID or launch template name in the request, but not both.
    LaunchTemplateName string
    Name of the launch template.
    Version string
    The version number of the launch template. Default: The default version of the launch template.
    LaunchTemplateId string
    ID of the launch template. You must specify either the launch template ID or launch template name in the request, but not both.
    LaunchTemplateName string
    Name of the launch template.
    Version string
    The version number of the launch template. Default: The default version of the launch template.
    launchTemplateId String
    ID of the launch template. You must specify either the launch template ID or launch template name in the request, but not both.
    launchTemplateName String
    Name of the launch template.
    version String
    The version number of the launch template. Default: The default version of the launch template.
    launchTemplateId string
    ID of the launch template. You must specify either the launch template ID or launch template name in the request, but not both.
    launchTemplateName string
    Name of the launch template.
    version string
    The version number of the launch template. Default: The default version of the launch template.
    launch_template_id str
    ID of the launch template. You must specify either the launch template ID or launch template name in the request, but not both.
    launch_template_name str
    Name of the launch template.
    version str
    The version number of the launch template. Default: The default version of the launch template.
    launchTemplateId String
    ID of the launch template. You must specify either the launch template ID or launch template name in the request, but not both.
    launchTemplateName String
    Name of the launch template.
    version String
    The version number of the launch template. Default: The default version of the launch template.

    ComputeEnvironmentEksConfiguration, ComputeEnvironmentEksConfigurationArgs

    EksClusterArn string
    The Amazon Resource Name (ARN) of the Amazon EKS cluster.
    KubernetesNamespace string
    The namespace of the Amazon EKS cluster. AWS Batch manages pods in this namespace.
    EksClusterArn string
    The Amazon Resource Name (ARN) of the Amazon EKS cluster.
    KubernetesNamespace string
    The namespace of the Amazon EKS cluster. AWS Batch manages pods in this namespace.
    eksClusterArn String
    The Amazon Resource Name (ARN) of the Amazon EKS cluster.
    kubernetesNamespace String
    The namespace of the Amazon EKS cluster. AWS Batch manages pods in this namespace.
    eksClusterArn string
    The Amazon Resource Name (ARN) of the Amazon EKS cluster.
    kubernetesNamespace string
    The namespace of the Amazon EKS cluster. AWS Batch manages pods in this namespace.
    eks_cluster_arn str
    The Amazon Resource Name (ARN) of the Amazon EKS cluster.
    kubernetes_namespace str
    The namespace of the Amazon EKS cluster. AWS Batch manages pods in this namespace.
    eksClusterArn String
    The Amazon Resource Name (ARN) of the Amazon EKS cluster.
    kubernetesNamespace String
    The namespace of the Amazon EKS cluster. AWS Batch manages pods in this namespace.

    ComputeEnvironmentUpdatePolicy, ComputeEnvironmentUpdatePolicyArgs

    JobExecutionTimeoutMinutes int
    Specifies the job timeout (in minutes) when the compute environment infrastructure is updated.
    TerminateJobsOnUpdate bool
    Specifies whether jobs are automatically terminated when the computer environment infrastructure is updated.
    JobExecutionTimeoutMinutes int
    Specifies the job timeout (in minutes) when the compute environment infrastructure is updated.
    TerminateJobsOnUpdate bool
    Specifies whether jobs are automatically terminated when the computer environment infrastructure is updated.
    jobExecutionTimeoutMinutes Integer
    Specifies the job timeout (in minutes) when the compute environment infrastructure is updated.
    terminateJobsOnUpdate Boolean
    Specifies whether jobs are automatically terminated when the computer environment infrastructure is updated.
    jobExecutionTimeoutMinutes number
    Specifies the job timeout (in minutes) when the compute environment infrastructure is updated.
    terminateJobsOnUpdate boolean
    Specifies whether jobs are automatically terminated when the computer environment infrastructure is updated.
    job_execution_timeout_minutes int
    Specifies the job timeout (in minutes) when the compute environment infrastructure is updated.
    terminate_jobs_on_update bool
    Specifies whether jobs are automatically terminated when the computer environment infrastructure is updated.
    jobExecutionTimeoutMinutes Number
    Specifies the job timeout (in minutes) when the compute environment infrastructure is updated.
    terminateJobsOnUpdate Boolean
    Specifies whether jobs are automatically terminated when the computer environment infrastructure is updated.

    Import

    Using pulumi import, import AWS Batch compute using the compute_environment_name. For example:

    $ pulumi import aws:batch/computeEnvironment:ComputeEnvironment sample sample
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi