awsbatch

package
v1.168.0-devpreview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2022 License: Apache-2.0 Imports: 11 Imported by: 2

README

AWS Batch Construct Library

This module is part of the AWS Cloud Development Kit project.

AWS Batch is a batch processing tool for efficiently running hundreds of thousands computing jobs in AWS. Batch can dynamically provision different types of compute resources based on the resource requirements of submitted jobs.

AWS Batch simplifies the planning, scheduling, and executions of your batch workloads across a full range of compute services like Amazon EC2 and Spot Resources.

Batch achieves this by utilizing queue processing of batch job requests. To successfully submit a job for execution, you need the following resources:

  1. Job Definition - Group various job properties (container image, resource requirements, env variables...) into a single definition. These definitions are used at job submission time.
  2. Compute Environment - the execution runtime of submitted batch jobs
  3. Job Queue - the queue where batch jobs can be submitted to via AWS SDK/CLI

For more information on AWS Batch visit the AWS Docs for Batch.

Compute Environment

At the core of AWS Batch is the compute environment. All batch jobs are processed within a compute environment, which uses resource like OnDemand/Spot EC2 instances or Fargate.

In MANAGED mode, AWS will handle the provisioning of compute resources to accommodate the demand. Otherwise, in UNMANAGED mode, you will need to manage the provisioning of those resources.

Below is an example of each available type of compute environment:

var vpc vpc


// default is managed
awsManagedEnvironment := batch.NewComputeEnvironment(this, jsii.String("AWS-Managed-Compute-Env"), &computeEnvironmentProps{
	computeResources: &computeResources{
		vpc: vpc,
	},
})

customerManagedEnvironment := batch.NewComputeEnvironment(this, jsii.String("Customer-Managed-Compute-Env"), &computeEnvironmentProps{
	managed: jsii.Boolean(false),
})
Spot-Based Compute Environment

It is possible to have AWS Batch submit spotfleet requests for obtaining compute resources. Below is an example of how this can be done:

vpc := ec2.NewVpc(this, jsii.String("VPC"))

spotEnvironment := batch.NewComputeEnvironment(this, jsii.String("MySpotEnvironment"), &computeEnvironmentProps{
	computeResources: &computeResources{
		type: batch.computeResourceType_SPOT,
		bidPercentage: jsii.Number(75),
		 // Bids for resources at 75% of the on-demand price
		vpc: vpc,
	},
})
Fargate Compute Environment

It is possible to have AWS Batch submit jobs to be run on Fargate compute resources. Below is an example of how this can be done:

vpc := ec2.NewVpc(this, jsii.String("VPC"))

fargateSpotEnvironment := batch.NewComputeEnvironment(this, jsii.String("MyFargateEnvironment"), &computeEnvironmentProps{
	computeResources: &computeResources{
		type: batch.computeResourceType_FARGATE_SPOT,
		vpc: vpc,
	},
})
Understanding Progressive Allocation Strategies

AWS Batch uses an allocation strategy to determine what compute resource will efficiently handle incoming job requests. By default, BEST_FIT will pick an available compute instance based on vCPU requirements. If none exist, the job will wait until resources become available. However, with this strategy, you may have jobs waiting in the queue unnecessarily despite having more powerful instances available. Below is an example of how that situation might look like:

Compute Environment:

1. m5.xlarge => 4 vCPU
2. m5.2xlarge => 8 vCPU
Job Queue:
---------
| A | B |
---------

Job Requirements:
A => 4 vCPU - ALLOCATED TO m5.xlarge
B => 2 vCPU - WAITING

In this situation, Batch will allocate Job A to compute resource #1 because it is the most cost efficient resource that matches the vCPU requirement. However, with this BEST_FIT strategy, Job B will not be allocated to our other available compute resource even though it is strong enough to handle it. Instead, it will wait until the first job is finished processing or wait a similar m5.xlarge resource to be provisioned.

The alternative would be to use the BEST_FIT_PROGRESSIVE strategy in order for the remaining job to be handled in larger containers regardless of vCPU requirement and costs.

Launch template support

Simply define your Launch Template:

// This example is only available in TypeScript
const myLaunchTemplate = new ec2.CfnLaunchTemplate(this, 'LaunchTemplate', {
  launchTemplateName: 'extra-storage-template',
  launchTemplateData: {
    blockDeviceMappings: [
      {
        deviceName: '/dev/xvdcz',
        ebs: {
          encrypted: true,
          volumeSize: 100,
          volumeType: 'gp2',
        },
      },
    ],
  },
});

and use it:

var vpc vpc
var myLaunchTemplate cfnLaunchTemplate


myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
	computeResources: &computeResources{
		launchTemplate: &launchTemplateSpecification{
			launchTemplateName: string(myLaunchTemplate.launchTemplateName),
		},
		vpc: vpc,
	},
	computeEnvironmentName: jsii.String("MyStorageCapableComputeEnvironment"),
})
Importing an existing Compute Environment

To import an existing batch compute environment, call ComputeEnvironment.fromComputeEnvironmentArn().

Below is an example:

computeEnv := batch.computeEnvironment.fromComputeEnvironmentArn(this, jsii.String("imported-compute-env"), jsii.String("arn:aws:batch:us-east-1:555555555555:compute-environment/My-Compute-Env"))
Change the baseline AMI of the compute resources

Occasionally, you will need to deviate from the default processing AMI.

ECS Optimized Amazon Linux 2 example:

var vpc vpc

myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
	computeResources: &computeResources{
		image: ecs.NewEcsOptimizedAmi(&ecsOptimizedAmiProps{
			generation: ec2.amazonLinuxGeneration_AMAZON_LINUX_2,
		}),
		vpc: vpc,
	},
})

Custom based AMI example:

var vpc vpc

myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
	computeResources: &computeResources{
		image: ec2.machineImage.genericLinux(map[string]*string{
			"[aws-region]": jsii.String("[ami-ID]"),
		}),
		vpc: vpc,
	},
})

Job Queue

Jobs are always submitted to a specific queue. This means that you have to create a queue before you can start submitting jobs. Each queue is mapped to at least one (and no more than three) compute environment. When the job is scheduled for execution, AWS Batch will select the compute environment based on ordinal priority and available capacity in each environment.

var computeEnvironment computeEnvironment

jobQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
	computeEnvironments: []jobQueueComputeEnvironment{
		&jobQueueComputeEnvironment{
			// Defines a collection of compute resources to handle assigned batch jobs
			computeEnvironment: computeEnvironment,
			// Order determines the allocation order for jobs (i.e. Lower means higher preference for job assignment)
			order: jsii.Number(1),
		},
	},
})
Priorty-Based Queue Example

Sometimes you might have jobs that are more important than others, and when submitted, should take precedence over the existing jobs. To achieve this, you can create a priority based execution strategy, by assigning each queue its own priority:

var sharedComputeEnvs computeEnvironment

highPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
	computeEnvironments: []jobQueueComputeEnvironment{
		&jobQueueComputeEnvironment{
			computeEnvironment: sharedComputeEnvs,
			order: jsii.Number(1),
		},
	},
	priority: jsii.Number(2),
})

lowPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
	computeEnvironments: []*jobQueueComputeEnvironment{
		&jobQueueComputeEnvironment{
			computeEnvironment: sharedComputeEnvs,
			order: jsii.Number(1),
		},
	},
	priority: jsii.Number(1),
})

By making sure to use the same compute environments between both job queues, we will give precedence to the highPrioQueue for the assigning of jobs to available compute environments.

Importing an existing Job Queue

To import an existing batch job queue, call JobQueue.fromJobQueueArn().

Below is an example:

jobQueue := batch.jobQueue.fromJobQueueArn(this, jsii.String("imported-job-queue"), jsii.String("arn:aws:batch:us-east-1:555555555555:job-queue/High-Prio-Queue"))

Job Definition

A Batch Job definition helps AWS Batch understand important details about how to run your application in the scope of a Batch Job. This involves key information like resource requirements, what containers to run, how the compute environment should be prepared, and more. Below is a simple example of how to create a job definition:

import ecr "github.com/aws/aws-cdk-go/awscdk"


repo := ecr.repository.fromRepositoryName(this, jsii.String("batch-job-repo"), jsii.String("todo-list"))

batch.NewJobDefinition(this, jsii.String("batch-job-def-from-ecr"), &jobDefinitionProps{
	container: &jobDefinitionContainer{
		image: ecs.NewEcrImage(repo, jsii.String("latest")),
	},
})
Using a local Docker project

Below is an example of how you can create a Batch Job Definition from a local Docker application.

batch.NewJobDefinition(this, jsii.String("batch-job-def-from-local"), &jobDefinitionProps{
	container: &jobDefinitionContainer{
		// todo-list is a directory containing a Dockerfile to build the application
		image: ecs.containerImage.fromAsset(jsii.String("../todo-list")),
	},
})
Providing custom log configuration

You can provide custom log driver and its configuration for the container.

import ssm "github.com/aws/aws-cdk-go/awscdk"


batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
	container: &jobDefinitionContainer{
		image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
		logConfiguration: &logConfiguration{
			logDriver: batch.logDriver_AWSLOGS,
			options: map[string]*string{
				"awslogs-region": jsii.String("us-east-1"),
			},
			secretOptions: []exposedSecret{
				batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
			},
		},
	},
})
Importing an existing Job Definition
From ARN

To import an existing batch job definition from its ARN, call JobDefinition.fromJobDefinitionArn().

Below is an example:

job := batch.jobDefinition.fromJobDefinitionArn(this, jsii.String("imported-job-definition"), jsii.String("arn:aws:batch:us-east-1:555555555555:job-definition/my-job-definition"))
From Name

To import an existing batch job definition from its name, call JobDefinition.fromJobDefinitionName(). If name is specified without a revision then the latest active revision is used.

Below is an example:

// Without revision
job1 := batch.jobDefinition.fromJobDefinitionName(this, jsii.String("imported-job-definition"), jsii.String("my-job-definition"))

// With revision
job2 := batch.jobDefinition.fromJobDefinitionName(this, jsii.String("imported-job-definition"), jsii.String("my-job-definition:3"))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CfnComputeEnvironment_CFN_RESOURCE_TYPE_NAME

func CfnComputeEnvironment_CFN_RESOURCE_TYPE_NAME() *string

func CfnComputeEnvironment_IsCfnElement

func CfnComputeEnvironment_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnComputeEnvironment_IsCfnResource

func CfnComputeEnvironment_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnComputeEnvironment_IsConstruct

func CfnComputeEnvironment_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnJobDefinition_CFN_RESOURCE_TYPE_NAME

func CfnJobDefinition_CFN_RESOURCE_TYPE_NAME() *string

func CfnJobDefinition_IsCfnElement

func CfnJobDefinition_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnJobDefinition_IsCfnResource

func CfnJobDefinition_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnJobDefinition_IsConstruct

func CfnJobDefinition_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnJobQueue_CFN_RESOURCE_TYPE_NAME

func CfnJobQueue_CFN_RESOURCE_TYPE_NAME() *string

func CfnJobQueue_IsCfnElement

func CfnJobQueue_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnJobQueue_IsCfnResource

func CfnJobQueue_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnJobQueue_IsConstruct

func CfnJobQueue_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnSchedulingPolicy_CFN_RESOURCE_TYPE_NAME

func CfnSchedulingPolicy_CFN_RESOURCE_TYPE_NAME() *string

func CfnSchedulingPolicy_IsCfnElement

func CfnSchedulingPolicy_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnSchedulingPolicy_IsCfnResource

func CfnSchedulingPolicy_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnSchedulingPolicy_IsConstruct

func CfnSchedulingPolicy_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func ComputeEnvironment_IsConstruct

func ComputeEnvironment_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func ComputeEnvironment_IsResource

func ComputeEnvironment_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func JobDefinition_IsConstruct

func JobDefinition_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func JobDefinition_IsResource

func JobDefinition_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func JobQueue_IsConstruct

func JobQueue_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func JobQueue_IsResource

func JobQueue_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func NewCfnComputeEnvironment_Override

func NewCfnComputeEnvironment_Override(c CfnComputeEnvironment, scope awscdk.Construct, id *string, props *CfnComputeEnvironmentProps)

Create a new `AWS::Batch::ComputeEnvironment`.

func NewCfnJobDefinition_Override

func NewCfnJobDefinition_Override(c CfnJobDefinition, scope awscdk.Construct, id *string, props *CfnJobDefinitionProps)

Create a new `AWS::Batch::JobDefinition`.

func NewCfnJobQueue_Override

func NewCfnJobQueue_Override(c CfnJobQueue, scope awscdk.Construct, id *string, props *CfnJobQueueProps)

Create a new `AWS::Batch::JobQueue`.

func NewCfnSchedulingPolicy_Override

func NewCfnSchedulingPolicy_Override(c CfnSchedulingPolicy, scope awscdk.Construct, id *string, props *CfnSchedulingPolicyProps)

Create a new `AWS::Batch::SchedulingPolicy`.

func NewComputeEnvironment_Override

func NewComputeEnvironment_Override(c ComputeEnvironment, scope constructs.Construct, id *string, props *ComputeEnvironmentProps)

Experimental.

func NewExposedSecret_Override

func NewExposedSecret_Override(e ExposedSecret, optionName *string, secretArn *string)

Experimental.

func NewJobDefinition_Override

func NewJobDefinition_Override(j JobDefinition, scope constructs.Construct, id *string, props *JobDefinitionProps)

Experimental.

func NewJobQueue_Override

func NewJobQueue_Override(j JobQueue, scope constructs.Construct, id *string, props *JobQueueProps)

Experimental.

Types

type AllocationStrategy

type AllocationStrategy string

Properties for how to prepare compute resources that are provisioned for a compute environment. Experimental.

const (
	// Batch will use the best fitting instance type will be used when assigning a batch job in this compute environment.
	// Experimental.
	AllocationStrategy_BEST_FIT AllocationStrategy = "BEST_FIT"
	// Batch will select additional instance types that are large enough to meet the requirements of the jobs in the queue, with a preference for instance types with a lower cost per unit vCPU.
	// Experimental.
	AllocationStrategy_BEST_FIT_PROGRESSIVE AllocationStrategy = "BEST_FIT_PROGRESSIVE"
	// This is only available for Spot Instance compute resources and will select additional instance types that are large enough to meet the requirements of the jobs in the queue, with a preference for instance types that are less likely to be interrupted.
	// Experimental.
	AllocationStrategy_SPOT_CAPACITY_OPTIMIZED AllocationStrategy = "SPOT_CAPACITY_OPTIMIZED"
)

type CfnComputeEnvironment

type CfnComputeEnvironment interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Returns the compute environment ARN, such as `batch: *us-east-1* : *111122223333* :compute-environment/ *ComputeEnvironmentName*` .
	AttrComputeEnvironmentArn() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// The name for your compute environment.
	//
	// It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
	ComputeEnvironmentName() *string
	SetComputeEnvironmentName(val *string)
	// The ComputeResources property type specifies details of the compute resources managed by the compute environment.
	//
	// This parameter is required for managed compute environments. For more information, see [Compute Environments](https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the ** .
	ComputeResources() interface{}
	SetComputeResources(val interface{})
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// Specifies whether the compute environment should be replaced if an update is made that requires replacing the instances in the compute environment.
	//
	// The default value is `true` . To enable more properties to be updated, set this property to `false` . When changing the value of this property to `false` , no other properties should be changed at the same time. If other properties are changed at the same time, and the change needs to be rolled back but it can't, it's possible for the stack to go into the `UPDATE_ROLLBACK_FAILED` state. You can't update a stack that is in the `UPDATE_ROLLBACK_FAILED` state. However, if you can continue to roll it back, you can return the stack to its original settings and then try to update it again. For more information, see [Continue rolling back an update](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html) in the *AWS CloudFormation User Guide* .
	//
	// The properties that can't be changed without replacing the compute environment are in the [`ComputeResources`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html) property type: [`AllocationStrategy`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-allocationstrategy) , [`BidPercentage`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-bidpercentage) , [`Ec2Configuration`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2configuration) , [`Ec2KeyPair`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2keypair) , [`Ec2KeyPair`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2keypair) , [`ImageId`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-imageid) , [`InstanceRole`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-instancerole) , [`InstanceTypes`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-instancetypes) , [`LaunchTemplate`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-launchtemplate) , [`MaxvCpus`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-maxvcpus) , [`MinvCpus`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-minvcpus) , [`PlacementGroup`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-placementgroup) , [`SecurityGroupIds`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-securitygroupids) , [`Subnets`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-subnets) , [Tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-tags) , [`Type`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-type) , and [`UpdateToLatestImageVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-updatetolatestimageversion) .
	ReplaceComputeEnvironment() interface{}
	SetReplaceComputeEnvironment(val interface{})
	// The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
	//
	// For more information, see [AWS Batch service IAM role](https://docs.aws.amazon.com/batch/latest/userguide/service_IAM_role.html) in the *AWS Batch User Guide* .
	//
	// > If your account already created the AWS Batch service-linked role, that role is used by default for your compute environment unless you specify a different role here. If the AWS Batch service-linked role doesn't exist in your account, and no role is specified here, the service attempts to create the AWS Batch service-linked role in your account.
	//
	// If your specified role has a path other than `/` , then you must specify either the full role ARN (recommended) or prefix the role name with the path. For example, if a role with the name `bar` has a path of `/foo/` then you would specify `/foo/bar` as the role name. For more information, see [Friendly names and paths](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names) in the *IAM User Guide* .
	//
	// > Depending on how you created your AWS Batch service role, its ARN might contain the `service-role` path prefix. When you only specify the name of the service role, AWS Batch assumes that your ARN doesn't use the `service-role` path prefix. Because of this, we recommend that you specify the full ARN of your service role when you create compute environments.
	ServiceRole() *string
	SetServiceRole(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// 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.
	//
	// If the state is `ENABLED` , then the AWS Batch scheduler can attempt to place jobs from an associated job queue on the compute resources within the environment. If the compute environment is managed, then it can scale its instances out or in automatically, based on the job queue demand.
	//
	// If the state is `DISABLED` , then the AWS Batch scheduler doesn't attempt to place jobs within the environment. Jobs in a `STARTING` or `RUNNING` state continue to progress normally. Managed compute environments in the `DISABLED` state don't scale out. However, they scale in to `minvCpus` value after instances become idle.
	State() *string
	SetState(val *string)
	// The tags applied to the compute environment.
	Tags() awscdk.TagManager
	// The type of the compute environment: `MANAGED` or `UNMANAGED` .
	//
	// For more information, see [Compute Environments](https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the *AWS Batch User Guide* .
	Type() *string
	SetType(val *string)
	// The maximum number of vCPUs for an unmanaged compute environment.
	//
	// This parameter is only used for fair share scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for a fair share job queue, no vCPU capacity is reserved.
	//
	// > This parameter is only supported when the `type` parameter is set to `UNMANAGED` .
	UnmanagedvCpus() *float64
	SetUnmanagedvCpus(val *float64)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Specifies the infrastructure update policy for the compute environment.
	//
	// For more information about infrastructure updates, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	UpdatePolicy() interface{}
	SetUpdatePolicy(val interface{})
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::Batch::ComputeEnvironment`.

The `AWS::Batch::ComputeEnvironment` resource defines your AWS Batch compute environment. You can define `MANAGED` or `UNMANAGED` compute environments. `MANAGED` compute environments can use Amazon EC2 or AWS Fargate resources. `UNMANAGED` compute environments can only use EC2 resources. For more information, see [Compute Environments](https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the ** .

In a managed compute environment, AWS Batch manages the capacity and instance types of the compute resources within the environment. This is based on the compute resource specification that you define or the [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) that you specify when you create the compute environment. You can choose either to use EC2 On-Demand Instances and EC2 Spot Instances, or to use Fargate and Fargate Spot capacity in your managed compute environment. You can optionally set a maximum price so that Spot Instances only launch when the Spot Instance price is below a specified percentage of the On-Demand price.

> Multi-node parallel jobs are not supported on Spot Instances.

In an unmanaged compute environment, you can manage your own EC2 compute resources and have a lot of flexibility with how you configure your compute resources. For example, you can use custom AMI. However, you need to verify that your AMI meets the Amazon ECS container instance AMI specification. For more information, see [container instance AMIs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container_instance_AMIs.html) in the *Amazon Elastic Container Service Developer Guide* . After you have created your unmanaged compute environment, you can use the [DescribeComputeEnvironments](https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeComputeEnvironments.html) operation to find the Amazon ECS cluster that is associated with it. Then, manually launch your container instances into that Amazon ECS cluster. For more information, see [Launching an Amazon ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html) in the *Amazon Elastic Container Service Developer Guide* .

> AWS Batch doesn't upgrade the AMIs in a compute environment after it's created except under specific conditions. For example, it doesn't automatically update the AMIs when a newer version of the Amazon ECS optimized AMI is available. Therefore, you're responsible for the management of the guest operating system (including updates and security patches) and any additional application software or utilities that you install on the compute resources. There are two ways to use a new AMI for your AWS Batch jobs. The original method is to complete these steps: > > - Create a new compute environment with the new AMI. > - Add the compute environment to an existing job queue. > - Remove the earlier compute environment from your job queue. > - Delete the earlier compute environment. > > In April 2022, AWS Batch added enhanced support for updating compute environments. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* . To use the enhanced updating of compute environments to update AMIs, follow these rules: > > - Either do not set the [ServiceRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-servicerole) property or set it to the *AWSServiceRoleForBatch* service-linked role. > - Set the AllocationStrategy(https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-allocationstrategy) property to `BEST_FIT_PROGRESSIVE` or `SPOT_CAPACITY_OPTIMIZED` . > - Set the [ReplaceComputeEnvironment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-replacecomputeenvironment) property to `false` . > - Set the [UpdateToLatestImageVersion](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-updatetolatestimageversion) property to `true` . > - Either do not specify an image ID in [ImageId](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-imageid) or [ImageIdOverride](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-ec2configurationobject.html#cfn-batch-computeenvironment-ec2configurationobject-imageidoverride) properties, or in the launch template identified by the [Launch Template](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-launchtemplate) property. In that case AWS Batch will select the latest Amazon ECS optimized AMI supported by AWS Batch at the time the infrastructure update is initiated. Alternatively you can specify the AMI ID in the `ImageId` or `ImageIdOverride` properties, or the launch template identified by the `LaunchTemplate` properties. Changing any of these properties will trigger an infrastructure update. > > If these rules are followed, any update that triggers an infrastructure update will cause the AMI ID to be re-selected. If the [Version](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-launchtemplatespecification.html#cfn-batch-computeenvironment-launchtemplatespecification-version) property of the LaunchTemplateSpecification(https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-launchtemplatespecification.html) is set to `$Latest` or `$Default` , the latest or default version of the launch template will be evaluated up at the time of the infrastructure update, even if the `LaunchTemplateSpecification` was not updated.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnComputeEnvironment := awscdk.Aws_batch.NewCfnComputeEnvironment(this, jsii.String("MyCfnComputeEnvironment"), &cfnComputeEnvironmentProps{
	type: jsii.String("type"),

	// the properties below are optional
	computeEnvironmentName: jsii.String("computeEnvironmentName"),
	computeResources: &computeResourcesProperty{
		maxvCpus: jsii.Number(123),
		subnets: []*string{
			jsii.String("subnets"),
		},
		type: jsii.String("type"),

		// the properties below are optional
		allocationStrategy: jsii.String("allocationStrategy"),
		bidPercentage: jsii.Number(123),
		desiredvCpus: jsii.Number(123),
		ec2Configuration: []interface{}{
			&ec2ConfigurationObjectProperty{
				imageType: jsii.String("imageType"),

				// the properties below are optional
				imageIdOverride: jsii.String("imageIdOverride"),
			},
		},
		ec2KeyPair: jsii.String("ec2KeyPair"),
		imageId: jsii.String("imageId"),
		instanceRole: jsii.String("instanceRole"),
		instanceTypes: []*string{
			jsii.String("instanceTypes"),
		},
		launchTemplate: &launchTemplateSpecificationProperty{
			launchTemplateId: jsii.String("launchTemplateId"),
			launchTemplateName: jsii.String("launchTemplateName"),
			version: jsii.String("version"),
		},
		minvCpus: jsii.Number(123),
		placementGroup: jsii.String("placementGroup"),
		securityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
		spotIamFleetRole: jsii.String("spotIamFleetRole"),
		tags: map[string]*string{
			"tagsKey": jsii.String("tags"),
		},
		updateToLatestImageVersion: jsii.Boolean(false),
	},
	replaceComputeEnvironment: jsii.Boolean(false),
	serviceRole: jsii.String("serviceRole"),
	state: jsii.String("state"),
	tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
	unmanagedvCpus: jsii.Number(123),
	updatePolicy: &updatePolicyProperty{
		jobExecutionTimeoutMinutes: jsii.Number(123),
		terminateJobsOnUpdate: jsii.Boolean(false),
	},
})

func NewCfnComputeEnvironment

func NewCfnComputeEnvironment(scope awscdk.Construct, id *string, props *CfnComputeEnvironmentProps) CfnComputeEnvironment

Create a new `AWS::Batch::ComputeEnvironment`.

type CfnComputeEnvironmentProps

type CfnComputeEnvironmentProps struct {
	// The type of the compute environment: `MANAGED` or `UNMANAGED` .
	//
	// For more information, see [Compute Environments](https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the *AWS Batch User Guide* .
	Type *string `field:"required" json:"type" yaml:"type"`
	// The name for your compute environment.
	//
	// It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
	ComputeEnvironmentName *string `field:"optional" json:"computeEnvironmentName" yaml:"computeEnvironmentName"`
	// The ComputeResources property type specifies details of the compute resources managed by the compute environment.
	//
	// This parameter is required for managed compute environments. For more information, see [Compute Environments](https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the ** .
	ComputeResources interface{} `field:"optional" json:"computeResources" yaml:"computeResources"`
	// Specifies whether the compute environment should be replaced if an update is made that requires replacing the instances in the compute environment.
	//
	// The default value is `true` . To enable more properties to be updated, set this property to `false` . When changing the value of this property to `false` , no other properties should be changed at the same time. If other properties are changed at the same time, and the change needs to be rolled back but it can't, it's possible for the stack to go into the `UPDATE_ROLLBACK_FAILED` state. You can't update a stack that is in the `UPDATE_ROLLBACK_FAILED` state. However, if you can continue to roll it back, you can return the stack to its original settings and then try to update it again. For more information, see [Continue rolling back an update](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html) in the *AWS CloudFormation User Guide* .
	//
	// The properties that can't be changed without replacing the compute environment are in the [`ComputeResources`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html) property type: [`AllocationStrategy`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-allocationstrategy) , [`BidPercentage`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-bidpercentage) , [`Ec2Configuration`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2configuration) , [`Ec2KeyPair`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2keypair) , [`Ec2KeyPair`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-ec2keypair) , [`ImageId`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-imageid) , [`InstanceRole`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-instancerole) , [`InstanceTypes`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-instancetypes) , [`LaunchTemplate`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-launchtemplate) , [`MaxvCpus`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-maxvcpus) , [`MinvCpus`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-minvcpus) , [`PlacementGroup`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-placementgroup) , [`SecurityGroupIds`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-securitygroupids) , [`Subnets`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-subnets) , [Tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-tags) , [`Type`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-type) , and [`UpdateToLatestImageVersion`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-updatetolatestimageversion) .
	ReplaceComputeEnvironment interface{} `field:"optional" json:"replaceComputeEnvironment" yaml:"replaceComputeEnvironment"`
	// The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to other AWS services on your behalf.
	//
	// For more information, see [AWS Batch service IAM role](https://docs.aws.amazon.com/batch/latest/userguide/service_IAM_role.html) in the *AWS Batch User Guide* .
	//
	// > If your account already created the AWS Batch service-linked role, that role is used by default for your compute environment unless you specify a different role here. If the AWS Batch service-linked role doesn't exist in your account, and no role is specified here, the service attempts to create the AWS Batch service-linked role in your account.
	//
	// If your specified role has a path other than `/` , then you must specify either the full role ARN (recommended) or prefix the role name with the path. For example, if a role with the name `bar` has a path of `/foo/` then you would specify `/foo/bar` as the role name. For more information, see [Friendly names and paths](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names) in the *IAM User Guide* .
	//
	// > Depending on how you created your AWS Batch service role, its ARN might contain the `service-role` path prefix. When you only specify the name of the service role, AWS Batch assumes that your ARN doesn't use the `service-role` path prefix. Because of this, we recommend that you specify the full ARN of your service role when you create compute environments.
	ServiceRole *string `field:"optional" json:"serviceRole" yaml:"serviceRole"`
	// 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.
	//
	// If the state is `ENABLED` , then the AWS Batch scheduler can attempt to place jobs from an associated job queue on the compute resources within the environment. If the compute environment is managed, then it can scale its instances out or in automatically, based on the job queue demand.
	//
	// If the state is `DISABLED` , then the AWS Batch scheduler doesn't attempt to place jobs within the environment. Jobs in a `STARTING` or `RUNNING` state continue to progress normally. Managed compute environments in the `DISABLED` state don't scale out. However, they scale in to `minvCpus` value after instances become idle.
	State *string `field:"optional" json:"state" yaml:"state"`
	// The tags applied to the compute environment.
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
	// The maximum number of vCPUs for an unmanaged compute environment.
	//
	// This parameter is only used for fair share scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for a fair share job queue, no vCPU capacity is reserved.
	//
	// > This parameter is only supported when the `type` parameter is set to `UNMANAGED` .
	UnmanagedvCpus *float64 `field:"optional" json:"unmanagedvCpus" yaml:"unmanagedvCpus"`
	// Specifies the infrastructure update policy for the compute environment.
	//
	// For more information about infrastructure updates, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	UpdatePolicy interface{} `field:"optional" json:"updatePolicy" yaml:"updatePolicy"`
}

Properties for defining a `CfnComputeEnvironment`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnComputeEnvironmentProps := &cfnComputeEnvironmentProps{
	type: jsii.String("type"),

	// the properties below are optional
	computeEnvironmentName: jsii.String("computeEnvironmentName"),
	computeResources: &computeResourcesProperty{
		maxvCpus: jsii.Number(123),
		subnets: []*string{
			jsii.String("subnets"),
		},
		type: jsii.String("type"),

		// the properties below are optional
		allocationStrategy: jsii.String("allocationStrategy"),
		bidPercentage: jsii.Number(123),
		desiredvCpus: jsii.Number(123),
		ec2Configuration: []interface{}{
			&ec2ConfigurationObjectProperty{
				imageType: jsii.String("imageType"),

				// the properties below are optional
				imageIdOverride: jsii.String("imageIdOverride"),
			},
		},
		ec2KeyPair: jsii.String("ec2KeyPair"),
		imageId: jsii.String("imageId"),
		instanceRole: jsii.String("instanceRole"),
		instanceTypes: []*string{
			jsii.String("instanceTypes"),
		},
		launchTemplate: &launchTemplateSpecificationProperty{
			launchTemplateId: jsii.String("launchTemplateId"),
			launchTemplateName: jsii.String("launchTemplateName"),
			version: jsii.String("version"),
		},
		minvCpus: jsii.Number(123),
		placementGroup: jsii.String("placementGroup"),
		securityGroupIds: []*string{
			jsii.String("securityGroupIds"),
		},
		spotIamFleetRole: jsii.String("spotIamFleetRole"),
		tags: map[string]*string{
			"tagsKey": jsii.String("tags"),
		},
		updateToLatestImageVersion: jsii.Boolean(false),
	},
	replaceComputeEnvironment: jsii.Boolean(false),
	serviceRole: jsii.String("serviceRole"),
	state: jsii.String("state"),
	tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
	unmanagedvCpus: jsii.Number(123),
	updatePolicy: &updatePolicyProperty{
		jobExecutionTimeoutMinutes: jsii.Number(123),
		terminateJobsOnUpdate: jsii.Boolean(false),
	},
}

type CfnComputeEnvironment_ComputeResourcesProperty

type CfnComputeEnvironment_ComputeResourcesProperty struct {
	// The maximum number of Amazon EC2 vCPUs that an environment can reach.
	//
	// > With both `BEST_FIT_PROGRESSIVE` and `SPOT_CAPACITY_OPTIMIZED` allocation strategies, AWS Batch might need to exceed `maxvCpus` to meet your capacity requirements. In this event, AWS Batch never exceeds `maxvCpus` by more than a single instance. That is, no more than a single instance from among those specified in your compute environment.
	MaxvCpus *float64 `field:"required" json:"maxvCpus" yaml:"maxvCpus"`
	// The VPC subnets where the compute resources are launched.
	//
	// Fargate compute resources can contain up to 16 subnets. For Fargate compute resources, providing an empty list will be handled as if this parameter wasn't specified and no change is made. For EC2 compute resources, providing an empty list removes the VPC subnets from the compute resource. For more information, see [VPCs and subnets](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html) in the *Amazon VPC User Guide* .
	//
	// When updating a compute environment, changing the VPC subnets requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	Subnets *[]*string `field:"required" json:"subnets" yaml:"subnets"`
	// The type of compute environment: `EC2` , `SPOT` , `FARGATE` , or `FARGATE_SPOT` .
	//
	// For more information, see [Compute environments](https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the *AWS Batch User Guide* .
	//
	// If you choose `SPOT` , you must also specify an Amazon EC2 Spot Fleet role with the `spotIamFleetRole` parameter. For more information, see [Amazon EC2 spot fleet role](https://docs.aws.amazon.com/batch/latest/userguide/spot_fleet_IAM_role.html) in the *AWS Batch User Guide* .
	//
	// When updating compute environment, changing the type of a compute environment requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	//
	// When updating the type of a compute environment, changing between `EC2` and `SPOT` or between `FARGATE` and `FARGATE_SPOT` will initiate an infrastructure update, but if you switch between `EC2` and `FARGATE` , AWS CloudFormation will create a new compute environment.
	Type *string `field:"required" json:"type" yaml:"type"`
	// The allocation strategy to use for the compute resource if not enough instances of the best fitting instance type can be allocated.
	//
	// This might be because of availability of the instance type in the Region or [Amazon EC2 service limits](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html) . For more information, see [Allocation strategies](https://docs.aws.amazon.com/batch/latest/userguide/allocation-strategies.html) in the *AWS Batch User Guide* .
	//
	// When updating a compute environment, changing the allocation strategy requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* . `BEST_FIT` is not supported when updating a compute environment.
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
	//
	// - **BEST_FIT (default)** - AWS Batch selects an instance type that best fits the needs of the jobs with a preference for the lowest-cost instance type. If additional instances of the selected instance type aren't available, AWS Batch waits for the additional instances to be available. If there aren't enough instances available, or if the user is reaching [Amazon EC2 service limits](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html) then additional jobs aren't run until the currently running jobs have completed. This allocation strategy keeps costs lower but can limit scaling. If you are using Spot Fleets with `BEST_FIT` then the Spot Fleet IAM role must be specified.
	// - **BEST_FIT_PROGRESSIVE** - AWS Batch will select additional instance types that are large enough to meet the requirements of the jobs in the queue, with a preference for instance types with a lower cost per unit vCPU. If additional instances of the previously selected instance types aren't available, AWS Batch will select new instance types.
	// - **SPOT_CAPACITY_OPTIMIZED** - AWS Batch will select one or more instance types that are large enough to meet the requirements of the jobs in the queue, with a preference for instance types that are less likely to be interrupted. This allocation strategy is only available for Spot Instance compute resources.
	//
	// With both `BEST_FIT_PROGRESSIVE` and `SPOT_CAPACITY_OPTIMIZED` strategies, AWS Batch might need to go above `maxvCpus` to meet your capacity requirements. In this event, AWS Batch never exceeds `maxvCpus` by more than a single instance.
	AllocationStrategy *string `field:"optional" json:"allocationStrategy" yaml:"allocationStrategy"`
	// The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.
	//
	// For example, if your maximum percentage is 20%, then the Spot price must be less than 20% of the current On-Demand price for that Amazon EC2 instance. You always pay the lowest (market) price and never more than your maximum percentage.
	//
	// When updating a compute environment, changing the bid percentage requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
	BidPercentage *float64 `field:"optional" json:"bidPercentage" yaml:"bidPercentage"`
	// The desired number of Amazon EC2 vCPUS in the compute environment.
	//
	// AWS Batch modifies this value between the minimum and maximum values based on job queue demand.
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
	DesiredvCpus *float64 `field:"optional" json:"desiredvCpus" yaml:"desiredvCpus"`
	// 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` .
	//
	// When updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* . To remove the EC2 configuration and any custom AMI ID specified in `imageIdOverride` , set this value to an empty string.
	//
	// One or two values can be provided.
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
	Ec2Configuration interface{} `field:"optional" json:"ec2Configuration" yaml:"ec2Configuration"`
	// The Amazon EC2 key pair that's used for instances launched in the compute environment.
	//
	// You can use this key pair to log in to your instances with SSH. To remove the Amazon EC2 key pair, set this value to an empty string.
	//
	// When updating a compute environment, changing the EC2 key pair requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
	Ec2KeyPair *string `field:"optional" json:"ec2KeyPair" yaml:"ec2KeyPair"`
	// The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
	//
	// This parameter is overridden by the `imageIdOverride` member of the `Ec2Configuration` structure. To remove the custom AMI ID and use the default AMI ID, set this value to an empty string.
	//
	// When updating a compute environment, changing the AMI ID requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified. > The AMI that you choose for a compute environment must match the architecture of the instance types that you intend to use for that compute environment. For example, if your compute environment uses A1 instance types, the compute resource AMI that you choose must support ARM instances. Amazon ECS vends both x86 and ARM versions of the Amazon ECS-optimized Amazon Linux 2 AMI. For more information, see [Amazon ECS-optimized Amazon Linux 2 AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#ecs-optimized-ami-linux-variants.html) in the *Amazon Elastic Container Service Developer Guide* .
	ImageId *string `field:"optional" json:"imageId" yaml:"imageId"`
	// The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.
	//
	// You can specify the short name or full Amazon Resource Name (ARN) of an instance profile. For example, `*ecsInstanceRole*` or `arn:aws:iam:: *<aws_account_id>* :instance-profile/ *ecsInstanceRole*` . For more information, see [Amazon ECS instance role](https://docs.aws.amazon.com/batch/latest/userguide/instance_IAM_role.html) in the *AWS Batch User Guide* .
	//
	// When updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
	InstanceRole *string `field:"optional" json:"instanceRole" yaml:"instanceRole"`
	// The instances types that can be launched.
	//
	// You can specify instance families to launch any instance type within those families (for example, `c5` or `p3` ), or you can specify specific sizes within a family (such as `c5.8xlarge` ). You can also choose `optimal` to select instance types (from the C4, M4, and R4 instance families) that match the demand of your job queues.
	//
	// When updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified. > When you create a compute environment, the instance types that you select for the compute environment must share the same architecture. For example, you can't mix x86 and ARM instances in the same compute environment. > Currently, `optimal` uses instance types from the C4, M4, and R4 instance families. In Regions that don't have instance types from those instance families, instance types from the C5, M5. and R5 instance families are used.
	InstanceTypes *[]*string `field:"optional" json:"instanceTypes" yaml:"instanceTypes"`
	// The launch template to use for your compute resources.
	//
	// Any other compute resource parameters that you specify in a [CreateComputeEnvironment](https://docs.aws.amazon.com/batch/latest/APIReference/API_CreateComputeEnvironment.html) API operation override the same parameters in the launch template. You must specify either the launch template ID or launch template name in the request, but not both. For more information, see [Launch Template Support](https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html) in the ** .
	//
	// > This parameter isn't applicable to jobs running on Fargate resources, and shouldn't be specified.
	LaunchTemplate interface{} `field:"optional" json:"launchTemplate" yaml:"launchTemplate"`
	// The minimum number of Amazon EC2 vCPUs that an environment should maintain (even if the compute environment is `DISABLED` ).
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
	MinvCpus *float64 `field:"optional" json:"minvCpus" yaml:"minvCpus"`
	// The Amazon EC2 placement group to associate with your compute resources.
	//
	// If you intend to submit multi-node parallel jobs to your compute environment, you should consider creating a cluster placement group and associate it with your compute resources. This keeps your multi-node parallel job on a logical grouping of instances within a single Availability Zone with high network flow potential. For more information, see [Placement groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in the *Amazon EC2 User Guide for Linux Instances* .
	//
	// When updating a compute environment, changing the placement group requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
	PlacementGroup *string `field:"optional" json:"placementGroup" yaml:"placementGroup"`
	// The Amazon EC2 security groups associated with instances launched in the compute environment.
	//
	// This parameter is required for Fargate compute resources, where it can contain up to 5 security groups. For Fargate compute resources, providing an empty list is handled as if this parameter wasn't specified and no change is made. For EC2 compute resources, providing an empty list removes the security groups from the compute resource.
	//
	// When updating a compute environment, changing the EC2 security groups requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	SecurityGroupIds *[]*string `field:"optional" json:"securityGroupIds" yaml:"securityGroupIds"`
	// The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a `SPOT` compute environment.
	//
	// This role is required if the allocation strategy set to `BEST_FIT` or if the allocation strategy isn't specified. For more information, see [Amazon EC2 spot fleet role](https://docs.aws.amazon.com/batch/latest/userguide/spot_fleet_IAM_role.html) in the *AWS Batch User Guide* .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified. > To tag your Spot Instances on creation, the Spot Fleet IAM role specified here must use the newer *AmazonEC2SpotFleetTaggingRole* managed policy. The previously recommended *AmazonEC2SpotFleetRole* managed policy doesn't have the required permissions to tag Spot Instances. For more information, see [Spot instances not tagged on creation](https://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html#spot-instance-no-tag) in the *AWS Batch User Guide* .
	SpotIamFleetRole *string `field:"optional" json:"spotIamFleetRole" yaml:"spotIamFleetRole"`
	// Key-value pair tags to be applied to EC2 resources that are launched in the compute environment.
	//
	// For AWS Batch , these take the form of "String1": "String2", where String1 is the tag key and String2 is the tag value−for example, `{ "Name": "Batch Instance - C4OnDemand" }` . This is helpful for recognizing your AWS Batch instances in the Amazon EC2 console. These tags aren't seen when using the AWS Batch `ListTagsForResource` API operation.
	//
	// When updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be specified.
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
	// Specifies whether the AMI ID is updated to the latest one that's supported by AWS Batch when the compute environment has an infrastructure update.
	//
	// The default value is `false` .
	//
	// > If an AMI ID is specified in the `imageId` or `imageIdOverride` parameters or by the launch template specified in the `launchTemplate` parameter, this parameter is ignored. For more information on updating AMI IDs during an infrastructure update, see [Updating the AMI ID](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html#updating-compute-environments-ami) in the *AWS Batch User Guide* .
	//
	// When updating a compute environment, changing this setting requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	UpdateToLatestImageVersion interface{} `field:"optional" json:"updateToLatestImageVersion" yaml:"updateToLatestImageVersion"`
}

Details about the compute resources managed by the compute environment.

This parameter is required for managed compute environments. For more information, see [Compute Environments](https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the *AWS Batch User Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

computeResourcesProperty := &computeResourcesProperty{
	maxvCpus: jsii.Number(123),
	subnets: []*string{
		jsii.String("subnets"),
	},
	type: jsii.String("type"),

	// the properties below are optional
	allocationStrategy: jsii.String("allocationStrategy"),
	bidPercentage: jsii.Number(123),
	desiredvCpus: jsii.Number(123),
	ec2Configuration: []interface{}{
		&ec2ConfigurationObjectProperty{
			imageType: jsii.String("imageType"),

			// the properties below are optional
			imageIdOverride: jsii.String("imageIdOverride"),
		},
	},
	ec2KeyPair: jsii.String("ec2KeyPair"),
	imageId: jsii.String("imageId"),
	instanceRole: jsii.String("instanceRole"),
	instanceTypes: []*string{
		jsii.String("instanceTypes"),
	},
	launchTemplate: &launchTemplateSpecificationProperty{
		launchTemplateId: jsii.String("launchTemplateId"),
		launchTemplateName: jsii.String("launchTemplateName"),
		version: jsii.String("version"),
	},
	minvCpus: jsii.Number(123),
	placementGroup: jsii.String("placementGroup"),
	securityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	spotIamFleetRole: jsii.String("spotIamFleetRole"),
	tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
	updateToLatestImageVersion: jsii.Boolean(false),
}

type CfnComputeEnvironment_Ec2ConfigurationObjectProperty

type CfnComputeEnvironment_Ec2ConfigurationObjectProperty struct {
	// The image type to match with the instance type to select an AMI.
	//
	// If the `imageIdOverride` parameter isn't specified, then a recent [Amazon ECS-optimized Amazon Linux 2 AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#al2ami) ( `ECS_AL2` ) is used. If a new image type is specified in an update, but neither an `imageId` nor a `imageIdOverride` parameter is specified, then the latest Amazon ECS optimized AMI for that image type that's supported by AWS Batch is used.
	//
	// - **ECS_AL2** - [Amazon Linux 2](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#al2ami) − Default for all non-GPU instance families.
	// - **ECS_AL2_NVIDIA** - [Amazon Linux 2 (GPU)](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#gpuami) −Default for all GPU instance families (for example `P4` and `G4` ) and can be used for all non AWS Graviton-based instance types.
	// - **ECS_AL1** - [Amazon Linux](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#alami) . Amazon Linux is reaching the end-of-life of standard support. For more information, see [Amazon Linux AMI](https://docs.aws.amazon.com/amazon-linux-ami/) .
	ImageType *string `field:"required" json:"imageType" yaml:"imageType"`
	// The AMI ID used for instances launched in the compute environment that match the image type.
	//
	// This setting overrides the `imageId` set in the `computeResource` object.
	//
	// > The AMI that you choose for a compute environment must match the architecture of the instance types that you intend to use for that compute environment. For example, if your compute environment uses A1 instance types, the compute resource AMI that you choose must support ARM instances. Amazon ECS vends both x86 and ARM versions of the Amazon ECS-optimized Amazon Linux 2 AMI. For more information, see [Amazon ECS-optimized Amazon Linux 2 AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#ecs-optimized-ami-linux-variants.html) in the *Amazon Elastic Container Service Developer Guide* .
	ImageIdOverride *string `field:"optional" json:"imageIdOverride" yaml:"imageIdOverride"`
}

Provides information used to select Amazon Machine Images (AMIs) for instances in the compute environment.

If `Ec2Configuration` isn't specified, the default is `ECS_AL2` ( [Amazon Linux 2](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#al2ami) ).

> This object isn't applicable to jobs that are running on Fargate resources.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

ec2ConfigurationObjectProperty := &ec2ConfigurationObjectProperty{
	imageType: jsii.String("imageType"),

	// the properties below are optional
	imageIdOverride: jsii.String("imageIdOverride"),
}

type CfnComputeEnvironment_LaunchTemplateSpecificationProperty

type CfnComputeEnvironment_LaunchTemplateSpecificationProperty struct {
	// The ID of the launch template.
	LaunchTemplateId *string `field:"optional" json:"launchTemplateId" yaml:"launchTemplateId"`
	// The name of the launch template.
	LaunchTemplateName *string `field:"optional" json:"launchTemplateName" yaml:"launchTemplateName"`
	// The version number of the launch template, `$Latest` , or `$Default` .
	//
	// If the value is `$Latest` , the latest version of the launch template is used. If the value is `$Default` , the default version of the launch template is used.
	//
	// > If the AMI ID that's used in a compute environment is from the launch template, the AMI isn't changed when the compute environment is updated. It's only changed if the `updateToLatestImageVersion` parameter for the compute environment is set to `true` . During an infrastructure update, if either `$Latest` or `$Default` is specified, AWS Batch re-evaluates the launch template version, and it might use a different version of the launch template. This is the case even if the launch template isn't specified in the update. When updating a compute environment, changing the launch template requires an infrastructure update of the compute environment. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
	//
	// Default: `$Default` .
	Version *string `field:"optional" json:"version" yaml:"version"`
}

An object representing a launch template associated with a compute resource.

You must specify either the launch template ID or launch template name in the request, but not both.

If security groups are specified using both the `securityGroupIds` parameter of `CreateComputeEnvironment` and the launch template, the values in the `securityGroupIds` parameter of `CreateComputeEnvironment` will be used.

> This object isn't applicable to jobs that are running on Fargate resources.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

launchTemplateSpecificationProperty := &launchTemplateSpecificationProperty{
	launchTemplateId: jsii.String("launchTemplateId"),
	launchTemplateName: jsii.String("launchTemplateName"),
	version: jsii.String("version"),
}

type CfnComputeEnvironment_UpdatePolicyProperty

type CfnComputeEnvironment_UpdatePolicyProperty struct {
	// Specifies the job timeout, in minutes, when the compute environment infrastructure is updated.
	//
	// The default value is 30.
	JobExecutionTimeoutMinutes *float64 `field:"optional" json:"jobExecutionTimeoutMinutes" yaml:"jobExecutionTimeoutMinutes"`
	// Specifies whether jobs are automatically terminated when the computer environment infrastructure is updated.
	//
	// The default value is `false` .
	TerminateJobsOnUpdate interface{} `field:"optional" json:"terminateJobsOnUpdate" yaml:"terminateJobsOnUpdate"`
}

Specifies the infrastructure update policy for the compute environment.

For more information about infrastructure updates, see [Infrastructure updates](https://docs.aws.amazon.com/batch/latest/userguide/infrastructure-updates.html) in the *AWS Batch User Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

updatePolicyProperty := &updatePolicyProperty{
	jobExecutionTimeoutMinutes: jsii.Number(123),
	terminateJobsOnUpdate: jsii.Boolean(false),
}

type CfnJobDefinition

type CfnJobDefinition interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// An object with various properties specific to container-based jobs.
	ContainerProperties() interface{}
	SetContainerProperties(val interface{})
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The name of the job definition.
	JobDefinitionName() *string
	SetJobDefinitionName(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// An object with various properties specific to multi-node parallel jobs.
	//
	// > If the job runs on Fargate resources, then you must not specify `nodeProperties` ; use `containerProperties` instead.
	NodeProperties() interface{}
	SetNodeProperties(val interface{})
	// Default parameters or parameter substitution placeholders that are set in the job definition.
	//
	// Parameters are specified as a key-value pair mapping. Parameters in a `SubmitJob` request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see [Job definition parameters](https://docs.aws.amazon.com/batch/latest/userguide/job_definition_parameters.html) in the *AWS Batch User Guide* .
	Parameters() interface{}
	SetParameters(val interface{})
	// The platform capabilities required by the job definition.
	//
	// If no value is specified, it defaults to `EC2` . Jobs run on Fargate resources specify `FARGATE` .
	PlatformCapabilities() *[]*string
	SetPlatformCapabilities(val *[]*string)
	// Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task.
	//
	// If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the `FAILED` state.
	PropagateTags() interface{}
	SetPropagateTags(val interface{})
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The retry strategy to use for failed jobs that are submitted with this job definition.
	RetryStrategy() interface{}
	SetRetryStrategy(val interface{})
	// The scheduling priority of the job definition.
	//
	// This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.
	SchedulingPriority() *float64
	SetSchedulingPriority(val *float64)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The tags applied to the job definition.
	Tags() awscdk.TagManager
	// The timeout configuration for jobs that are submitted with this job definition.
	//
	// You can specify a timeout duration after which AWS Batch terminates your jobs if they haven't finished.
	Timeout() interface{}
	SetTimeout(val interface{})
	// The type of job definition.
	//
	// For more information about multi-node parallel jobs, see [Creating a multi-node parallel job definition](https://docs.aws.amazon.com/batch/latest/userguide/multi-node-job-def.html) in the *AWS Batch User Guide* .
	//
	// > If the job is run on Fargate resources, then `multinode` isn't supported.
	Type() *string
	SetType(val *string)
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::Batch::JobDefinition`.

The `AWS::Batch::JobDefinition` resource specifies the parameters for an AWS Batch job definition. For more information, see [Job Definitions](https://docs.aws.amazon.com/batch/latest/userguide/job_definitions.html) in the ** .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var options interface{}
var parameters interface{}
var tags interface{}

cfnJobDefinition := awscdk.Aws_batch.NewCfnJobDefinition(this, jsii.String("MyCfnJobDefinition"), &cfnJobDefinitionProps{
	type: jsii.String("type"),

	// the properties below are optional
	containerProperties: &containerPropertiesProperty{
		image: jsii.String("image"),

		// the properties below are optional
		command: []*string{
			jsii.String("command"),
		},
		environment: []interface{}{
			&environmentProperty{
				name: jsii.String("name"),
				value: jsii.String("value"),
			},
		},
		executionRoleArn: jsii.String("executionRoleArn"),
		fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
			platformVersion: jsii.String("platformVersion"),
		},
		instanceType: jsii.String("instanceType"),
		jobRoleArn: jsii.String("jobRoleArn"),
		linuxParameters: &linuxParametersProperty{
			devices: []interface{}{
				&deviceProperty{
					containerPath: jsii.String("containerPath"),
					hostPath: jsii.String("hostPath"),
					permissions: []*string{
						jsii.String("permissions"),
					},
				},
			},
			initProcessEnabled: jsii.Boolean(false),
			maxSwap: jsii.Number(123),
			sharedMemorySize: jsii.Number(123),
			swappiness: jsii.Number(123),
			tmpfs: []interface{}{
				&tmpfsProperty{
					containerPath: jsii.String("containerPath"),
					size: jsii.Number(123),

					// the properties below are optional
					mountOptions: []*string{
						jsii.String("mountOptions"),
					},
				},
			},
		},
		logConfiguration: &logConfigurationProperty{
			logDriver: jsii.String("logDriver"),

			// the properties below are optional
			options: options,
			secretOptions: []interface{}{
				&secretProperty{
					name: jsii.String("name"),
					valueFrom: jsii.String("valueFrom"),
				},
			},
		},
		memory: jsii.Number(123),
		mountPoints: []interface{}{
			&mountPointsProperty{
				containerPath: jsii.String("containerPath"),
				readOnly: jsii.Boolean(false),
				sourceVolume: jsii.String("sourceVolume"),
			},
		},
		networkConfiguration: &networkConfigurationProperty{
			assignPublicIp: jsii.String("assignPublicIp"),
		},
		privileged: jsii.Boolean(false),
		readonlyRootFilesystem: jsii.Boolean(false),
		resourceRequirements: []interface{}{
			&resourceRequirementProperty{
				type: jsii.String("type"),
				value: jsii.String("value"),
			},
		},
		secrets: []interface{}{
			&secretProperty{
				name: jsii.String("name"),
				valueFrom: jsii.String("valueFrom"),
			},
		},
		ulimits: []interface{}{
			&ulimitProperty{
				hardLimit: jsii.Number(123),
				name: jsii.String("name"),
				softLimit: jsii.Number(123),
			},
		},
		user: jsii.String("user"),
		vcpus: jsii.Number(123),
		volumes: []interface{}{
			&volumesProperty{
				efsVolumeConfiguration: &efsVolumeConfigurationProperty{
					fileSystemId: jsii.String("fileSystemId"),

					// the properties below are optional
					authorizationConfig: &authorizationConfigProperty{
						accessPointId: jsii.String("accessPointId"),
						iam: jsii.String("iam"),
					},
					rootDirectory: jsii.String("rootDirectory"),
					transitEncryption: jsii.String("transitEncryption"),
					transitEncryptionPort: jsii.Number(123),
				},
				host: &volumesHostProperty{
					sourcePath: jsii.String("sourcePath"),
				},
				name: jsii.String("name"),
			},
		},
	},
	jobDefinitionName: jsii.String("jobDefinitionName"),
	nodeProperties: &nodePropertiesProperty{
		mainNode: jsii.Number(123),
		nodeRangeProperties: []interface{}{
			&nodeRangePropertyProperty{
				targetNodes: jsii.String("targetNodes"),

				// the properties below are optional
				container: &containerPropertiesProperty{
					image: jsii.String("image"),

					// the properties below are optional
					command: []*string{
						jsii.String("command"),
					},
					environment: []interface{}{
						&environmentProperty{
							name: jsii.String("name"),
							value: jsii.String("value"),
						},
					},
					executionRoleArn: jsii.String("executionRoleArn"),
					fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
						platformVersion: jsii.String("platformVersion"),
					},
					instanceType: jsii.String("instanceType"),
					jobRoleArn: jsii.String("jobRoleArn"),
					linuxParameters: &linuxParametersProperty{
						devices: []interface{}{
							&deviceProperty{
								containerPath: jsii.String("containerPath"),
								hostPath: jsii.String("hostPath"),
								permissions: []*string{
									jsii.String("permissions"),
								},
							},
						},
						initProcessEnabled: jsii.Boolean(false),
						maxSwap: jsii.Number(123),
						sharedMemorySize: jsii.Number(123),
						swappiness: jsii.Number(123),
						tmpfs: []interface{}{
							&tmpfsProperty{
								containerPath: jsii.String("containerPath"),
								size: jsii.Number(123),

								// the properties below are optional
								mountOptions: []*string{
									jsii.String("mountOptions"),
								},
							},
						},
					},
					logConfiguration: &logConfigurationProperty{
						logDriver: jsii.String("logDriver"),

						// the properties below are optional
						options: options,
						secretOptions: []interface{}{
							&secretProperty{
								name: jsii.String("name"),
								valueFrom: jsii.String("valueFrom"),
							},
						},
					},
					memory: jsii.Number(123),
					mountPoints: []interface{}{
						&mountPointsProperty{
							containerPath: jsii.String("containerPath"),
							readOnly: jsii.Boolean(false),
							sourceVolume: jsii.String("sourceVolume"),
						},
					},
					networkConfiguration: &networkConfigurationProperty{
						assignPublicIp: jsii.String("assignPublicIp"),
					},
					privileged: jsii.Boolean(false),
					readonlyRootFilesystem: jsii.Boolean(false),
					resourceRequirements: []interface{}{
						&resourceRequirementProperty{
							type: jsii.String("type"),
							value: jsii.String("value"),
						},
					},
					secrets: []interface{}{
						&secretProperty{
							name: jsii.String("name"),
							valueFrom: jsii.String("valueFrom"),
						},
					},
					ulimits: []interface{}{
						&ulimitProperty{
							hardLimit: jsii.Number(123),
							name: jsii.String("name"),
							softLimit: jsii.Number(123),
						},
					},
					user: jsii.String("user"),
					vcpus: jsii.Number(123),
					volumes: []interface{}{
						&volumesProperty{
							efsVolumeConfiguration: &efsVolumeConfigurationProperty{
								fileSystemId: jsii.String("fileSystemId"),

								// the properties below are optional
								authorizationConfig: &authorizationConfigProperty{
									accessPointId: jsii.String("accessPointId"),
									iam: jsii.String("iam"),
								},
								rootDirectory: jsii.String("rootDirectory"),
								transitEncryption: jsii.String("transitEncryption"),
								transitEncryptionPort: jsii.Number(123),
							},
							host: &volumesHostProperty{
								sourcePath: jsii.String("sourcePath"),
							},
							name: jsii.String("name"),
						},
					},
				},
			},
		},
		numNodes: jsii.Number(123),
	},
	parameters: parameters,
	platformCapabilities: []*string{
		jsii.String("platformCapabilities"),
	},
	propagateTags: jsii.Boolean(false),
	retryStrategy: &retryStrategyProperty{
		attempts: jsii.Number(123),
		evaluateOnExit: []interface{}{
			&evaluateOnExitProperty{
				action: jsii.String("action"),

				// the properties below are optional
				onExitCode: jsii.String("onExitCode"),
				onReason: jsii.String("onReason"),
				onStatusReason: jsii.String("onStatusReason"),
			},
		},
	},
	schedulingPriority: jsii.Number(123),
	tags: tags,
	timeout: &timeoutProperty{
		attemptDurationSeconds: jsii.Number(123),
	},
})

func NewCfnJobDefinition

func NewCfnJobDefinition(scope awscdk.Construct, id *string, props *CfnJobDefinitionProps) CfnJobDefinition

Create a new `AWS::Batch::JobDefinition`.

type CfnJobDefinitionProps

type CfnJobDefinitionProps struct {
	// The type of job definition.
	//
	// For more information about multi-node parallel jobs, see [Creating a multi-node parallel job definition](https://docs.aws.amazon.com/batch/latest/userguide/multi-node-job-def.html) in the *AWS Batch User Guide* .
	//
	// > If the job is run on Fargate resources, then `multinode` isn't supported.
	Type *string `field:"required" json:"type" yaml:"type"`
	// An object with various properties specific to container-based jobs.
	ContainerProperties interface{} `field:"optional" json:"containerProperties" yaml:"containerProperties"`
	// The name of the job definition.
	JobDefinitionName *string `field:"optional" json:"jobDefinitionName" yaml:"jobDefinitionName"`
	// An object with various properties specific to multi-node parallel jobs.
	//
	// > If the job runs on Fargate resources, then you must not specify `nodeProperties` ; use `containerProperties` instead.
	NodeProperties interface{} `field:"optional" json:"nodeProperties" yaml:"nodeProperties"`
	// Default parameters or parameter substitution placeholders that are set in the job definition.
	//
	// Parameters are specified as a key-value pair mapping. Parameters in a `SubmitJob` request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see [Job definition parameters](https://docs.aws.amazon.com/batch/latest/userguide/job_definition_parameters.html) in the *AWS Batch User Guide* .
	Parameters interface{} `field:"optional" json:"parameters" yaml:"parameters"`
	// The platform capabilities required by the job definition.
	//
	// If no value is specified, it defaults to `EC2` . Jobs run on Fargate resources specify `FARGATE` .
	PlatformCapabilities *[]*string `field:"optional" json:"platformCapabilities" yaml:"platformCapabilities"`
	// Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task.
	//
	// If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the `FAILED` state.
	PropagateTags interface{} `field:"optional" json:"propagateTags" yaml:"propagateTags"`
	// The retry strategy to use for failed jobs that are submitted with this job definition.
	RetryStrategy interface{} `field:"optional" json:"retryStrategy" yaml:"retryStrategy"`
	// The scheduling priority of the job definition.
	//
	// This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.
	SchedulingPriority *float64 `field:"optional" json:"schedulingPriority" yaml:"schedulingPriority"`
	// The tags applied to the job definition.
	Tags interface{} `field:"optional" json:"tags" yaml:"tags"`
	// The timeout configuration for jobs that are submitted with this job definition.
	//
	// You can specify a timeout duration after which AWS Batch terminates your jobs if they haven't finished.
	Timeout interface{} `field:"optional" json:"timeout" yaml:"timeout"`
}

Properties for defining a `CfnJobDefinition`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var options interface{}
var parameters interface{}
var tags interface{}

cfnJobDefinitionProps := &cfnJobDefinitionProps{
	type: jsii.String("type"),

	// the properties below are optional
	containerProperties: &containerPropertiesProperty{
		image: jsii.String("image"),

		// the properties below are optional
		command: []*string{
			jsii.String("command"),
		},
		environment: []interface{}{
			&environmentProperty{
				name: jsii.String("name"),
				value: jsii.String("value"),
			},
		},
		executionRoleArn: jsii.String("executionRoleArn"),
		fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
			platformVersion: jsii.String("platformVersion"),
		},
		instanceType: jsii.String("instanceType"),
		jobRoleArn: jsii.String("jobRoleArn"),
		linuxParameters: &linuxParametersProperty{
			devices: []interface{}{
				&deviceProperty{
					containerPath: jsii.String("containerPath"),
					hostPath: jsii.String("hostPath"),
					permissions: []*string{
						jsii.String("permissions"),
					},
				},
			},
			initProcessEnabled: jsii.Boolean(false),
			maxSwap: jsii.Number(123),
			sharedMemorySize: jsii.Number(123),
			swappiness: jsii.Number(123),
			tmpfs: []interface{}{
				&tmpfsProperty{
					containerPath: jsii.String("containerPath"),
					size: jsii.Number(123),

					// the properties below are optional
					mountOptions: []*string{
						jsii.String("mountOptions"),
					},
				},
			},
		},
		logConfiguration: &logConfigurationProperty{
			logDriver: jsii.String("logDriver"),

			// the properties below are optional
			options: options,
			secretOptions: []interface{}{
				&secretProperty{
					name: jsii.String("name"),
					valueFrom: jsii.String("valueFrom"),
				},
			},
		},
		memory: jsii.Number(123),
		mountPoints: []interface{}{
			&mountPointsProperty{
				containerPath: jsii.String("containerPath"),
				readOnly: jsii.Boolean(false),
				sourceVolume: jsii.String("sourceVolume"),
			},
		},
		networkConfiguration: &networkConfigurationProperty{
			assignPublicIp: jsii.String("assignPublicIp"),
		},
		privileged: jsii.Boolean(false),
		readonlyRootFilesystem: jsii.Boolean(false),
		resourceRequirements: []interface{}{
			&resourceRequirementProperty{
				type: jsii.String("type"),
				value: jsii.String("value"),
			},
		},
		secrets: []interface{}{
			&secretProperty{
				name: jsii.String("name"),
				valueFrom: jsii.String("valueFrom"),
			},
		},
		ulimits: []interface{}{
			&ulimitProperty{
				hardLimit: jsii.Number(123),
				name: jsii.String("name"),
				softLimit: jsii.Number(123),
			},
		},
		user: jsii.String("user"),
		vcpus: jsii.Number(123),
		volumes: []interface{}{
			&volumesProperty{
				efsVolumeConfiguration: &efsVolumeConfigurationProperty{
					fileSystemId: jsii.String("fileSystemId"),

					// the properties below are optional
					authorizationConfig: &authorizationConfigProperty{
						accessPointId: jsii.String("accessPointId"),
						iam: jsii.String("iam"),
					},
					rootDirectory: jsii.String("rootDirectory"),
					transitEncryption: jsii.String("transitEncryption"),
					transitEncryptionPort: jsii.Number(123),
				},
				host: &volumesHostProperty{
					sourcePath: jsii.String("sourcePath"),
				},
				name: jsii.String("name"),
			},
		},
	},
	jobDefinitionName: jsii.String("jobDefinitionName"),
	nodeProperties: &nodePropertiesProperty{
		mainNode: jsii.Number(123),
		nodeRangeProperties: []interface{}{
			&nodeRangePropertyProperty{
				targetNodes: jsii.String("targetNodes"),

				// the properties below are optional
				container: &containerPropertiesProperty{
					image: jsii.String("image"),

					// the properties below are optional
					command: []*string{
						jsii.String("command"),
					},
					environment: []interface{}{
						&environmentProperty{
							name: jsii.String("name"),
							value: jsii.String("value"),
						},
					},
					executionRoleArn: jsii.String("executionRoleArn"),
					fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
						platformVersion: jsii.String("platformVersion"),
					},
					instanceType: jsii.String("instanceType"),
					jobRoleArn: jsii.String("jobRoleArn"),
					linuxParameters: &linuxParametersProperty{
						devices: []interface{}{
							&deviceProperty{
								containerPath: jsii.String("containerPath"),
								hostPath: jsii.String("hostPath"),
								permissions: []*string{
									jsii.String("permissions"),
								},
							},
						},
						initProcessEnabled: jsii.Boolean(false),
						maxSwap: jsii.Number(123),
						sharedMemorySize: jsii.Number(123),
						swappiness: jsii.Number(123),
						tmpfs: []interface{}{
							&tmpfsProperty{
								containerPath: jsii.String("containerPath"),
								size: jsii.Number(123),

								// the properties below are optional
								mountOptions: []*string{
									jsii.String("mountOptions"),
								},
							},
						},
					},
					logConfiguration: &logConfigurationProperty{
						logDriver: jsii.String("logDriver"),

						// the properties below are optional
						options: options,
						secretOptions: []interface{}{
							&secretProperty{
								name: jsii.String("name"),
								valueFrom: jsii.String("valueFrom"),
							},
						},
					},
					memory: jsii.Number(123),
					mountPoints: []interface{}{
						&mountPointsProperty{
							containerPath: jsii.String("containerPath"),
							readOnly: jsii.Boolean(false),
							sourceVolume: jsii.String("sourceVolume"),
						},
					},
					networkConfiguration: &networkConfigurationProperty{
						assignPublicIp: jsii.String("assignPublicIp"),
					},
					privileged: jsii.Boolean(false),
					readonlyRootFilesystem: jsii.Boolean(false),
					resourceRequirements: []interface{}{
						&resourceRequirementProperty{
							type: jsii.String("type"),
							value: jsii.String("value"),
						},
					},
					secrets: []interface{}{
						&secretProperty{
							name: jsii.String("name"),
							valueFrom: jsii.String("valueFrom"),
						},
					},
					ulimits: []interface{}{
						&ulimitProperty{
							hardLimit: jsii.Number(123),
							name: jsii.String("name"),
							softLimit: jsii.Number(123),
						},
					},
					user: jsii.String("user"),
					vcpus: jsii.Number(123),
					volumes: []interface{}{
						&volumesProperty{
							efsVolumeConfiguration: &efsVolumeConfigurationProperty{
								fileSystemId: jsii.String("fileSystemId"),

								// the properties below are optional
								authorizationConfig: &authorizationConfigProperty{
									accessPointId: jsii.String("accessPointId"),
									iam: jsii.String("iam"),
								},
								rootDirectory: jsii.String("rootDirectory"),
								transitEncryption: jsii.String("transitEncryption"),
								transitEncryptionPort: jsii.Number(123),
							},
							host: &volumesHostProperty{
								sourcePath: jsii.String("sourcePath"),
							},
							name: jsii.String("name"),
						},
					},
				},
			},
		},
		numNodes: jsii.Number(123),
	},
	parameters: parameters,
	platformCapabilities: []*string{
		jsii.String("platformCapabilities"),
	},
	propagateTags: jsii.Boolean(false),
	retryStrategy: &retryStrategyProperty{
		attempts: jsii.Number(123),
		evaluateOnExit: []interface{}{
			&evaluateOnExitProperty{
				action: jsii.String("action"),

				// the properties below are optional
				onExitCode: jsii.String("onExitCode"),
				onReason: jsii.String("onReason"),
				onStatusReason: jsii.String("onStatusReason"),
			},
		},
	},
	schedulingPriority: jsii.Number(123),
	tags: tags,
	timeout: &timeoutProperty{
		attemptDurationSeconds: jsii.Number(123),
	},
}

type CfnJobDefinition_AuthorizationConfigProperty

type CfnJobDefinition_AuthorizationConfigProperty struct {
	// The Amazon EFS access point ID to use.
	//
	// If an access point is specified, the root directory value specified in the `EFSVolumeConfiguration` must either be omitted or set to `/` which will enforce the path set on the EFS access point. If an access point is used, transit encryption must be enabled in the `EFSVolumeConfiguration` . For more information, see [Working with Amazon EFS access points](https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html) in the *Amazon Elastic File System User Guide* .
	AccessPointId *string `field:"optional" json:"accessPointId" yaml:"accessPointId"`
	// Whether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system.
	//
	// If enabled, transit encryption must be enabled in the `EFSVolumeConfiguration` . If this parameter is omitted, the default value of `DISABLED` is used. For more information, see [Using Amazon EFS access points](https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html#efs-volume-accesspoints) in the *AWS Batch User Guide* . EFS IAM authorization requires that `TransitEncryption` be `ENABLED` and that a `JobRoleArn` is specified.
	Iam *string `field:"optional" json:"iam" yaml:"iam"`
}

The authorization configuration details for the Amazon EFS file system.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

authorizationConfigProperty := &authorizationConfigProperty{
	accessPointId: jsii.String("accessPointId"),
	iam: jsii.String("iam"),
}

type CfnJobDefinition_ContainerPropertiesProperty

type CfnJobDefinition_ContainerPropertiesProperty struct {
	// The image used to start a container.
	//
	// This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with `*repository-url* / *image* : *tag*` . Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to `Image` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `IMAGE` parameter of [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	//
	// > Docker image architecture must match the processor architecture of the compute resources that they're scheduled on. For example, ARM-based Docker images can only run on ARM-based compute resources.
	//
	// - Images in Amazon ECR Public repositories use the full `registry/repository[:tag]` or `registry/repository[@digest]` naming conventions. For example, `public.ecr.aws/ *registry_alias* / *my-web-app* : *latest*` .
	// - Images in Amazon ECR repositories use the full registry and repository URI (for example, `012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>` ).
	// - Images in official repositories on Docker Hub use a single name (for example, `ubuntu` or `mongo` ).
	// - Images in other repositories on Docker Hub are qualified with an organization name (for example, `amazon/amazon-ecs-agent` ).
	// - Images in other online repositories are qualified further by a domain name (for example, `quay.io/assemblyline/ubuntu` ).
	Image *string `field:"required" json:"image" yaml:"image"`
	// The command that's passed to the container.
	//
	// This parameter maps to `Cmd` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `COMMAND` parameter to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) . For more information, see [https://docs.docker.com/engine/reference/builder/#cmd](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/builder/#cmd) .
	Command *[]*string `field:"optional" json:"command" yaml:"command"`
	// The environment variables to pass to a container.
	//
	// This parameter maps to `Env` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--env` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	//
	// > We don't recommend using plaintext environment variables for sensitive information, such as credential data. > Environment variables must not start with `AWS_BATCH` ; this naming convention is reserved for variables that are set by the AWS Batch service.
	Environment interface{} `field:"optional" json:"environment" yaml:"environment"`
	// The Amazon Resource Name (ARN) of the execution role that AWS Batch can assume.
	//
	// For jobs that run on Fargate resources, you must provide an execution role. For more information, see [AWS Batch execution IAM role](https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html) in the *AWS Batch User Guide* .
	ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"`
	// The platform configuration for jobs that are running on Fargate resources.
	//
	// Jobs that are running on EC2 resources must not specify this parameter.
	FargatePlatformConfiguration interface{} `field:"optional" json:"fargatePlatformConfiguration" yaml:"fargatePlatformConfiguration"`
	// The instance type to use for a multi-node parallel job.
	//
	// All node groups in a multi-node parallel job must use the same instance type.
	//
	// > This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and shouldn't be provided.
	InstanceType *string `field:"optional" json:"instanceType" yaml:"instanceType"`
	// The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions.
	//
	// For more information, see [IAM roles for tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) in the *Amazon Elastic Container Service Developer Guide* .
	JobRoleArn *string `field:"optional" json:"jobRoleArn" yaml:"jobRoleArn"`
	// Linux-specific modifications that are applied to the container, such as details for device mappings.
	LinuxParameters interface{} `field:"optional" json:"linuxParameters" yaml:"linuxParameters"`
	// The log configuration specification for the container.
	//
	// This parameter maps to `LogConfig` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--log-driver` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) . By default, containers use the same logging driver that the Docker daemon uses. However the container might use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information on the options for different supported log drivers, see [Configure logging drivers](https://docs.aws.amazon.com/https://docs.docker.com/engine/admin/logging/overview/) in the Docker documentation.
	//
	// > AWS Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the `LogConfiguration` data type).
	//
	// This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log into your container instance and run the following command: `sudo docker version | grep "Server API version"`
	//
	// > The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the `ECS_AVAILABLE_LOGGING_DRIVERS` environment variable before containers placed on that instance can use these log configuration options. For more information, see [Amazon ECS container agent configuration](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) in the *Amazon Elastic Container Service Developer Guide* .
	LogConfiguration interface{} `field:"optional" json:"logConfiguration" yaml:"logConfiguration"`
	// This parameter is deprecated, use `resourceRequirements` to specify the memory requirements for the job definition.
	//
	// It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it specifies the memory hard limit (in MiB) for a container. If your container attempts to exceed the specified number, it's terminated. You must specify at least 4 MiB of memory for a job using this parameter. The memory hard limit can be specified in several places. It must be specified for each node at least once.
	Memory *float64 `field:"optional" json:"memory" yaml:"memory"`
	// The mount points for data volumes in your container.
	//
	// This parameter maps to `Volumes` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--volume` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	MountPoints interface{} `field:"optional" json:"mountPoints" yaml:"mountPoints"`
	// The network configuration for jobs that are running on Fargate resources.
	//
	// Jobs that are running on EC2 resources must not specify this parameter.
	NetworkConfiguration interface{} `field:"optional" json:"networkConfiguration" yaml:"networkConfiguration"`
	// When this parameter is true, the container is given elevated permissions on the host container instance (similar to the `root` user).
	//
	// This parameter maps to `Privileged` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--privileged` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) . The default value is false.
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or specified as false.
	Privileged interface{} `field:"optional" json:"privileged" yaml:"privileged"`
	// When this parameter is true, the container is given read-only access to its root file system.
	//
	// This parameter maps to `ReadonlyRootfs` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--read-only` option to `docker run` .
	ReadonlyRootFilesystem interface{} `field:"optional" json:"readonlyRootFilesystem" yaml:"readonlyRootFilesystem"`
	// The type and amount of resources to assign to a container.
	//
	// The supported resources include `GPU` , `MEMORY` , and `VCPU` .
	ResourceRequirements interface{} `field:"optional" json:"resourceRequirements" yaml:"resourceRequirements"`
	// The secrets for the container.
	//
	// For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html) in the *AWS Batch User Guide* .
	Secrets interface{} `field:"optional" json:"secrets" yaml:"secrets"`
	// A list of `ulimits` to set in the container.
	//
	// This parameter maps to `Ulimits` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--ulimit` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
	Ulimits interface{} `field:"optional" json:"ulimits" yaml:"ulimits"`
	// The user name to use inside the container.
	//
	// This parameter maps to `User` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--user` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	User *string `field:"optional" json:"user" yaml:"user"`
	// This parameter is deprecated, use `resourceRequirements` to specify the vCPU requirements for the job definition.
	//
	// It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it specifies the number of vCPUs reserved for the job.
	//
	// Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to `CpuShares` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--cpu-shares` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) . The number of vCPUs must be specified but can be specified in several places. You must specify it at least once for each node.
	Vcpus *float64 `field:"optional" json:"vcpus" yaml:"vcpus"`
	// A list of data volumes used in a job.
	Volumes interface{} `field:"optional" json:"volumes" yaml:"volumes"`
}

Container properties are used in job definitions to describe the container that's launched as part of a job.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var options interface{}

containerPropertiesProperty := &containerPropertiesProperty{
	image: jsii.String("image"),

	// the properties below are optional
	command: []*string{
		jsii.String("command"),
	},
	environment: []interface{}{
		&environmentProperty{
			name: jsii.String("name"),
			value: jsii.String("value"),
		},
	},
	executionRoleArn: jsii.String("executionRoleArn"),
	fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
		platformVersion: jsii.String("platformVersion"),
	},
	instanceType: jsii.String("instanceType"),
	jobRoleArn: jsii.String("jobRoleArn"),
	linuxParameters: &linuxParametersProperty{
		devices: []interface{}{
			&deviceProperty{
				containerPath: jsii.String("containerPath"),
				hostPath: jsii.String("hostPath"),
				permissions: []*string{
					jsii.String("permissions"),
				},
			},
		},
		initProcessEnabled: jsii.Boolean(false),
		maxSwap: jsii.Number(123),
		sharedMemorySize: jsii.Number(123),
		swappiness: jsii.Number(123),
		tmpfs: []interface{}{
			&tmpfsProperty{
				containerPath: jsii.String("containerPath"),
				size: jsii.Number(123),

				// the properties below are optional
				mountOptions: []*string{
					jsii.String("mountOptions"),
				},
			},
		},
	},
	logConfiguration: &logConfigurationProperty{
		logDriver: jsii.String("logDriver"),

		// the properties below are optional
		options: options,
		secretOptions: []interface{}{
			&secretProperty{
				name: jsii.String("name"),
				valueFrom: jsii.String("valueFrom"),
			},
		},
	},
	memory: jsii.Number(123),
	mountPoints: []interface{}{
		&mountPointsProperty{
			containerPath: jsii.String("containerPath"),
			readOnly: jsii.Boolean(false),
			sourceVolume: jsii.String("sourceVolume"),
		},
	},
	networkConfiguration: &networkConfigurationProperty{
		assignPublicIp: jsii.String("assignPublicIp"),
	},
	privileged: jsii.Boolean(false),
	readonlyRootFilesystem: jsii.Boolean(false),
	resourceRequirements: []interface{}{
		&resourceRequirementProperty{
			type: jsii.String("type"),
			value: jsii.String("value"),
		},
	},
	secrets: []interface{}{
		&secretProperty{
			name: jsii.String("name"),
			valueFrom: jsii.String("valueFrom"),
		},
	},
	ulimits: []interface{}{
		&ulimitProperty{
			hardLimit: jsii.Number(123),
			name: jsii.String("name"),
			softLimit: jsii.Number(123),
		},
	},
	user: jsii.String("user"),
	vcpus: jsii.Number(123),
	volumes: []interface{}{
		&volumesProperty{
			efsVolumeConfiguration: &efsVolumeConfigurationProperty{
				fileSystemId: jsii.String("fileSystemId"),

				// the properties below are optional
				authorizationConfig: &authorizationConfigProperty{
					accessPointId: jsii.String("accessPointId"),
					iam: jsii.String("iam"),
				},
				rootDirectory: jsii.String("rootDirectory"),
				transitEncryption: jsii.String("transitEncryption"),
				transitEncryptionPort: jsii.Number(123),
			},
			host: &volumesHostProperty{
				sourcePath: jsii.String("sourcePath"),
			},
			name: jsii.String("name"),
		},
	},
}

type CfnJobDefinition_DeviceProperty

type CfnJobDefinition_DeviceProperty struct {
	// The path inside the container that's used to expose the host device.
	//
	// By default, the `hostPath` value is used.
	ContainerPath *string `field:"optional" json:"containerPath" yaml:"containerPath"`
	// The path for the device on the host container instance.
	HostPath *string `field:"optional" json:"hostPath" yaml:"hostPath"`
	// The explicit permissions to provide to the container for the device.
	//
	// By default, the container has permissions for `read` , `write` , and `mknod` for the device.
	Permissions *[]*string `field:"optional" json:"permissions" yaml:"permissions"`
}

An object representing a container instance host device.

> This object isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

deviceProperty := &deviceProperty{
	containerPath: jsii.String("containerPath"),
	hostPath: jsii.String("hostPath"),
	permissions: []*string{
		jsii.String("permissions"),
	},
}

type CfnJobDefinition_EfsVolumeConfigurationProperty

type CfnJobDefinition_EfsVolumeConfigurationProperty struct {
	// The Amazon EFS file system ID to use.
	FileSystemId *string `field:"required" json:"fileSystemId" yaml:"fileSystemId"`
	// The authorization configuration details for the Amazon EFS file system.
	AuthorizationConfig interface{} `field:"optional" json:"authorizationConfig" yaml:"authorizationConfig"`
	// The directory within the Amazon EFS file system to mount as the root directory inside the host.
	//
	// If this parameter is omitted, the root of the Amazon EFS volume is used instead. Specifying `/` has the same effect as omitting this parameter. The maximum length is 4,096 characters.
	//
	// > If an EFS access point is specified in the `authorizationConfig` , the root directory parameter must either be omitted or set to `/` , which enforces the path set on the Amazon EFS access point.
	RootDirectory *string `field:"optional" json:"rootDirectory" yaml:"rootDirectory"`
	// Determines whether to enable encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.
	//
	// Transit encryption must be enabled if Amazon EFS IAM authorization is used. If this parameter is omitted, the default value of `DISABLED` is used. For more information, see [Encrypting data in transit](https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html) in the *Amazon Elastic File System User Guide* .
	TransitEncryption *string `field:"optional" json:"transitEncryption" yaml:"transitEncryption"`
	// The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.
	//
	// If you don't specify a transit encryption port, it uses the port selection strategy that the Amazon EFS mount helper uses. The value must be between 0 and 65,535. For more information, see [EFS mount helper](https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html) in the *Amazon Elastic File System User Guide* .
	TransitEncryptionPort *float64 `field:"optional" json:"transitEncryptionPort" yaml:"transitEncryptionPort"`
}

This is used when you're using an Amazon Elastic File System file system for job storage.

For more information, see [Amazon EFS Volumes](https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html) in the *AWS Batch User Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

efsVolumeConfigurationProperty := &efsVolumeConfigurationProperty{
	fileSystemId: jsii.String("fileSystemId"),

	// the properties below are optional
	authorizationConfig: &authorizationConfigProperty{
		accessPointId: jsii.String("accessPointId"),
		iam: jsii.String("iam"),
	},
	rootDirectory: jsii.String("rootDirectory"),
	transitEncryption: jsii.String("transitEncryption"),
	transitEncryptionPort: jsii.Number(123),
}

type CfnJobDefinition_EnvironmentProperty

type CfnJobDefinition_EnvironmentProperty struct {
	// The name of the environment variable.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The value of the environment variable.
	Value *string `field:"optional" json:"value" yaml:"value"`
}

The Environment property type specifies environment variables to use in a job definition.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

environmentProperty := &environmentProperty{
	name: jsii.String("name"),
	value: jsii.String("value"),
}

type CfnJobDefinition_EvaluateOnExitProperty

type CfnJobDefinition_EvaluateOnExitProperty struct {
	// Specifies the action to take if all of the specified conditions ( `onStatusReason` , `onReason` , and `onExitCode` ) are met.
	//
	// The values aren't case sensitive.
	Action *string `field:"required" json:"action" yaml:"action"`
	// Contains a glob pattern to match against the decimal representation of the `ExitCode` returned for a job.
	//
	// The pattern can be up to 512 characters in length. It can contain only numbers, and can optionally end with an asterisk (*) so that only the start of the string needs to be an exact match.
	//
	// The string can be between 1 and 512 characters in length.
	OnExitCode *string `field:"optional" json:"onExitCode" yaml:"onExitCode"`
	// Contains a glob pattern to match against the `Reason` returned for a job.
	//
	// The pattern can be up to 512 characters in length. It can contain letters, numbers, periods (.), colons (:), and white space (including spaces and tabs). It can optionally end with an asterisk (*) so that only the start of the string needs to be an exact match.
	//
	// The string can be between 1 and 512 characters in length.
	OnReason *string `field:"optional" json:"onReason" yaml:"onReason"`
	// Contains a glob pattern to match against the `StatusReason` returned for a job.
	//
	// The pattern can be up to 512 characters in length. It can contain letters, numbers, periods (.), colons (:), and white space (including spaces or tabs). It can optionally end with an asterisk (*) so that only the start of the string needs to be an exact match.
	//
	// The string can be between 1 and 512 characters in length.
	OnStatusReason *string `field:"optional" json:"onStatusReason" yaml:"onStatusReason"`
}

Specifies a set of conditions to be met, and an action to take ( `RETRY` or `EXIT` ) if all conditions are met.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

evaluateOnExitProperty := &evaluateOnExitProperty{
	action: jsii.String("action"),

	// the properties below are optional
	onExitCode: jsii.String("onExitCode"),
	onReason: jsii.String("onReason"),
	onStatusReason: jsii.String("onStatusReason"),
}

type CfnJobDefinition_FargatePlatformConfigurationProperty

type CfnJobDefinition_FargatePlatformConfigurationProperty struct {
	// The AWS Fargate platform version where the jobs are running.
	//
	// A platform version is specified only for jobs that are running on Fargate resources. If one isn't specified, the `LATEST` platform version is used by default. This uses a recent, approved version of the AWS Fargate platform for compute resources. For more information, see [AWS Fargate platform versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) in the *Amazon Elastic Container Service Developer Guide* .
	PlatformVersion *string `field:"optional" json:"platformVersion" yaml:"platformVersion"`
}

The platform configuration for jobs that are running on Fargate resources.

Jobs that run on EC2 resources must not specify this parameter.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

fargatePlatformConfigurationProperty := &fargatePlatformConfigurationProperty{
	platformVersion: jsii.String("platformVersion"),
}

type CfnJobDefinition_LinuxParametersProperty

type CfnJobDefinition_LinuxParametersProperty struct {
	// Any host devices to expose to the container.
	//
	// This parameter maps to `Devices` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--device` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
	Devices interface{} `field:"optional" json:"devices" yaml:"devices"`
	// If true, run an `init` process inside the container that forwards signals and reaps processes.
	//
	// This parameter maps to the `--init` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) . This parameter requires version 1.25 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log into your container instance and run the following command: `sudo docker version | grep "Server API version"`
	InitProcessEnabled interface{} `field:"optional" json:"initProcessEnabled" yaml:"initProcessEnabled"`
	// The total amount of swap memory (in MiB) a container can use.
	//
	// This parameter is translated to the `--memory-swap` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) where the value is the sum of the container memory plus the `maxSwap` value. For more information, see [`--memory-swap` details](https://docs.aws.amazon.com/https://docs.docker.com/config/containers/resource_constraints/#--memory-swap-details) in the Docker documentation.
	//
	// If a `maxSwap` value of `0` is specified, the container doesn't use swap. Accepted values are `0` or any positive integer. If the `maxSwap` parameter is omitted, the container doesn't use the swap configuration for the container instance it is running on. A `maxSwap` value must be set for the `swappiness` parameter to be used.
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
	MaxSwap *float64 `field:"optional" json:"maxSwap" yaml:"maxSwap"`
	// The value for the size (in MiB) of the `/dev/shm` volume.
	//
	// This parameter maps to the `--shm-size` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
	SharedMemorySize *float64 `field:"optional" json:"sharedMemorySize" yaml:"sharedMemorySize"`
	// This allows you to tune a container's memory swappiness behavior.
	//
	// A `swappiness` value of `0` causes swapping not to happen unless absolutely necessary. A `swappiness` value of `100` causes pages to be swapped very aggressively. Accepted values are whole numbers between `0` and `100` . If the `swappiness` parameter isn't specified, a default value of `60` is used. If a value isn't specified for `maxSwap` , then this parameter is ignored. If `maxSwap` is set to 0, the container doesn't use swap. This parameter maps to the `--memory-swappiness` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	//
	// Consider the following when you use a per-container swap configuration.
	//
	// - Swap space must be enabled and allocated on the container instance for the containers to use.
	//
	// > The Amazon ECS optimized AMIs don't have swap enabled by default. You must enable swap on the instance to use this feature. For more information, see [Instance store swap volumes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-store-swap-volumes.html) in the *Amazon EC2 User Guide for Linux Instances* or [How do I allocate memory to work as swap space in an Amazon EC2 instance by using a swap file?](https://docs.aws.amazon.com/premiumsupport/knowledge-center/ec2-memory-swap-file/)
	// - The swap space parameters are only supported for job definitions using EC2 resources.
	// - If the `maxSwap` and `swappiness` parameters are omitted from a job definition, each container will have a default `swappiness` value of 60, and the total swap usage will be limited to two times the memory reservation of the container.
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
	Swappiness *float64 `field:"optional" json:"swappiness" yaml:"swappiness"`
	// The container path, mount options, and size (in MiB) of the tmpfs mount.
	//
	// This parameter maps to the `--tmpfs` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
	Tmpfs interface{} `field:"optional" json:"tmpfs" yaml:"tmpfs"`
}

Linux-specific modifications that are applied to the container, such as details for device mappings.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

linuxParametersProperty := &linuxParametersProperty{
	devices: []interface{}{
		&deviceProperty{
			containerPath: jsii.String("containerPath"),
			hostPath: jsii.String("hostPath"),
			permissions: []*string{
				jsii.String("permissions"),
			},
		},
	},
	initProcessEnabled: jsii.Boolean(false),
	maxSwap: jsii.Number(123),
	sharedMemorySize: jsii.Number(123),
	swappiness: jsii.Number(123),
	tmpfs: []interface{}{
		&tmpfsProperty{
			containerPath: jsii.String("containerPath"),
			size: jsii.Number(123),

			// the properties below are optional
			mountOptions: []*string{
				jsii.String("mountOptions"),
			},
		},
	},
}

type CfnJobDefinition_LogConfigurationProperty

type CfnJobDefinition_LogConfigurationProperty struct {
	// The log driver to use for the container.
	//
	// The valid values listed for this parameter are log drivers that the Amazon ECS container agent can communicate with by default.
	//
	// The supported log drivers are `awslogs` , `fluentd` , `gelf` , `json-file` , `journald` , `logentries` , `syslog` , and `splunk` .
	//
	// > Jobs that are running on Fargate resources are restricted to the `awslogs` and `splunk` log drivers.
	//
	// - **awslogs** - Specifies the Amazon CloudWatch Logs logging driver. For more information, see [Using the awslogs log driver](https://docs.aws.amazon.com/batch/latest/userguide/using_awslogs.html) in the *AWS Batch User Guide* and [Amazon CloudWatch Logs logging driver](https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/awslogs/) in the Docker documentation.
	// - **fluentd** - Specifies the Fluentd logging driver. For more information, including usage and options, see [Fluentd logging driver](https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/fluentd/) in the Docker documentation.
	// - **gelf** - Specifies the Graylog Extended Format (GELF) logging driver. For more information, including usage and options, see [Graylog Extended Format logging driver](https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/gelf/) in the Docker documentation.
	// - **journald** - Specifies the journald logging driver. For more information, including usage and options, see [Journald logging driver](https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/journald/) in the Docker documentation.
	// - **json-file** - Specifies the JSON file logging driver. For more information, including usage and options, see [JSON File logging driver](https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/json-file/) in the Docker documentation.
	// - **splunk** - Specifies the Splunk logging driver. For more information, including usage and options, see [Splunk logging driver](https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/splunk/) in the Docker documentation.
	// - **syslog** - Specifies the syslog logging driver. For more information, including usage and options, see [Syslog logging driver](https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/syslog/) in the Docker documentation.
	//
	// > If you have a custom driver that's not listed earlier that you want to work with the Amazon ECS container agent, you can fork the Amazon ECS container agent project that's [available on GitHub](https://docs.aws.amazon.com/https://github.com/aws/amazon-ecs-agent) and customize it to work with that driver. We encourage you to submit pull requests for changes that you want to have included. However, Amazon Web Services doesn't currently support running modified copies of this software.
	//
	// This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log into your container instance and run the following command: `sudo docker version | grep "Server API version"`
	LogDriver *string `field:"required" json:"logDriver" yaml:"logDriver"`
	// The configuration options to send to the log driver.
	//
	// This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log into your container instance and run the following command: `sudo docker version | grep "Server API version"`
	Options interface{} `field:"optional" json:"options" yaml:"options"`
	// The secrets to pass to the log configuration.
	//
	// For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html) in the *AWS Batch User Guide* .
	SecretOptions interface{} `field:"optional" json:"secretOptions" yaml:"secretOptions"`
}

Log configuration options to send to a custom log driver for the container.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var options interface{}

logConfigurationProperty := &logConfigurationProperty{
	logDriver: jsii.String("logDriver"),

	// the properties below are optional
	options: options,
	secretOptions: []interface{}{
		&secretProperty{
			name: jsii.String("name"),
			valueFrom: jsii.String("valueFrom"),
		},
	},
}

type CfnJobDefinition_MountPointsProperty

type CfnJobDefinition_MountPointsProperty struct {
	// The path on the container where the host volume is mounted.
	ContainerPath *string `field:"optional" json:"containerPath" yaml:"containerPath"`
	// If this value is `true` , the container has read-only access to the volume.
	//
	// Otherwise, the container can write to the volume. The default value is `false` .
	ReadOnly interface{} `field:"optional" json:"readOnly" yaml:"readOnly"`
	// The name of the volume to mount.
	SourceVolume *string `field:"optional" json:"sourceVolume" yaml:"sourceVolume"`
}

Details on a Docker volume mount point that's used in a job's container properties.

This parameter maps to `Volumes` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/api/docker_remote_api_v1.19/#create-a-container) section of the Docker Remote API and the `--volume` option to docker run.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

mountPointsProperty := &mountPointsProperty{
	containerPath: jsii.String("containerPath"),
	readOnly: jsii.Boolean(false),
	sourceVolume: jsii.String("sourceVolume"),
}

type CfnJobDefinition_NetworkConfigurationProperty

type CfnJobDefinition_NetworkConfigurationProperty struct {
	// Indicates whether the job should have a public IP address.
	//
	// For a job that is running on Fargate resources in a private subnet to send outbound traffic to the internet (for example, to pull container images), the private subnet requires a NAT gateway be attached to route requests to the internet. For more information, see [Amazon ECS task networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) . The default value is "DISABLED".
	AssignPublicIp *string `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"`
}

The network configuration for jobs that are running on Fargate resources.

Jobs that are running on EC2 resources must not specify this parameter.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

networkConfigurationProperty := &networkConfigurationProperty{
	assignPublicIp: jsii.String("assignPublicIp"),
}

type CfnJobDefinition_NodePropertiesProperty

type CfnJobDefinition_NodePropertiesProperty struct {
	// Specifies the node index for the main node of a multi-node parallel job.
	//
	// This node index value must be fewer than the number of nodes.
	MainNode *float64 `field:"required" json:"mainNode" yaml:"mainNode"`
	// A list of node ranges and their properties associated with a multi-node parallel job.
	NodeRangeProperties interface{} `field:"required" json:"nodeRangeProperties" yaml:"nodeRangeProperties"`
	// The number of nodes associated with a multi-node parallel job.
	NumNodes *float64 `field:"required" json:"numNodes" yaml:"numNodes"`
}

An object representing the node properties of a multi-node parallel job.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var options interface{}

nodePropertiesProperty := &nodePropertiesProperty{
	mainNode: jsii.Number(123),
	nodeRangeProperties: []interface{}{
		&nodeRangePropertyProperty{
			targetNodes: jsii.String("targetNodes"),

			// the properties below are optional
			container: &containerPropertiesProperty{
				image: jsii.String("image"),

				// the properties below are optional
				command: []*string{
					jsii.String("command"),
				},
				environment: []interface{}{
					&environmentProperty{
						name: jsii.String("name"),
						value: jsii.String("value"),
					},
				},
				executionRoleArn: jsii.String("executionRoleArn"),
				fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
					platformVersion: jsii.String("platformVersion"),
				},
				instanceType: jsii.String("instanceType"),
				jobRoleArn: jsii.String("jobRoleArn"),
				linuxParameters: &linuxParametersProperty{
					devices: []interface{}{
						&deviceProperty{
							containerPath: jsii.String("containerPath"),
							hostPath: jsii.String("hostPath"),
							permissions: []*string{
								jsii.String("permissions"),
							},
						},
					},
					initProcessEnabled: jsii.Boolean(false),
					maxSwap: jsii.Number(123),
					sharedMemorySize: jsii.Number(123),
					swappiness: jsii.Number(123),
					tmpfs: []interface{}{
						&tmpfsProperty{
							containerPath: jsii.String("containerPath"),
							size: jsii.Number(123),

							// the properties below are optional
							mountOptions: []*string{
								jsii.String("mountOptions"),
							},
						},
					},
				},
				logConfiguration: &logConfigurationProperty{
					logDriver: jsii.String("logDriver"),

					// the properties below are optional
					options: options,
					secretOptions: []interface{}{
						&secretProperty{
							name: jsii.String("name"),
							valueFrom: jsii.String("valueFrom"),
						},
					},
				},
				memory: jsii.Number(123),
				mountPoints: []interface{}{
					&mountPointsProperty{
						containerPath: jsii.String("containerPath"),
						readOnly: jsii.Boolean(false),
						sourceVolume: jsii.String("sourceVolume"),
					},
				},
				networkConfiguration: &networkConfigurationProperty{
					assignPublicIp: jsii.String("assignPublicIp"),
				},
				privileged: jsii.Boolean(false),
				readonlyRootFilesystem: jsii.Boolean(false),
				resourceRequirements: []interface{}{
					&resourceRequirementProperty{
						type: jsii.String("type"),
						value: jsii.String("value"),
					},
				},
				secrets: []interface{}{
					&secretProperty{
						name: jsii.String("name"),
						valueFrom: jsii.String("valueFrom"),
					},
				},
				ulimits: []interface{}{
					&ulimitProperty{
						hardLimit: jsii.Number(123),
						name: jsii.String("name"),
						softLimit: jsii.Number(123),
					},
				},
				user: jsii.String("user"),
				vcpus: jsii.Number(123),
				volumes: []interface{}{
					&volumesProperty{
						efsVolumeConfiguration: &efsVolumeConfigurationProperty{
							fileSystemId: jsii.String("fileSystemId"),

							// the properties below are optional
							authorizationConfig: &authorizationConfigProperty{
								accessPointId: jsii.String("accessPointId"),
								iam: jsii.String("iam"),
							},
							rootDirectory: jsii.String("rootDirectory"),
							transitEncryption: jsii.String("transitEncryption"),
							transitEncryptionPort: jsii.Number(123),
						},
						host: &volumesHostProperty{
							sourcePath: jsii.String("sourcePath"),
						},
						name: jsii.String("name"),
					},
				},
			},
		},
	},
	numNodes: jsii.Number(123),
}

type CfnJobDefinition_NodeRangePropertyProperty

type CfnJobDefinition_NodeRangePropertyProperty struct {
	// The range of nodes, using node index values.
	//
	// A range of `0:3` indicates nodes with index values of `0` through `3` . If the starting range value is omitted ( `:n` ), then `0` is used to start the range. If the ending range value is omitted ( `n:` ), then the highest possible node index is used to end the range. Your accumulative node ranges must account for all nodes ( `0:n` ). You can nest node ranges, for example `0:10` and `4:5` , in which case the `4:5` range properties override the `0:10` properties.
	TargetNodes *string `field:"required" json:"targetNodes" yaml:"targetNodes"`
	// The container details for the node range.
	Container interface{} `field:"optional" json:"container" yaml:"container"`
}

An object representing the properties of the node range for a multi-node parallel job.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var options interface{}

nodeRangePropertyProperty := &nodeRangePropertyProperty{
	targetNodes: jsii.String("targetNodes"),

	// the properties below are optional
	container: &containerPropertiesProperty{
		image: jsii.String("image"),

		// the properties below are optional
		command: []*string{
			jsii.String("command"),
		},
		environment: []interface{}{
			&environmentProperty{
				name: jsii.String("name"),
				value: jsii.String("value"),
			},
		},
		executionRoleArn: jsii.String("executionRoleArn"),
		fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
			platformVersion: jsii.String("platformVersion"),
		},
		instanceType: jsii.String("instanceType"),
		jobRoleArn: jsii.String("jobRoleArn"),
		linuxParameters: &linuxParametersProperty{
			devices: []interface{}{
				&deviceProperty{
					containerPath: jsii.String("containerPath"),
					hostPath: jsii.String("hostPath"),
					permissions: []*string{
						jsii.String("permissions"),
					},
				},
			},
			initProcessEnabled: jsii.Boolean(false),
			maxSwap: jsii.Number(123),
			sharedMemorySize: jsii.Number(123),
			swappiness: jsii.Number(123),
			tmpfs: []interface{}{
				&tmpfsProperty{
					containerPath: jsii.String("containerPath"),
					size: jsii.Number(123),

					// the properties below are optional
					mountOptions: []*string{
						jsii.String("mountOptions"),
					},
				},
			},
		},
		logConfiguration: &logConfigurationProperty{
			logDriver: jsii.String("logDriver"),

			// the properties below are optional
			options: options,
			secretOptions: []interface{}{
				&secretProperty{
					name: jsii.String("name"),
					valueFrom: jsii.String("valueFrom"),
				},
			},
		},
		memory: jsii.Number(123),
		mountPoints: []interface{}{
			&mountPointsProperty{
				containerPath: jsii.String("containerPath"),
				readOnly: jsii.Boolean(false),
				sourceVolume: jsii.String("sourceVolume"),
			},
		},
		networkConfiguration: &networkConfigurationProperty{
			assignPublicIp: jsii.String("assignPublicIp"),
		},
		privileged: jsii.Boolean(false),
		readonlyRootFilesystem: jsii.Boolean(false),
		resourceRequirements: []interface{}{
			&resourceRequirementProperty{
				type: jsii.String("type"),
				value: jsii.String("value"),
			},
		},
		secrets: []interface{}{
			&secretProperty{
				name: jsii.String("name"),
				valueFrom: jsii.String("valueFrom"),
			},
		},
		ulimits: []interface{}{
			&ulimitProperty{
				hardLimit: jsii.Number(123),
				name: jsii.String("name"),
				softLimit: jsii.Number(123),
			},
		},
		user: jsii.String("user"),
		vcpus: jsii.Number(123),
		volumes: []interface{}{
			&volumesProperty{
				efsVolumeConfiguration: &efsVolumeConfigurationProperty{
					fileSystemId: jsii.String("fileSystemId"),

					// the properties below are optional
					authorizationConfig: &authorizationConfigProperty{
						accessPointId: jsii.String("accessPointId"),
						iam: jsii.String("iam"),
					},
					rootDirectory: jsii.String("rootDirectory"),
					transitEncryption: jsii.String("transitEncryption"),
					transitEncryptionPort: jsii.Number(123),
				},
				host: &volumesHostProperty{
					sourcePath: jsii.String("sourcePath"),
				},
				name: jsii.String("name"),
			},
		},
	},
}

type CfnJobDefinition_ResourceRequirementProperty

type CfnJobDefinition_ResourceRequirementProperty struct {
	// The type of resource to assign to a container.
	//
	// The supported resources include `GPU` , `MEMORY` , and `VCPU` .
	Type *string `field:"optional" json:"type" yaml:"type"`
	// The quantity of the specified resource to reserve for the container. The values vary based on the `type` specified.
	//
	// - **type="GPU"** - The number of physical GPUs to reserve for the container. The number of GPUs reserved for all containers in a job shouldn't exceed the number of available GPUs on the compute resource that the job is launched on.
	//
	// > GPUs are not available for jobs that are running on Fargate resources.
	// - **type="MEMORY"** - The memory hard limit (in MiB) present to the container. This parameter is supported for jobs that are running on EC2 resources. If your container attempts to exceed the memory specified, the container is terminated. This parameter maps to `Memory` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--memory` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) . You must specify at least 4 MiB of memory for a job. This is required but can be specified in several places for multi-node parallel (MNP) jobs. It must be specified for each node at least once. This parameter maps to `Memory` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--memory` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) .
	//
	// > If you're trying to maximize your resource utilization by providing your jobs as much memory as possible for a particular instance type, see [Memory management](https://docs.aws.amazon.com/batch/latest/userguide/memory-management.html) in the *AWS Batch User Guide* .
	//
	// For jobs that are running on Fargate resources, then `value` is the hard limit (in MiB), and must match one of the supported values and the `VCPU` values must be one of the values supported for that memory value.
	//
	// - **value = 512** - `VCPU` = 0.25
	// - **value = 1024** - `VCPU` = 0.25 or 0.5
	// - **value = 2048** - `VCPU` = 0.25, 0.5, or 1
	// - **value = 3072** - `VCPU` = 0.5, or 1
	// - **value = 4096** - `VCPU` = 0.5, 1, or 2
	// - **value = 5120, 6144, or 7168** - `VCPU` = 1 or 2
	// - **value = 8192** - `VCPU` = 1, 2, or 4
	// - **value = 9216, 10240, 11264, 12288, 13312, 14336, 15360, or 16384** - `VCPU` = 2 or 4
	// - **value = 17408, 18432, 19456, 20480, 21504, 22528, 23552, 24576, 25600, 26624, 27648, 28672, 29696, or 30720** - `VCPU` = 4
	// - **type="VCPU"** - The number of vCPUs reserved for the container. This parameter maps to `CpuShares` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/#create-a-container) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.23/) and the `--cpu-shares` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) . Each vCPU is equivalent to 1,024 CPU shares. For EC2 resources, you must specify at least one vCPU. This is required but can be specified in several places; it must be specified for each node at least once.
	//
	// For jobs that are running on Fargate resources, then `value` must match one of the supported values and the `MEMORY` values must be one of the values supported for that `VCPU` value. The supported values are 0.25, 0.5, 1, 2, and 4
	//
	// - **value = 0.25** - `MEMORY` = 512, 1024, or 2048
	// - **value = 0.5** - `MEMORY` = 1024, 2048, 3072, or 4096
	// - **value = 1** - `MEMORY` = 2048, 3072, 4096, 5120, 6144, 7168, or 8192
	// - **value = 2** - `MEMORY` = 4096, 5120, 6144, 7168, 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360, or 16384
	// - **value = 4** - `MEMORY` = 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360, 16384, 17408, 18432, 19456, 20480, 21504, 22528, 23552, 24576, 25600, 26624, 27648, 28672, 29696, or 30720.
	Value *string `field:"optional" json:"value" yaml:"value"`
}

The type and amount of a resource to assign to a container.

The supported resources include `GPU` , `MEMORY` , and `VCPU` .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

resourceRequirementProperty := &resourceRequirementProperty{
	type: jsii.String("type"),
	value: jsii.String("value"),
}

type CfnJobDefinition_RetryStrategyProperty

type CfnJobDefinition_RetryStrategyProperty struct {
	// The number of times to move a job to the `RUNNABLE` status.
	//
	// You can specify between 1 and 10 attempts. If the value of `attempts` is greater than one, the job is retried on failure the same number of attempts as the value.
	Attempts *float64 `field:"optional" json:"attempts" yaml:"attempts"`
	// Array of up to 5 objects that specify conditions under which the job should be retried or failed.
	//
	// If this parameter is specified, then the `attempts` parameter must also be specified.
	EvaluateOnExit interface{} `field:"optional" json:"evaluateOnExit" yaml:"evaluateOnExit"`
}

The retry strategy associated with a job.

For more information, see [Automated job retries](https://docs.aws.amazon.com/batch/latest/userguide/job_retries.html) in the *AWS Batch User Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

retryStrategyProperty := &retryStrategyProperty{
	attempts: jsii.Number(123),
	evaluateOnExit: []interface{}{
		&evaluateOnExitProperty{
			action: jsii.String("action"),

			// the properties below are optional
			onExitCode: jsii.String("onExitCode"),
			onReason: jsii.String("onReason"),
			onStatusReason: jsii.String("onStatusReason"),
		},
	},
}

type CfnJobDefinition_SecretProperty

type CfnJobDefinition_SecretProperty struct {
	// The name of the secret.
	Name *string `field:"required" json:"name" yaml:"name"`
	// The secret to expose to the container.
	//
	// The supported values are either the full ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the AWS Systems Manager Parameter Store.
	//
	// > If the AWS Systems Manager Parameter Store parameter exists in the same Region as the job you're launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.
	ValueFrom *string `field:"required" json:"valueFrom" yaml:"valueFrom"`
}

An object representing the secret to expose to your container.

Secrets can be exposed to a container in the following ways:

- To inject sensitive data into your containers as environment variables, use the `secrets` container definition parameter. - To reference sensitive information in the log configuration of a container, use the `secretOptions` container definition parameter.

For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html) in the *AWS Batch User Guide* .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

secretProperty := &secretProperty{
	name: jsii.String("name"),
	valueFrom: jsii.String("valueFrom"),
}

type CfnJobDefinition_TimeoutProperty

type CfnJobDefinition_TimeoutProperty struct {
	// The time duration in seconds (measured from the job attempt's `startedAt` timestamp) after which AWS Batch terminates your jobs if they have not finished.
	//
	// The minimum value for the timeout is 60 seconds.
	AttemptDurationSeconds *float64 `field:"optional" json:"attemptDurationSeconds" yaml:"attemptDurationSeconds"`
}

An object representing a job timeout configuration.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

timeoutProperty := &timeoutProperty{
	attemptDurationSeconds: jsii.Number(123),
}

type CfnJobDefinition_TmpfsProperty

type CfnJobDefinition_TmpfsProperty struct {
	// The absolute file path in the container where the tmpfs volume is mounted.
	ContainerPath *string `field:"required" json:"containerPath" yaml:"containerPath"`
	// The size (in MiB) of the tmpfs volume.
	Size *float64 `field:"required" json:"size" yaml:"size"`
	// The list of tmpfs volume mount options.
	//
	// Valid values: " `defaults` " | " `ro` " | " `rw` " | " `suid` " | " `nosuid` " | " `dev` " | " `nodev` " | " `exec` " | " `noexec` " | " `sync` " | " `async` " | " `dirsync` " | " `remount` " | " `mand` " | " `nomand` " | " `atime` " | " `noatime` " | " `diratime` " | " `nodiratime` " | " `bind` " | " `rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime` " | " `norelatime` " | " `strictatime` " | " `nostrictatime` " | " `mode` " | " `uid` " | " `gid` " | " `nr_inodes` " | " `nr_blocks` " | " `mpol` ".
	MountOptions *[]*string `field:"optional" json:"mountOptions" yaml:"mountOptions"`
}

The container path, mount options, and size of the tmpfs mount.

> This object isn't applicable to jobs that are running on Fargate resources.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

tmpfsProperty := &tmpfsProperty{
	containerPath: jsii.String("containerPath"),
	size: jsii.Number(123),

	// the properties below are optional
	mountOptions: []*string{
		jsii.String("mountOptions"),
	},
}

type CfnJobDefinition_UlimitProperty

type CfnJobDefinition_UlimitProperty struct {
	// The hard limit for the `ulimit` type.
	HardLimit *float64 `field:"required" json:"hardLimit" yaml:"hardLimit"`
	// The `type` of the `ulimit` .
	Name *string `field:"required" json:"name" yaml:"name"`
	// The soft limit for the `ulimit` type.
	SoftLimit *float64 `field:"required" json:"softLimit" yaml:"softLimit"`
}

The `ulimit` settings to pass to the container.

> This object isn't applicable to jobs that are running on Fargate resources.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

ulimitProperty := &ulimitProperty{
	hardLimit: jsii.Number(123),
	name: jsii.String("name"),
	softLimit: jsii.Number(123),
}

type CfnJobDefinition_VolumesHostProperty

type CfnJobDefinition_VolumesHostProperty struct {
	// The path on the host container instance that's presented to the container.
	//
	// If this parameter is empty, then the Docker daemon has assigned a host path for you. If this parameter contains a file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source path location doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.
	//
	// > This parameter isn't applicable to jobs that run on Fargate resources and shouldn't be provided.
	SourcePath *string `field:"optional" json:"sourcePath" yaml:"sourcePath"`
}

Determine whether your data volume persists on the host container instance and where it is stored.

If this parameter is empty, then the Docker daemon assigns a host path for your data volume, but the data isn't guaranteed to persist after the containers associated with it stop running.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

volumesHostProperty := &volumesHostProperty{
	sourcePath: jsii.String("sourcePath"),
}

type CfnJobDefinition_VolumesProperty

type CfnJobDefinition_VolumesProperty struct {
	// This is used when you're using an Amazon Elastic File System file system for job storage.
	//
	// For more information, see [Amazon EFS Volumes](https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html) in the *AWS Batch User Guide* .
	EfsVolumeConfiguration interface{} `field:"optional" json:"efsVolumeConfiguration" yaml:"efsVolumeConfiguration"`
	// The contents of the `host` parameter determine whether your data volume persists on the host container instance and where it is stored.
	//
	// If the host parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data isn't guaranteed to persist after the containers associated with it stop running.
	//
	// > This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
	Host interface{} `field:"optional" json:"host" yaml:"host"`
	// The name of the volume.
	//
	// It can be up to 255 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_). This name is referenced in the `sourceVolume` parameter of container definition `mountPoints` .
	Name *string `field:"optional" json:"name" yaml:"name"`
}

A list of volumes associated with the job.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

volumesProperty := &volumesProperty{
	efsVolumeConfiguration: &efsVolumeConfigurationProperty{
		fileSystemId: jsii.String("fileSystemId"),

		// the properties below are optional
		authorizationConfig: &authorizationConfigProperty{
			accessPointId: jsii.String("accessPointId"),
			iam: jsii.String("iam"),
		},
		rootDirectory: jsii.String("rootDirectory"),
		transitEncryption: jsii.String("transitEncryption"),
		transitEncryptionPort: jsii.Number(123),
	},
	host: &volumesHostProperty{
		sourcePath: jsii.String("sourcePath"),
	},
	name: jsii.String("name"),
}

type CfnJobQueue

type CfnJobQueue interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Returns the job queue ARN, such as `batch: *us-east-1* : *111122223333* :job-queue/ *JobQueueName*` .
	AttrJobQueueArn() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// The set of compute environments mapped to a job queue and their order relative to each other.
	//
	// The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
	//
	// > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
	ComputeEnvironmentOrder() interface{}
	SetComputeEnvironmentOrder(val interface{})
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The name of the job queue.
	//
	// It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
	JobQueueName() *string
	SetJobQueueName(val *string)
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The priority of the job queue.
	//
	// Job queues with a higher priority (or a higher integer value for the `priority` parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of `10` is given scheduling preference over a job queue with a priority value of `1` . All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
	Priority() *float64
	SetPriority(val *float64)
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The Amazon Resource Name (ARN) of the scheduling policy.
	//
	// The format is `aws: *Partition* :batch: *Region* : *Account* :scheduling-policy/ *Name*` . For example, `aws:aws:batch:us-west-2:012345678910:scheduling-policy/MySchedulingPolicy` .
	SchedulingPolicyArn() *string
	SetSchedulingPolicyArn(val *string)
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The state of the job queue.
	//
	// If the job queue state is `ENABLED` , it is able to accept jobs. If the job queue state is `DISABLED` , new jobs can't be added to the queue, but jobs already in the queue can finish.
	State() *string
	SetState(val *string)
	// The tags applied to the job queue.
	//
	// For more information, see [Tagging your AWS Batch resources](https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html) in *AWS Batch User Guide* .
	Tags() awscdk.TagManager
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::Batch::JobQueue`.

The `AWS::Batch::JobQueue` resource specifies the parameters for an AWS Batch job queue definition. For more information, see [Job Queues](https://docs.aws.amazon.com/batch/latest/userguide/job_queues.html) in the ** .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnJobQueue := awscdk.Aws_batch.NewCfnJobQueue(this, jsii.String("MyCfnJobQueue"), &cfnJobQueueProps{
	computeEnvironmentOrder: []interface{}{
		&computeEnvironmentOrderProperty{
			computeEnvironment: jsii.String("computeEnvironment"),
			order: jsii.Number(123),
		},
	},
	priority: jsii.Number(123),

	// the properties below are optional
	jobQueueName: jsii.String("jobQueueName"),
	schedulingPolicyArn: jsii.String("schedulingPolicyArn"),
	state: jsii.String("state"),
	tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
})

func NewCfnJobQueue

func NewCfnJobQueue(scope awscdk.Construct, id *string, props *CfnJobQueueProps) CfnJobQueue

Create a new `AWS::Batch::JobQueue`.

type CfnJobQueueProps

type CfnJobQueueProps struct {
	// The set of compute environments mapped to a job queue and their order relative to each other.
	//
	// The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the `VALID` state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
	//
	// > All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.
	ComputeEnvironmentOrder interface{} `field:"required" json:"computeEnvironmentOrder" yaml:"computeEnvironmentOrder"`
	// The priority of the job queue.
	//
	// Job queues with a higher priority (or a higher integer value for the `priority` parameter) are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority value of `10` is given scheduling preference over a job queue with a priority value of `1` . All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.
	Priority *float64 `field:"required" json:"priority" yaml:"priority"`
	// The name of the job queue.
	//
	// It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
	JobQueueName *string `field:"optional" json:"jobQueueName" yaml:"jobQueueName"`
	// The Amazon Resource Name (ARN) of the scheduling policy.
	//
	// The format is `aws: *Partition* :batch: *Region* : *Account* :scheduling-policy/ *Name*` . For example, `aws:aws:batch:us-west-2:012345678910:scheduling-policy/MySchedulingPolicy` .
	SchedulingPolicyArn *string `field:"optional" json:"schedulingPolicyArn" yaml:"schedulingPolicyArn"`
	// The state of the job queue.
	//
	// If the job queue state is `ENABLED` , it is able to accept jobs. If the job queue state is `DISABLED` , new jobs can't be added to the queue, but jobs already in the queue can finish.
	State *string `field:"optional" json:"state" yaml:"state"`
	// The tags applied to the job queue.
	//
	// For more information, see [Tagging your AWS Batch resources](https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html) in *AWS Batch User Guide* .
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `CfnJobQueue`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnJobQueueProps := &cfnJobQueueProps{
	computeEnvironmentOrder: []interface{}{
		&computeEnvironmentOrderProperty{
			computeEnvironment: jsii.String("computeEnvironment"),
			order: jsii.Number(123),
		},
	},
	priority: jsii.Number(123),

	// the properties below are optional
	jobQueueName: jsii.String("jobQueueName"),
	schedulingPolicyArn: jsii.String("schedulingPolicyArn"),
	state: jsii.String("state"),
	tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}

type CfnJobQueue_ComputeEnvironmentOrderProperty

type CfnJobQueue_ComputeEnvironmentOrderProperty struct {
	// The Amazon Resource Name (ARN) of the compute environment.
	ComputeEnvironment *string `field:"required" json:"computeEnvironment" yaml:"computeEnvironment"`
	// The order of the compute environment.
	//
	// Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower `order` integer value is tried for job placement first.
	Order *float64 `field:"required" json:"order" yaml:"order"`
}

The order in which compute environments are tried for job placement within a queue.

Compute environments are tried in ascending order. For example, if two compute environments are associated with a job queue, the compute environment with a lower order integer value is tried for job placement first. Compute environments must be in the `VALID` state before you can associate them with a job queue. All of the compute environments must be either EC2 ( `EC2` or `SPOT` ) or Fargate ( `FARGATE` or `FARGATE_SPOT` ); EC2 and Fargate compute environments can't be mixed.

> All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

computeEnvironmentOrderProperty := &computeEnvironmentOrderProperty{
	computeEnvironment: jsii.String("computeEnvironment"),
	order: jsii.Number(123),
}

type CfnSchedulingPolicy

type CfnSchedulingPolicy interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// Returns the scheduling policy ARN, such as `batch: *us-east-1* : *111122223333* :scheduling-policy/ *HighPriority*` .
	AttrArn() *string
	// Options for this resource, such as condition, update policy etc.
	// Experimental.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	// Experimental.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	// Experimental.
	CreationStack() *[]*string
	// The fair share policy of the scheduling policy.
	FairsharePolicy() interface{}
	SetFairsharePolicy(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	// Experimental.
	LogicalId() *string
	// The name of the scheduling policy.
	//
	// It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
	Name() *string
	SetName(val *string)
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	// Experimental.
	Ref() *string
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The tags that you apply to the scheduling policy to help you categorize and organize your resources.
	//
	// Each tag consists of a key and an optional value. For more information, see [Tagging AWS Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in *AWS General Reference* .
	//
	// These tags can be updated or removed using the [TagResource](https://docs.aws.amazon.com/batch/latest/APIReference/API_TagResource.html) and [UntagResource](https://docs.aws.amazon.com/batch/latest/APIReference/API_UntagResource.html) API operations.
	Tags() awscdk.TagManager
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	// Experimental.
	UpdatedProperites() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	// Experimental.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	// Experimental.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//    "GlobalSecondaryIndexes": [
	//      {
	//        "Projection": {
	//          "NonKeyAttributes": [ "myattribute" ]
	//          ...
	//        }
	//        ...
	//      },
	//      {
	//        "ProjectionType": "INCLUDE"
	//        ...
	//      },
	//    ]
	//    ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	// Experimental.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	// Experimental.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	// Experimental.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	// Experimental.
	GetAtt(attributeName *string) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	// Experimental.
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Overrides the auto-generated logical ID with a specific ID.
	// Experimental.
	OverrideLogicalId(newLogicalId *string)
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	// Experimental.
	ShouldSynthesize() *bool
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
	// Experimental.
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::Batch::SchedulingPolicy`.

The `AWS::Batch::SchedulingPolicy` resource specifies the parameters for an AWS Batch scheduling policy. For more information, see [Scheduling Policies](https://docs.aws.amazon.com/batch/latest/userguide/scheduling_policies.html) in the ** .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnSchedulingPolicy := awscdk.Aws_batch.NewCfnSchedulingPolicy(this, jsii.String("MyCfnSchedulingPolicy"), &cfnSchedulingPolicyProps{
	fairsharePolicy: &fairsharePolicyProperty{
		computeReservation: jsii.Number(123),
		shareDecaySeconds: jsii.Number(123),
		shareDistribution: []interface{}{
			&shareAttributesProperty{
				shareIdentifier: jsii.String("shareIdentifier"),
				weightFactor: jsii.Number(123),
			},
		},
	},
	name: jsii.String("name"),
	tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
})

func NewCfnSchedulingPolicy

func NewCfnSchedulingPolicy(scope awscdk.Construct, id *string, props *CfnSchedulingPolicyProps) CfnSchedulingPolicy

Create a new `AWS::Batch::SchedulingPolicy`.

type CfnSchedulingPolicyProps

type CfnSchedulingPolicyProps struct {
	// The fair share policy of the scheduling policy.
	FairsharePolicy interface{} `field:"optional" json:"fairsharePolicy" yaml:"fairsharePolicy"`
	// The name of the scheduling policy.
	//
	// It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The tags that you apply to the scheduling policy to help you categorize and organize your resources.
	//
	// Each tag consists of a key and an optional value. For more information, see [Tagging AWS Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in *AWS General Reference* .
	//
	// These tags can be updated or removed using the [TagResource](https://docs.aws.amazon.com/batch/latest/APIReference/API_TagResource.html) and [UntagResource](https://docs.aws.amazon.com/batch/latest/APIReference/API_UntagResource.html) API operations.
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `CfnSchedulingPolicy`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnSchedulingPolicyProps := &cfnSchedulingPolicyProps{
	fairsharePolicy: &fairsharePolicyProperty{
		computeReservation: jsii.Number(123),
		shareDecaySeconds: jsii.Number(123),
		shareDistribution: []interface{}{
			&shareAttributesProperty{
				shareIdentifier: jsii.String("shareIdentifier"),
				weightFactor: jsii.Number(123),
			},
		},
	},
	name: jsii.String("name"),
	tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}

type CfnSchedulingPolicy_FairsharePolicyProperty

type CfnSchedulingPolicy_FairsharePolicyProperty struct {
	// A value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used.
	//
	// The reserved ratio is `( *computeReservation* /100)^ *ActiveFairShares*` where `*ActiveFairShares*` is the number of active fair share identifiers.
	//
	// For example, a `computeReservation` value of 50 indicates that AWS Batch should reserve 50% of the maximum available vCPU if there is only one fair share identifier, 25% if there are two fair share identifiers, and 12.5% if there are three fair share identifiers. A `computeReservation` value of 25 indicates that AWS Batch should reserve 25% of the maximum available vCPU if there is only one fair share identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three fair share identifiers.
	//
	// The minimum value is 0 and the maximum value is 99.
	ComputeReservation *float64 `field:"optional" json:"computeReservation" yaml:"computeReservation"`
	// The time period to use to calculate a fair share percentage for each fair share identifier in use, in seconds.
	//
	// A value of zero (0) indicates that only current usage should be measured. The decay allows for more recently run jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 week).
	ShareDecaySeconds *float64 `field:"optional" json:"shareDecaySeconds" yaml:"shareDecaySeconds"`
	// An array of `SharedIdentifier` objects that contain the weights for the fair share identifiers for the fair share policy.
	//
	// Fair share identifiers that aren't included have a default weight of `1.0` .
	ShareDistribution interface{} `field:"optional" json:"shareDistribution" yaml:"shareDistribution"`
}

The fair share policy for a scheduling policy.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

fairsharePolicyProperty := &fairsharePolicyProperty{
	computeReservation: jsii.Number(123),
	shareDecaySeconds: jsii.Number(123),
	shareDistribution: []interface{}{
		&shareAttributesProperty{
			shareIdentifier: jsii.String("shareIdentifier"),
			weightFactor: jsii.Number(123),
		},
	},
}

type CfnSchedulingPolicy_ShareAttributesProperty

type CfnSchedulingPolicy_ShareAttributesProperty struct {
	// A fair share identifier or fair share identifier prefix.
	//
	// If the string ends with an asterisk (*), this entry specifies the weight factor to use for fair share identifiers that start with that prefix. The list of fair share identifiers in a fair share policy cannot overlap. For example, you can't have one that specifies a `shareIdentifier` of `UserA*` and another that specifies a `shareIdentifier` of `UserA-1` .
	//
	// There can be no more than 500 fair share identifiers active in a job queue.
	//
	// The string is limited to 255 alphanumeric characters, optionally followed by an asterisk (*).
	ShareIdentifier *string `field:"optional" json:"shareIdentifier" yaml:"shareIdentifier"`
	// The weight factor for the fair share identifier.
	//
	// The default value is 1.0. A lower value has a higher priority for compute resources. For example, jobs that use a share identifier with a weight factor of 0.125 (1/8) get 8 times the compute resources of jobs that use a share identifier with a weight factor of 1.
	//
	// The smallest supported value is 0.0001, and the largest supported value is 999.9999.
	WeightFactor *float64 `field:"optional" json:"weightFactor" yaml:"weightFactor"`
}

Specifies the weights for the fair share identifiers for the fair share policy.

Fair share identifiers that aren't included have a default weight of `1.0` .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

shareAttributesProperty := &shareAttributesProperty{
	shareIdentifier: jsii.String("shareIdentifier"),
	weightFactor: jsii.Number(123),
}

type ComputeEnvironment

type ComputeEnvironment interface {
	awscdk.Resource
	IComputeEnvironment
	// The ARN of this compute environment.
	// Experimental.
	ComputeEnvironmentArn() *string
	// The name of this compute environment.
	// Experimental.
	ComputeEnvironmentName() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Batch Compute Environment.

Defines a batch compute environment to run batch jobs on.

Example:

var vpc vpc

myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
	computeResources: &computeResources{
		image: ecs.NewEcsOptimizedAmi(&ecsOptimizedAmiProps{
			generation: ec2.amazonLinuxGeneration_AMAZON_LINUX_2,
		}),
		vpc: vpc,
	},
})

Experimental.

func NewComputeEnvironment

func NewComputeEnvironment(scope constructs.Construct, id *string, props *ComputeEnvironmentProps) ComputeEnvironment

Experimental.

type ComputeEnvironmentProps

type ComputeEnvironmentProps struct {
	// A name for the compute environment.
	//
	// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
	// Experimental.
	ComputeEnvironmentName *string `field:"optional" json:"computeEnvironmentName" yaml:"computeEnvironmentName"`
	// The details of the required compute resources for the managed compute environment.
	//
	// If specified, and this is an unmanaged compute environment, will throw an error.
	//
	// By default, AWS Batch managed compute environments use a recent, approved version of the
	// Amazon ECS-optimized AMI for compute resources.
	// Experimental.
	ComputeResources *ComputeResources `field:"optional" json:"computeResources" yaml:"computeResources"`
	// The state of the compute environment.
	//
	// If the state is set to true, then the compute
	// environment accepts jobs from a queue and can scale out automatically based on queues.
	// Experimental.
	Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"`
	// Determines if AWS should manage the allocation of compute resources for processing jobs.
	//
	// If set to false, then you are in charge of providing the compute resource details.
	// Experimental.
	Managed *bool `field:"optional" json:"managed" yaml:"managed"`
	// The IAM role used by Batch to make calls to other AWS services on your behalf for managing the resources that you use with the service.
	//
	// By default, this role is created for you using
	// the AWS managed service policy for Batch.
	// Experimental.
	ServiceRole awsiam.IRole `field:"optional" json:"serviceRole" yaml:"serviceRole"`
}

Properties for creating a new Compute Environment.

Example:

var vpc vpc

myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
	computeResources: &computeResources{
		image: ecs.NewEcsOptimizedAmi(&ecsOptimizedAmiProps{
			generation: ec2.amazonLinuxGeneration_AMAZON_LINUX_2,
		}),
		vpc: vpc,
	},
})

Experimental.

type ComputeResourceType

type ComputeResourceType string

Property to specify if the compute environment uses On-Demand, SpotFleet, Fargate, or Fargate Spot compute resources.

Example:

vpc := ec2.NewVpc(this, jsii.String("VPC"))

spotEnvironment := batch.NewComputeEnvironment(this, jsii.String("MySpotEnvironment"), &computeEnvironmentProps{
	computeResources: &computeResources{
		type: batch.computeResourceType_SPOT,
		bidPercentage: jsii.Number(75),
		 // Bids for resources at 75% of the on-demand price
		vpc: vpc,
	},
})

Experimental.

const (
	// Resources will be EC2 On-Demand resources.
	// Experimental.
	ComputeResourceType_ON_DEMAND ComputeResourceType = "ON_DEMAND"
	// Resources will be EC2 SpotFleet resources.
	// Experimental.
	ComputeResourceType_SPOT ComputeResourceType = "SPOT"
	// Resources will be Fargate resources.
	// Experimental.
	ComputeResourceType_FARGATE ComputeResourceType = "FARGATE"
	// Resources will be Fargate Spot resources.
	//
	// Fargate Spot uses spare capacity in the AWS cloud to run your fault-tolerant,
	// time-flexible jobs at up to a 70% discount. If AWS needs the resources back,
	// jobs running on Fargate Spot will be interrupted with two minutes of notification.
	// Experimental.
	ComputeResourceType_FARGATE_SPOT ComputeResourceType = "FARGATE_SPOT"
)

type ComputeResources

type ComputeResources struct {
	// The VPC network that all compute resources will be connected to.
	// Experimental.
	Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"`
	// The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated.
	//
	// This could be due to availability of the instance type in
	// the region or Amazon EC2 service limits. If this is not specified, the default for the EC2
	// ComputeResourceType is BEST_FIT, which will use only the best fitting instance type, waiting for
	// additional capacity if it's not available. This allocation strategy keeps costs lower but can limit
	// scaling. If you are using Spot Fleets with BEST_FIT then the Spot Fleet IAM Role must be specified.
	// BEST_FIT_PROGRESSIVE will select an additional instance type that is large enough to meet the
	// requirements of the jobs in the queue, with a preference for an instance type with a lower cost.
	// The default value for the SPOT instance type is SPOT_CAPACITY_OPTIMIZED, which is only available for
	// for this type of compute resources and will select an additional instance type that is large enough
	// to meet the requirements of the jobs in the queue, with a preference for an instance type that is
	// less likely to be interrupted.
	// Experimental.
	AllocationStrategy AllocationStrategy `field:"optional" json:"allocationStrategy" yaml:"allocationStrategy"`
	// This property will be ignored if you set the environment type to ON_DEMAND.
	//
	// The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for
	// that instance type before instances are launched. For example, if your maximum percentage is 20%,
	// then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. You always
	// pay the lowest (market) price and never more than your maximum percentage. If you leave this field empty,
	// the default value is 100% of the On-Demand price.
	// Experimental.
	BidPercentage *float64 `field:"optional" json:"bidPercentage" yaml:"bidPercentage"`
	// Key-value pair tags to be applied to resources that are launched in the compute environment.
	//
	// For AWS Batch, these take the form of "String1": "String2", where String1 is the tag key and
	// String2 is the tag value—for example, { "Name": "AWS Batch Instance - C4OnDemand" }.
	// Experimental.
	ComputeResourcesTags *map[string]*string `field:"optional" json:"computeResourcesTags" yaml:"computeResourcesTags"`
	// The desired number of EC2 vCPUS in the compute environment.
	// Experimental.
	DesiredvCpus *float64 `field:"optional" json:"desiredvCpus" yaml:"desiredvCpus"`
	// The EC2 key pair that is used for instances launched in the compute environment.
	//
	// If no key is defined, then SSH access is not allowed to provisioned compute resources.
	// Experimental.
	Ec2KeyPair *string `field:"optional" json:"ec2KeyPair" yaml:"ec2KeyPair"`
	// The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
	// Experimental.
	Image awsec2.IMachineImage `field:"optional" json:"image" yaml:"image"`
	// The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.
	//
	// You can specify
	// the short name or full Amazon Resource Name (ARN) of an instance profile. For example, ecsInstanceRole or
	// arn:aws:iam::<aws_account_id>:instance-profile/ecsInstanceRole . For more information, see Amazon ECS
	// Instance Role in the AWS Batch User Guide.
	// Experimental.
	InstanceRole *string `field:"optional" json:"instanceRole" yaml:"instanceRole"`
	// The types of EC2 instances that may be launched in the compute environment.
	//
	// You can specify instance
	// families to launch any instance type within those families (for example, c4 or p3), or you can specify
	// specific sizes within a family (such as c4.8xlarge). You can also choose optimal to pick instance types
	// (from the C, M, and R instance families) on the fly that match the demand of your job queues.
	// Experimental.
	InstanceTypes *[]awsec2.InstanceType `field:"optional" json:"instanceTypes" yaml:"instanceTypes"`
	// An optional launch template to associate with your compute resources.
	//
	// For more information, see README file.
	// Experimental.
	LaunchTemplate *LaunchTemplateSpecification `field:"optional" json:"launchTemplate" yaml:"launchTemplate"`
	// The maximum number of EC2 vCPUs that an environment can reach.
	//
	// Each vCPU is equivalent to
	// 1,024 CPU shares. You must specify at least one vCPU.
	// Experimental.
	MaxvCpus *float64 `field:"optional" json:"maxvCpus" yaml:"maxvCpus"`
	// The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment state is DISABLED).
	//
	// Each vCPU is equivalent to 1,024 CPU shares. By keeping this set to 0 you will not have instance time wasted when
	// there is no work to be run. If you set this above zero you will maintain that number of vCPUs at all times.
	// Experimental.
	MinvCpus *float64 `field:"optional" json:"minvCpus" yaml:"minvCpus"`
	// The Amazon EC2 placement group to associate with your compute resources.
	// Experimental.
	PlacementGroup *string `field:"optional" json:"placementGroup" yaml:"placementGroup"`
	// The EC2 security group(s) associated with instances launched in the compute environment.
	// Experimental.
	SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"`
	// This property will be ignored if you set the environment type to ON_DEMAND.
	//
	// The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment.
	// For more information, see Amazon EC2 Spot Fleet Role in the AWS Batch User Guide.
	// Experimental.
	SpotFleetRole awsiam.IRole `field:"optional" json:"spotFleetRole" yaml:"spotFleetRole"`
	// The type of compute environment: ON_DEMAND, SPOT, FARGATE, or FARGATE_SPOT.
	// Experimental.
	Type ComputeResourceType `field:"optional" json:"type" yaml:"type"`
	// The VPC subnets into which the compute resources are launched.
	// Experimental.
	VpcSubnets *awsec2.SubnetSelection `field:"optional" json:"vpcSubnets" yaml:"vpcSubnets"`
}

Properties for defining the structure of the batch compute cluster.

Example:

var vpc vpc

myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
	computeResources: &computeResources{
		image: ecs.NewEcsOptimizedAmi(&ecsOptimizedAmiProps{
			generation: ec2.amazonLinuxGeneration_AMAZON_LINUX_2,
		}),
		vpc: vpc,
	},
})

Experimental.

type ExposedSecret

type ExposedSecret interface {
	// Name of the option.
	// Experimental.
	OptionName() *string
	// Experimental.
	SetOptionName(val *string)
	// ARN of the secret option.
	// Experimental.
	SecretArn() *string
	// Experimental.
	SetSecretArn(val *string)
}

Exposed secret for log configuration.

Example:

import ssm "github.com/aws/aws-cdk-go/awscdk"

batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
	container: &jobDefinitionContainer{
		image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
		logConfiguration: &logConfiguration{
			logDriver: batch.logDriver_AWSLOGS,
			options: map[string]*string{
				"awslogs-region": jsii.String("us-east-1"),
			},
			secretOptions: []exposedSecret{
				batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
			},
		},
	},
})

Experimental.

func ExposedSecret_FromParametersStore

func ExposedSecret_FromParametersStore(optionName *string, parameter awsssm.IParameter) ExposedSecret

User Parameters Store Parameter. Experimental.

func ExposedSecret_FromSecretsManager

func ExposedSecret_FromSecretsManager(optionName *string, secret awssecretsmanager.ISecret) ExposedSecret

Use Secrets Manager Secret. Experimental.

func NewExposedSecret

func NewExposedSecret(optionName *string, secretArn *string) ExposedSecret

Experimental.

type IComputeEnvironment

type IComputeEnvironment interface {
	awscdk.IResource
	// The ARN of this compute environment.
	// Experimental.
	ComputeEnvironmentArn() *string
	// The name of this compute environment.
	// Experimental.
	ComputeEnvironmentName() *string
}

Properties of a compute environment. Experimental.

func ComputeEnvironment_FromComputeEnvironmentArn

func ComputeEnvironment_FromComputeEnvironmentArn(scope constructs.Construct, id *string, computeEnvironmentArn *string) IComputeEnvironment

Fetches an existing batch compute environment by its amazon resource name. Experimental.

type IJobDefinition

type IJobDefinition interface {
	awscdk.IResource
	// The ARN of this batch job definition.
	// Experimental.
	JobDefinitionArn() *string
	// The name of the batch job definition.
	// Experimental.
	JobDefinitionName() *string
}

An interface representing a job definition - either a new one, created with the CDK, *using the {@link JobDefinition} class, or existing ones, referenced using the {@link JobDefinition.fromJobDefinitionArn} method. Experimental.

func JobDefinition_FromJobDefinitionArn

func JobDefinition_FromJobDefinitionArn(scope constructs.Construct, id *string, jobDefinitionArn *string) IJobDefinition

Imports an existing batch job definition by its amazon resource name. Experimental.

func JobDefinition_FromJobDefinitionName

func JobDefinition_FromJobDefinitionName(scope constructs.Construct, id *string, jobDefinitionName *string) IJobDefinition

Imports an existing batch job definition by its name.

If name is specified without a revision then the latest active revision is used. Experimental.

type IJobQueue

type IJobQueue interface {
	awscdk.IResource
	// The ARN of this batch job queue.
	// Experimental.
	JobQueueArn() *string
	// A name for the job queue.
	//
	// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
	// Experimental.
	JobQueueName() *string
}

Properties of a Job Queue. Experimental.

func JobQueue_FromJobQueueArn

func JobQueue_FromJobQueueArn(scope constructs.Construct, id *string, jobQueueArn *string) IJobQueue

Fetches an existing batch job queue by its amazon resource name. Experimental.

type IMultiNodeProps

type IMultiNodeProps interface {
	// The number of nodes associated with a multi-node parallel job.
	// Experimental.
	Count() *float64
	// Experimental.
	SetCount(c *float64)
	// Specifies the node index for the main node of a multi-node parallel job.
	//
	// This node index value must be fewer than the number of nodes.
	// Experimental.
	MainNode() *float64
	// Experimental.
	SetMainNode(m *float64)
	// A list of node ranges and their properties associated with a multi-node parallel job.
	// Experimental.
	RangeProps() *[]INodeRangeProps
	// Experimental.
	SetRangeProps(r *[]INodeRangeProps)
}

Properties for specifying multi-node properties for compute resources. Experimental.

type INodeRangeProps

type INodeRangeProps interface {
	// The container details for the node range.
	// Experimental.
	Container() *JobDefinitionContainer
	// Experimental.
	SetContainer(c *JobDefinitionContainer)
	// The minimum node index value to apply this container definition against.
	//
	// You may nest node ranges, for example 0:10 and 4:5, in which case the 4:5 range properties override the 0:10 properties.
	// Experimental.
	FromNodeIndex() *float64
	// Experimental.
	SetFromNodeIndex(f *float64)
	// The maximum node index value to apply this container definition against. If omitted, the highest value is used relative.
	//
	// to the number of nodes associated with the job. You may nest node ranges, for example 0:10 and 4:5,
	// in which case the 4:5 range properties override the 0:10 properties.
	// Experimental.
	ToNodeIndex() *float64
	// Experimental.
	SetToNodeIndex(t *float64)
}

Properties for a multi-node batch job. Experimental.

type JobDefinition

type JobDefinition interface {
	awscdk.Resource
	IJobDefinition
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of this batch job definition.
	// Experimental.
	JobDefinitionArn() *string
	// The name of the batch job definition.
	// Experimental.
	JobDefinitionName() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Batch Job Definition.

Defines a batch job definition to execute a specific batch job.

Example:

import ecr "github.com/aws/aws-cdk-go/awscdk"

repo := ecr.repository.fromRepositoryName(this, jsii.String("batch-job-repo"), jsii.String("todo-list"))

batch.NewJobDefinition(this, jsii.String("batch-job-def-from-ecr"), &jobDefinitionProps{
	container: &jobDefinitionContainer{
		image: ecs.NewEcrImage(repo, jsii.String("latest")),
	},
})

Experimental.

func NewJobDefinition

func NewJobDefinition(scope constructs.Construct, id *string, props *JobDefinitionProps) JobDefinition

Experimental.

type JobDefinitionContainer

type JobDefinitionContainer struct {
	// The image used to start a container.
	// Experimental.
	Image awsecs.ContainerImage `field:"required" json:"image" yaml:"image"`
	// Whether or not to assign a public IP to the job.
	// Experimental.
	AssignPublicIp *bool `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"`
	// The command that is passed to the container.
	//
	// If you provide a shell command as a single string, you have to quote command-line arguments.
	// Experimental.
	Command *[]*string `field:"optional" json:"command" yaml:"command"`
	// The environment variables to pass to the container.
	// Experimental.
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// The IAM role that AWS Batch can assume.
	//
	// Required when using Fargate.
	// Experimental.
	ExecutionRole awsiam.IRole `field:"optional" json:"executionRole" yaml:"executionRole"`
	// The number of physical GPUs to reserve for the container.
	//
	// The number of GPUs reserved for all
	// containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on.
	// Experimental.
	GpuCount *float64 `field:"optional" json:"gpuCount" yaml:"gpuCount"`
	// The instance type to use for a multi-node parallel job.
	//
	// Currently all node groups in a
	// multi-node parallel job must use the same instance type. This parameter is not valid
	// for single-node container jobs.
	// Experimental.
	InstanceType awsec2.InstanceType `field:"optional" json:"instanceType" yaml:"instanceType"`
	// The IAM role that the container can assume for AWS permissions.
	// Experimental.
	JobRole awsiam.IRole `field:"optional" json:"jobRole" yaml:"jobRole"`
	// Linux-specific modifications that are applied to the container, such as details for device mappings.
	//
	// For now, only the `devices` property is supported.
	// Experimental.
	LinuxParams awsecs.LinuxParameters `field:"optional" json:"linuxParams" yaml:"linuxParams"`
	// The log configuration specification for the container.
	// Experimental.
	LogConfiguration *LogConfiguration `field:"optional" json:"logConfiguration" yaml:"logConfiguration"`
	// The hard limit (in MiB) of memory to present to the container.
	//
	// If your container attempts to exceed
	// the memory specified here, the container is killed. You must specify at least 4 MiB of memory for EC2 and 512 MiB for Fargate.
	// Experimental.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
	// The mount points for data volumes in your container.
	// Experimental.
	MountPoints *[]*awsecs.MountPoint `field:"optional" json:"mountPoints" yaml:"mountPoints"`
	// Fargate platform version.
	// Experimental.
	PlatformVersion awsecs.FargatePlatformVersion `field:"optional" json:"platformVersion" yaml:"platformVersion"`
	// When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user).
	// Experimental.
	Privileged *bool `field:"optional" json:"privileged" yaml:"privileged"`
	// When this parameter is true, the container is given read-only access to its root file system.
	// Experimental.
	ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"`
	// A list of ulimits to set in the container.
	// Experimental.
	Ulimits *[]*awsecs.Ulimit `field:"optional" json:"ulimits" yaml:"ulimits"`
	// The user name to use inside the container.
	// Experimental.
	User *string `field:"optional" json:"user" yaml:"user"`
	// The number of vCPUs reserved for the container.
	//
	// Each vCPU is equivalent to
	// 1,024 CPU shares. You must specify at least one vCPU for EC2 and 0.25 for Fargate.
	// Experimental.
	Vcpus *float64 `field:"optional" json:"vcpus" yaml:"vcpus"`
	// A list of data volumes used in a job.
	// Experimental.
	Volumes *[]*awsecs.Volume `field:"optional" json:"volumes" yaml:"volumes"`
}

Properties of a job definition container.

Example:

import ssm "github.com/aws/aws-cdk-go/awscdk"

batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
	container: &jobDefinitionContainer{
		image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
		logConfiguration: &logConfiguration{
			logDriver: batch.logDriver_AWSLOGS,
			options: map[string]*string{
				"awslogs-region": jsii.String("us-east-1"),
			},
			secretOptions: []exposedSecret{
				batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
			},
		},
	},
})

Experimental.

type JobDefinitionProps

type JobDefinitionProps struct {
	// An object with various properties specific to container-based jobs.
	// Experimental.
	Container *JobDefinitionContainer `field:"required" json:"container" yaml:"container"`
	// The name of the job definition.
	//
	// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
	// Experimental.
	JobDefinitionName *string `field:"optional" json:"jobDefinitionName" yaml:"jobDefinitionName"`
	// An object with various properties specific to multi-node parallel jobs.
	// Experimental.
	NodeProps IMultiNodeProps `field:"optional" json:"nodeProps" yaml:"nodeProps"`
	// When you submit a job, you can specify parameters that should replace the placeholders or override the default job definition parameters.
	//
	// Parameters
	// in job submission requests take precedence over the defaults in a job definition.
	// This allows you to use the same job definition for multiple jobs that use the same
	// format, and programmatically change values in the command at submission time.
	// Experimental.
	Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"`
	// The platform capabilities required by the job definition.
	// Experimental.
	PlatformCapabilities *[]PlatformCapabilities `field:"optional" json:"platformCapabilities" yaml:"platformCapabilities"`
	// The number of times to move a job to the RUNNABLE status.
	//
	// You may specify between 1 and
	// 10 attempts. If the value of attempts is greater than one, the job is retried on failure
	// the same number of attempts as the value.
	// Experimental.
	RetryAttempts *float64 `field:"optional" json:"retryAttempts" yaml:"retryAttempts"`
	// The timeout configuration for jobs that are submitted with this job definition.
	//
	// You can specify
	// a timeout duration after which AWS Batch terminates your jobs if they have not finished.
	// Experimental.
	Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"`
}

Construction properties of the {@link JobDefinition} construct.

Example:

import ssm "github.com/aws/aws-cdk-go/awscdk"

batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
	container: &jobDefinitionContainer{
		image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
		logConfiguration: &logConfiguration{
			logDriver: batch.logDriver_AWSLOGS,
			options: map[string]*string{
				"awslogs-region": jsii.String("us-east-1"),
			},
			secretOptions: []exposedSecret{
				batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
			},
		},
	},
})

Experimental.

type JobQueue

type JobQueue interface {
	awscdk.Resource
	IJobQueue
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The ARN of this batch job queue.
	// Experimental.
	JobQueueArn() *string
	// A name for the job queue.
	//
	// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
	// Experimental.
	JobQueueName() *string
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//    cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Experimental.
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	OnPrepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	OnSynthesize(session constructs.ISynthesisSession)
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	OnValidate() *[]*string
	// Perform final modifications before synthesis.
	//
	// This method can be implemented by derived constructs in order to perform
	// final changes before synthesis. prepare() will be called after child
	// constructs have been prepared.
	//
	// This is an advanced framework feature. Only use this if you
	// understand the implications.
	// Experimental.
	Prepare()
	// Allows this construct to emit artifacts into the cloud assembly during synthesis.
	//
	// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
	// as they participate in synthesizing the cloud assembly.
	// Experimental.
	Synthesize(session awscdk.ISynthesisSession)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
	// Validate the current construct.
	//
	// This method can be implemented by derived constructs in order to perform
	// validation logic. It is called on all constructs before synthesis.
	//
	// Returns: An array of validation error messages, or an empty array if the construct is valid.
	// Experimental.
	Validate() *[]*string
}

Batch Job Queue.

Defines a batch job queue to define how submitted batch jobs should be ran based on specified batch compute environments.

Example:

var sharedComputeEnvs computeEnvironment

highPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
	computeEnvironments: []jobQueueComputeEnvironment{
		&jobQueueComputeEnvironment{
			computeEnvironment: sharedComputeEnvs,
			order: jsii.Number(1),
		},
	},
	priority: jsii.Number(2),
})

lowPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
	computeEnvironments: []*jobQueueComputeEnvironment{
		&jobQueueComputeEnvironment{
			computeEnvironment: sharedComputeEnvs,
			order: jsii.Number(1),
		},
	},
	priority: jsii.Number(1),
})

Experimental.

func NewJobQueue

func NewJobQueue(scope constructs.Construct, id *string, props *JobQueueProps) JobQueue

Experimental.

type JobQueueComputeEnvironment

type JobQueueComputeEnvironment struct {
	// The batch compute environment to use for processing submitted jobs to this queue.
	// Experimental.
	ComputeEnvironment IComputeEnvironment `field:"required" json:"computeEnvironment" yaml:"computeEnvironment"`
	// The order in which this compute environment will be selected for dynamic allocation of resources to process submitted jobs.
	// Experimental.
	Order *float64 `field:"required" json:"order" yaml:"order"`
}

Properties for mapping a compute environment to a job queue.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var computeEnvironment computeEnvironment

jobQueueComputeEnvironment := &jobQueueComputeEnvironment{
	computeEnvironment: computeEnvironment,
	order: jsii.Number(123),
}

Experimental.

type JobQueueProps

type JobQueueProps struct {
	// The set of compute environments mapped to a job queue and their order relative to each other.
	//
	// The job scheduler uses this parameter to
	// determine which compute environment should execute a given job. Compute environments must be in the VALID state before you can associate them
	// with a job queue. You can associate up to three compute environments with a job queue.
	// Experimental.
	ComputeEnvironments *[]*JobQueueComputeEnvironment `field:"required" json:"computeEnvironments" yaml:"computeEnvironments"`
	// The state of the job queue.
	//
	// If set to true, it is able to accept jobs.
	// Experimental.
	Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"`
	// A name for the job queue.
	//
	// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
	// Experimental.
	JobQueueName *string `field:"optional" json:"jobQueueName" yaml:"jobQueueName"`
	// The priority of the job queue.
	//
	// Job queues with a higher priority (or a higher integer value for the priority parameter) are evaluated first
	// when associated with the same compute environment. Priority is determined in descending order, for example, a job queue with a priority value
	// of 10 is given scheduling preference over a job queue with a priority value of 1.
	// Experimental.
	Priority *float64 `field:"optional" json:"priority" yaml:"priority"`
}

Properties of a batch job queue.

Example:

var sharedComputeEnvs computeEnvironment

highPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
	computeEnvironments: []jobQueueComputeEnvironment{
		&jobQueueComputeEnvironment{
			computeEnvironment: sharedComputeEnvs,
			order: jsii.Number(1),
		},
	},
	priority: jsii.Number(2),
})

lowPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
	computeEnvironments: []*jobQueueComputeEnvironment{
		&jobQueueComputeEnvironment{
			computeEnvironment: sharedComputeEnvs,
			order: jsii.Number(1),
		},
	},
	priority: jsii.Number(1),
})

Experimental.

type LaunchTemplateSpecification

type LaunchTemplateSpecification struct {
	// The Launch template name.
	// Experimental.
	LaunchTemplateName *string `field:"required" json:"launchTemplateName" yaml:"launchTemplateName"`
	// The launch template version to be used (optional).
	// Experimental.
	Version *string `field:"optional" json:"version" yaml:"version"`
}

Launch template property specification.

Example:

var vpc vpc
var myLaunchTemplate cfnLaunchTemplate

myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
	computeResources: &computeResources{
		launchTemplate: &launchTemplateSpecification{
			launchTemplateName: string(myLaunchTemplate.launchTemplateName),
		},
		vpc: vpc,
	},
	computeEnvironmentName: jsii.String("MyStorageCapableComputeEnvironment"),
})

Experimental.

type LogConfiguration

type LogConfiguration struct {
	// The log driver to use for the container.
	// Experimental.
	LogDriver LogDriver `field:"required" json:"logDriver" yaml:"logDriver"`
	// The configuration options to send to the log driver.
	// Experimental.
	Options interface{} `field:"optional" json:"options" yaml:"options"`
	// The secrets to pass to the log configuration as options.
	//
	// For more information, see https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data-secrets.html#secrets-logconfig
	// Experimental.
	SecretOptions *[]ExposedSecret `field:"optional" json:"secretOptions" yaml:"secretOptions"`
}

Log configuration options to send to a custom log driver for the container.

Example:

import ssm "github.com/aws/aws-cdk-go/awscdk"

batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
	container: &jobDefinitionContainer{
		image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
		logConfiguration: &logConfiguration{
			logDriver: batch.logDriver_AWSLOGS,
			options: map[string]*string{
				"awslogs-region": jsii.String("us-east-1"),
			},
			secretOptions: []exposedSecret{
				batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
			},
		},
	},
})

Experimental.

type LogDriver

type LogDriver string

The log driver to use for the container.

Example:

import ssm "github.com/aws/aws-cdk-go/awscdk"

batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
	container: &jobDefinitionContainer{
		image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
		logConfiguration: &logConfiguration{
			logDriver: batch.logDriver_AWSLOGS,
			options: map[string]*string{
				"awslogs-region": jsii.String("us-east-1"),
			},
			secretOptions: []exposedSecret{
				batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
			},
		},
	},
})

Experimental.

const (
	// Specifies the Amazon CloudWatch Logs logging driver.
	// Experimental.
	LogDriver_AWSLOGS LogDriver = "AWSLOGS"
	// Specifies the Fluentd logging driver.
	// Experimental.
	LogDriver_FLUENTD LogDriver = "FLUENTD"
	// Specifies the Graylog Extended Format (GELF) logging driver.
	// Experimental.
	LogDriver_GELF LogDriver = "GELF"
	// Specifies the journald logging driver.
	// Experimental.
	LogDriver_JOURNALD LogDriver = "JOURNALD"
	// Specifies the logentries logging driver.
	// Experimental.
	LogDriver_LOGENTRIES LogDriver = "LOGENTRIES"
	// Specifies the JSON file logging driver.
	// Experimental.
	LogDriver_JSON_FILE LogDriver = "JSON_FILE"
	// Specifies the Splunk logging driver.
	// Experimental.
	LogDriver_SPLUNK LogDriver = "SPLUNK"
	// Specifies the syslog logging driver.
	// Experimental.
	LogDriver_SYSLOG LogDriver = "SYSLOG"
)

type PlatformCapabilities

type PlatformCapabilities string

Platform capabilities. Experimental.

const (
	// Specifies EC2 environment.
	// Experimental.
	PlatformCapabilities_EC2 PlatformCapabilities = "EC2"
	// Specifies Fargate environment.
	// Experimental.
	PlatformCapabilities_FARGATE PlatformCapabilities = "FARGATE"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL