awsecs

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: 24 Imported by: 6

README

Amazon ECS Construct Library

This package contains constructs for working with Amazon Elastic Container Service (Amazon ECS).

Amazon Elastic Container Service (Amazon ECS) is a fully managed container orchestration service.

For further information on Amazon ECS, see the Amazon ECS documentation

The following example creates an Amazon ECS cluster, adds capacity to it, and runs a service on it:

var vpc vpc


// Create an ECS cluster
cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
})

// Add capacity to it
cluster.addCapacity(jsii.String("DefaultAutoScalingGroupCapacity"), &addCapacityOptions{
	instanceType: ec2.NewInstanceType(jsii.String("t2.xlarge")),
	desiredCapacity: jsii.Number(3),
})

taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))

taskDefinition.addContainer(jsii.String("DefaultContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(512),
})

// Instantiate an Amazon ECS Service
ecsService := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

For a set of constructs defining common ECS architectural patterns, see the @aws-cdk/aws-ecs-patterns package.

Launch Types: AWS Fargate vs Amazon EC2

There are two sets of constructs in this library; one to run tasks on Amazon EC2 and one to run tasks on AWS Fargate.

  • Use the Ec2TaskDefinition and Ec2Service constructs to run tasks on Amazon EC2 instances running in your account.
  • Use the FargateTaskDefinition and FargateService constructs to run tasks on instances that are managed for you by AWS.
  • Use the ExternalTaskDefinition and ExternalService constructs to run AWS ECS Anywhere tasks on self-managed infrastructure.

Here are the main differences:

  • Amazon EC2: instances are under your control. Complete control of task to host allocation. Required to specify at least a memory reservation or limit for every container. Can use Host, Bridge and AwsVpc networking modes. Can attach Classic Load Balancer. Can share volumes between container and host.
  • AWS Fargate: tasks run on AWS-managed instances, AWS manages task to host allocation for you. Requires specification of memory and cpu sizes at the taskdefinition level. Only supports AwsVpc networking modes and Application/Network Load Balancers. Only the AWS log driver is supported. Many host features are not supported such as adding kernel capabilities and mounting host devices/volumes inside the container.
  • AWS ECSAnywhere: tasks are run and managed by AWS ECS Anywhere on infrastructure owned by the customer. Only Bridge networking mode is supported. Does not support autoscaling, load balancing, cloudmap or attachment of volumes.

For more information on Amazon EC2 vs AWS Fargate, networking and ECS Anywhere see the AWS Documentation: AWS Fargate, Task Networking, ECS Anywhere

Clusters

A Cluster defines the infrastructure to run your tasks on. You can run many tasks on a single cluster.

The following code creates a cluster that can run AWS Fargate tasks:

var vpc vpc


cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
})

The following code imports an existing cluster using the ARN which can be used to import an Amazon ECS service either EC2 or Fargate.

clusterArn := "arn:aws:ecs:us-east-1:012345678910:cluster/clusterName"

cluster := ecs.cluster.fromClusterArn(this, jsii.String("Cluster"), clusterArn)

To use tasks with Amazon EC2 launch-type, you have to add capacity to the cluster in order for tasks to be scheduled on your instances. Typically, you add an AutoScalingGroup with instances running the latest Amazon ECS-optimized AMI to the cluster. There is a method to build and add such an AutoScalingGroup automatically, or you can supply a customized AutoScalingGroup that you construct yourself. It's possible to add multiple AutoScalingGroups with various instance types.

The following example creates an Amazon ECS cluster and adds capacity to it:

var vpc vpc


cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
})

// Either add default capacity
cluster.addCapacity(jsii.String("DefaultAutoScalingGroupCapacity"), &addCapacityOptions{
	instanceType: ec2.NewInstanceType(jsii.String("t2.xlarge")),
	desiredCapacity: jsii.Number(3),
})

// Or add customized capacity. Be sure to start the Amazon ECS-optimized AMI.
autoScalingGroup := autoscaling.NewAutoScalingGroup(this, jsii.String("ASG"), &autoScalingGroupProps{
	vpc: vpc,
	instanceType: ec2.NewInstanceType(jsii.String("t2.xlarge")),
	machineImage: ecs.ecsOptimizedImage.amazonLinux(),
	// Or use Amazon ECS-Optimized Amazon Linux 2 AMI
	// machineImage: EcsOptimizedImage.amazonLinux2(),
	desiredCapacity: jsii.Number(3),
})

capacityProvider := ecs.NewAsgCapacityProvider(this, jsii.String("AsgCapacityProvider"), &asgCapacityProviderProps{
	autoScalingGroup: autoScalingGroup,
})
cluster.addAsgCapacityProvider(capacityProvider)

If you omit the property vpc, the construct will create a new VPC with two AZs.

By default, all machine images will auto-update to the latest version on each deployment, causing a replacement of the instances in your AutoScalingGroup if the AMI has been updated since the last deployment.

If task draining is enabled, ECS will transparently reschedule tasks on to the new instances before terminating your old instances. If you have disabled task draining, the tasks will be terminated along with the instance. To prevent that, you can pick a non-updating AMI by passing cacheInContext: true, but be sure to periodically update to the latest AMI manually by using the CDK CLI context management commands:

var vpc vpc

autoScalingGroup := autoscaling.NewAutoScalingGroup(this, jsii.String("ASG"), &autoScalingGroupProps{
	machineImage: ecs.ecsOptimizedImage.amazonLinux(&ecsOptimizedImageOptions{
		cachedInContext: jsii.Boolean(true),
	}),
	vpc: vpc,
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
})
Bottlerocket

Bottlerocket is a Linux-based open source operating system that is purpose-built by AWS for running containers. You can launch Amazon ECS container instances with the Bottlerocket AMI.

The following example will create a capacity with self-managed Amazon EC2 capacity of 2 c5.large Linux instances running with Bottlerocket AMI.

The following example adds Bottlerocket capacity to the cluster:

var cluster cluster


cluster.addCapacity(jsii.String("bottlerocket-asg"), &addCapacityOptions{
	minCapacity: jsii.Number(2),
	instanceType: ec2.NewInstanceType(jsii.String("c5.large")),
	machineImage: ecs.NewBottleRocketImage(),
})
ARM64 (Graviton) Instances

To launch instances with ARM64 hardware, you can use the Amazon ECS-optimized Amazon Linux 2 (arm64) AMI. Based on Amazon Linux 2, this AMI is recommended for use when launching your EC2 instances that are powered by Arm-based AWS Graviton Processors.

var cluster cluster


cluster.addCapacity(jsii.String("graviton-cluster"), &addCapacityOptions{
	minCapacity: jsii.Number(2),
	instanceType: ec2.NewInstanceType(jsii.String("c6g.large")),
	machineImage: ecs.ecsOptimizedImage.amazonLinux2(ecs.amiHardwareType_ARM),
})

Bottlerocket is also supported:

var cluster cluster


cluster.addCapacity(jsii.String("graviton-cluster"), &addCapacityOptions{
	minCapacity: jsii.Number(2),
	instanceType: ec2.NewInstanceType(jsii.String("c6g.large")),
	machineImageType: ecs.machineImageType_BOTTLEROCKET,
})
Spot Instances

To add spot instances into the cluster, you must specify the spotPrice in the ecs.AddCapacityOptions and optionally enable the spotInstanceDraining property.

var cluster cluster


// Add an AutoScalingGroup with spot instances to the existing cluster
cluster.addCapacity(jsii.String("AsgSpot"), &addCapacityOptions{
	maxCapacity: jsii.Number(2),
	minCapacity: jsii.Number(2),
	desiredCapacity: jsii.Number(2),
	instanceType: ec2.NewInstanceType(jsii.String("c5.xlarge")),
	spotPrice: jsii.String("0.0735"),
	// Enable the Automated Spot Draining support for Amazon ECS
	spotInstanceDraining: jsii.Boolean(true),
})
SNS Topic Encryption

When the ecs.AddCapacityOptions that you provide has a non-zero taskDrainTime (the default) then an SNS topic and Lambda are created to ensure that the cluster's instances have been properly drained of tasks before terminating. The SNS Topic is sent the instance-terminating lifecycle event from the AutoScalingGroup, and the Lambda acts on that event. If you wish to engage server-side encryption for this SNS Topic then you may do so by providing a KMS key for the topicEncryptionKey property of ecs.AddCapacityOptions.

// Given
var cluster cluster
var key key

// Then, use that key to encrypt the lifecycle-event SNS Topic.
cluster.addCapacity(jsii.String("ASGEncryptedSNS"), &addCapacityOptions{
	instanceType: ec2.NewInstanceType(jsii.String("t2.xlarge")),
	desiredCapacity: jsii.Number(3),
	topicEncryptionKey: key,
})

Task definitions

A task definition describes what a single copy of a task should look like. A task definition has one or more containers; typically, it has one main container (the default container is the first one that's added to the task definition, and it is marked essential) and optionally some supporting containers which are used to support the main container, doings things like upload logs or metrics to monitoring services.

To run a task or service with Amazon EC2 launch type, use the Ec2TaskDefinition. For AWS Fargate tasks/services, use the FargateTaskDefinition. For AWS ECS Anywhere use the ExternalTaskDefinition. These classes provide simplified APIs that only contain properties relevant for each specific launch type.

For a FargateTaskDefinition, specify the task size (memoryLimitMiB and cpu):

fargateTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	memoryLimitMiB: jsii.Number(512),
	cpu: jsii.Number(256),
})

On Fargate Platform Version 1.4.0 or later, you may specify up to 200GiB of ephemeral storage:

fargateTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	memoryLimitMiB: jsii.Number(512),
	cpu: jsii.Number(256),
	ephemeralStorageGiB: jsii.Number(100),
})

To add containers to a task definition, call addContainer():

fargateTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	memoryLimitMiB: jsii.Number(512),
	cpu: jsii.Number(256),
})
container := fargateTaskDefinition.addContainer(jsii.String("WebContainer"), &containerDefinitionOptions{
	// Use an image from DockerHub
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
})

For a Ec2TaskDefinition:

ec2TaskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"), &ec2TaskDefinitionProps{
	networkMode: ecs.networkMode_BRIDGE,
})

container := ec2TaskDefinition.addContainer(jsii.String("WebContainer"), &containerDefinitionOptions{
	// Use an image from DockerHub
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
})

For an ExternalTaskDefinition:

externalTaskDefinition := ecs.NewExternalTaskDefinition(this, jsii.String("TaskDef"))

container := externalTaskDefinition.addContainer(jsii.String("WebContainer"), &containerDefinitionOptions{
	// Use an image from DockerHub
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
})

You can specify container properties when you add them to the task definition, or with various methods, e.g.:

To add a port mapping when adding a container to the task definition, specify the portMappings option:

var taskDefinition taskDefinition


taskDefinition.addContainer(jsii.String("WebContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(3000),
		},
	},
})

To add port mappings directly to a container definition, call addPortMappings():

var container containerDefinition


container.addPortMappings(&portMapping{
	containerPort: jsii.Number(3000),
})

To add data volumes to a task definition, call addVolume():

fargateTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	memoryLimitMiB: jsii.Number(512),
	cpu: jsii.Number(256),
})
volume := map[string]interface{}{
	// Use an Elastic FileSystem
	"name": jsii.String("mydatavolume"),
	"efsVolumeConfiguration": map[string]*string{
		"fileSystemId": jsii.String("EFS"),
	},
}

container := fargateTaskDefinition.addVolume(volume)

Note: ECS Anywhere doesn't support volume attachments in the task definition.

To use a TaskDefinition that can be used with either Amazon EC2 or AWS Fargate launch types, use the TaskDefinition construct.

When creating a task definition you have to specify what kind of tasks you intend to run: Amazon EC2, AWS Fargate, or both. The following example uses both:

taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TaskDef"), &taskDefinitionProps{
	memoryMiB: jsii.String("512"),
	cpu: jsii.String("256"),
	networkMode: ecs.networkMode_AWS_VPC,
	compatibility: ecs.compatibility_EC2_AND_FARGATE,
})
Images

Images supply the software that runs inside the container. Images can be obtained from either DockerHub or from ECR repositories, built directly from a local Dockerfile, or use an existing tarball.

  • ecs.ContainerImage.fromRegistry(imageName): use a public image.
  • ecs.ContainerImage.fromRegistry(imageName, { credentials: mySecret }): use a private image that requires credentials.
  • ecs.ContainerImage.fromEcrRepository(repo, tagOrDigest): use the given ECR repository as the image to start. If no tag or digest is provided, "latest" is assumed.
  • ecs.ContainerImage.fromAsset('./image'): build and upload an image directly from a Dockerfile in your source directory.
  • ecs.ContainerImage.fromDockerImageAsset(asset): uses an existing @aws-cdk/aws-ecr-assets.DockerImageAsset as a container image.
  • ecs.ContainerImage.fromTarball(file): use an existing tarball.
  • new ecs.TagParameterContainerImage(repository): use the given ECR repository as the image but a CloudFormation parameter as the tag.
Environment variables

To pass environment variables to the container, you can use the environment, environmentFiles, and secrets props.

var secret secret
var dbSecret secret
var parameter stringParameter
var taskDefinition taskDefinition
var s3Bucket bucket


newContainer := taskDefinition.addContainer(jsii.String("container"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
	environment: map[string]*string{
		 // clear text, not for sensitive data
		"STAGE": jsii.String("prod"),
	},
	environmentFiles: []environmentFile{
		ecs.*environmentFile.fromAsset(jsii.String("./demo-env-file.env")),
		ecs.*environmentFile.fromBucket(s3Bucket, jsii.String("assets/demo-env-file.env")),
	},
	secrets: map[string]secret{
		 // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store at container start-up.
		"SECRET": ecs.*secret.fromSecretsManager(secret),
		"DB_PASSWORD": ecs.*secret.fromSecretsManager(dbSecret, jsii.String("password")),
		 // Reference a specific JSON field, (requires platform version 1.4.0 or later for Fargate tasks)
		"API_KEY": ecs.*secret.fromSecretsManagerVersion(secret, &SecretVersionInfo{
			"versionId": jsii.String("12345"),
		}, jsii.String("apiKey")),
		 // Reference a specific version of the secret by its version id or version stage (requires platform version 1.4.0 or later for Fargate tasks)
		"PARAMETER": ecs.*secret.fromSsmParameter(parameter),
	},
})
newContainer.addEnvironment(jsii.String("QUEUE_NAME"), jsii.String("MyQueue"))

The task execution role is automatically granted read permissions on the secrets/parameters. Support for environment files is restricted to the EC2 launch type for files hosted on S3. Further details provided in the AWS documentation about specifying environment variables.

System controls

To set system controls (kernel parameters) on the container, use the systemControls prop:

var taskDefinition taskDefinition


taskDefinition.addContainer(jsii.String("container"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
	systemControls: []systemControl{
		&systemControl{
			namespace: jsii.String("net"),
			value: jsii.String("ipv4.tcp_tw_recycle"),
		},
	},
})
Using Windows containers on Fargate

AWS Fargate supports Amazon ECS Windows containers. For more details, please see this blog post

// Create a Task Definition for the Windows container to start
taskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	runtimePlatform: &runtimePlatform{
		operatingSystemFamily: ecs.operatingSystemFamily_WINDOWS_SERVER_2019_CORE(),
		cpuArchitecture: ecs.cpuArchitecture_X86_64(),
	},
	cpu: jsii.Number(1024),
	memoryLimitMiB: jsii.Number(2048),
})

taskDefinition.addContainer(jsii.String("windowsservercore"), &containerDefinitionOptions{
	logging: ecs.logDriver.awsLogs(&awsLogDriverProps{
		streamPrefix: jsii.String("win-iis-on-fargate"),
	}),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(80),
		},
	},
	image: ecs.containerImage.fromRegistry(jsii.String("mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019")),
})
Using Graviton2 with Fargate

AWS Graviton2 supports AWS Fargate. For more details, please see this blog post

// Create a Task Definition for running container on Graviton Runtime.
taskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	runtimePlatform: &runtimePlatform{
		operatingSystemFamily: ecs.operatingSystemFamily_LINUX(),
		cpuArchitecture: ecs.cpuArchitecture_ARM64(),
	},
	cpu: jsii.Number(1024),
	memoryLimitMiB: jsii.Number(2048),
})

taskDefinition.addContainer(jsii.String("webarm64"), &containerDefinitionOptions{
	logging: ecs.logDriver.awsLogs(&awsLogDriverProps{
		streamPrefix: jsii.String("graviton2-on-fargate"),
	}),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(80),
		},
	},
	image: ecs.containerImage.fromRegistry(jsii.String("public.ecr.aws/nginx/nginx:latest-arm64v8")),
})

Service

A Service instantiates a TaskDefinition on a Cluster a given number of times, optionally associating them with a load balancer. If a task fails, Amazon ECS automatically restarts the task.

var cluster cluster
var taskDefinition taskDefinition


service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	desiredCount: jsii.Number(5),
})

ECS Anywhere service definition looks like:

var cluster cluster
var taskDefinition taskDefinition


service := ecs.NewExternalService(this, jsii.String("Service"), &externalServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	desiredCount: jsii.Number(5),
})

Services by default will create a security group if not provided. If you'd like to specify which security groups to use you can override the securityGroups property.

Deployment circuit breaker and rollback

Amazon ECS deployment circuit breaker automatically rolls back unhealthy service deployments without the need for manual intervention. Use circuitBreaker to enable deployment circuit breaker and optionally enable rollback for automatic rollback. See Using the deployment circuit breaker for more details.

var cluster cluster
var taskDefinition taskDefinition

service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	circuitBreaker: &deploymentCircuitBreaker{
		rollback: jsii.Boolean(true),
	},
})

Note: ECS Anywhere doesn't support deployment circuit breakers and rollback.

Include an application/network load balancer

Services are load balancing targets and can be added to a target group, which will be attached to an application/network load balancers:

var vpc vpc
var cluster cluster
var taskDefinition taskDefinition

service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elbv2.NewApplicationLoadBalancer(this, jsii.String("LB"), &applicationLoadBalancerProps{
	vpc: vpc,
	internetFacing: jsii.Boolean(true),
})
listener := lb.addListener(jsii.String("Listener"), &baseApplicationListenerProps{
	port: jsii.Number(80),
})
targetGroup1 := listener.addTargets(jsii.String("ECS1"), &addApplicationTargetsProps{
	port: jsii.Number(80),
	targets: []iApplicationLoadBalancerTarget{
		service,
	},
})
targetGroup2 := listener.addTargets(jsii.String("ECS2"), &addApplicationTargetsProps{
	port: jsii.Number(80),
	targets: []*iApplicationLoadBalancerTarget{
		service.loadBalancerTarget(&loadBalancerTargetOptions{
			containerName: jsii.String("MyContainer"),
			containerPort: jsii.Number(8080),
		}),
	},
})

Note: ECS Anywhere doesn't support application/network load balancers.

Note that in the example above, the default service only allows you to register the first essential container or the first mapped port on the container as a target and add it to a new target group. To have more control over which container and port to register as targets, you can use service.loadBalancerTarget() to return a load balancing target for a specific container and port.

Alternatively, you can also create all load balancer targets to be registered in this service, add them to target groups, and attach target groups to listeners accordingly.

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elbv2.NewApplicationLoadBalancer(this, jsii.String("LB"), &applicationLoadBalancerProps{
	vpc: vpc,
	internetFacing: jsii.Boolean(true),
})
listener := lb.addListener(jsii.String("Listener"), &baseApplicationListenerProps{
	port: jsii.Number(80),
})
service.registerLoadBalancerTargets(&ecsTarget{
	containerName: jsii.String("web"),
	containerPort: jsii.Number(80),
	newTargetGroupId: jsii.String("ECS"),
	listener: ecs.listenerConfig.applicationListener(listener, &addApplicationTargetsProps{
		protocol: elbv2.applicationProtocol_HTTPS,
	}),
})
Using a Load Balancer from a different Stack

If you want to put your Load Balancer and the Service it is load balancing to in different stacks, you may not be able to use the convenience methods loadBalancer.addListener() and listener.addTargets().

The reason is that these methods will create resources in the same Stack as the object they're called on, which may lead to cyclic references between stacks. Instead, you will have to create an ApplicationListener in the service stack, or an empty TargetGroup in the load balancer stack that you attach your service to.

See the ecs/cross-stack-load-balancer example for the alternatives.

Include a classic load balancer

Services can also be directly attached to a classic load balancer as targets:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elb.NewLoadBalancer(this, jsii.String("LB"), &loadBalancerProps{
	vpc: vpc,
})
lb.addListener(&loadBalancerListener{
	externalPort: jsii.Number(80),
})
lb.addTarget(service)

Similarly, if you want to have more control over load balancer targeting:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elb.NewLoadBalancer(this, jsii.String("LB"), &loadBalancerProps{
	vpc: vpc,
})
lb.addListener(&loadBalancerListener{
	externalPort: jsii.Number(80),
})
lb.addTarget(service.loadBalancerTarget(&loadBalancerTargetOptions{
	containerName: jsii.String("MyContainer"),
	containerPort: jsii.Number(80),
}))

There are two higher-level constructs available which include a load balancer for you that can be found in the aws-ecs-patterns module:

  • LoadBalancedFargateService
  • LoadBalancedEc2Service

Task Auto-Scaling

You can configure the task count of a service to match demand. Task auto-scaling is configured by calling autoScaleTaskCount():

var target applicationTargetGroup
var service baseService

scaling := service.autoScaleTaskCount(&enableScalingProps{
	maxCapacity: jsii.Number(10),
})
scaling.scaleOnCpuUtilization(jsii.String("CpuScaling"), &cpuUtilizationScalingProps{
	targetUtilizationPercent: jsii.Number(50),
})

scaling.scaleOnRequestCount(jsii.String("RequestScaling"), &requestCountScalingProps{
	requestsPerTarget: jsii.Number(10000),
	targetGroup: target,
})

Task auto-scaling is powered by Application Auto-Scaling. See that section for details.

Integration with CloudWatch Events

To start an Amazon ECS task on an Amazon EC2-backed Cluster, instantiate an @aws-cdk/aws-events-targets.EcsTask instead of an Ec2Service:

var cluster cluster

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromAsset(path.resolve(__dirname, jsii.String(".."), jsii.String("eventhandler-image"))),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.NewAwsLogDriver(&awsLogDriverProps{
		streamPrefix: jsii.String("EventDemo"),
		mode: ecs.awsLogDriverMode_NON_BLOCKING,
	}),
})

// An Rule that describes the event trigger (in this case a scheduled run)
rule := events.NewRule(this, jsii.String("Rule"), &ruleProps{
	schedule: events.schedule.expression(jsii.String("rate(1 min)")),
})

// Pass an environment variable to the container 'TheContainer' in the task
rule.addTarget(targets.NewEcsTask(&ecsTaskProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	taskCount: jsii.Number(1),
	containerOverrides: []containerOverride{
		&containerOverride{
			containerName: jsii.String("TheContainer"),
			environment: []taskEnvironmentVariable{
				&taskEnvironmentVariable{
					name: jsii.String("I_WAS_TRIGGERED"),
					value: jsii.String("From CloudWatch Events"),
				},
			},
		},
	},
}))

Log Drivers

Currently Supported Log Drivers:

  • awslogs
  • fluentd
  • gelf
  • journald
  • json-file
  • splunk
  • syslog
  • awsfirelens
  • Generic
awslogs Log Driver
// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.awsLogs(&awsLogDriverProps{
		streamPrefix: jsii.String("EventDemo"),
	}),
})
fluentd Log Driver
// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.fluentd(),
})
gelf Log Driver
// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.gelf(&gelfLogDriverProps{
		address: jsii.String("my-gelf-address"),
	}),
})
journald Log Driver
// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.journald(),
})
json-file Log Driver
// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.jsonFile(),
})
splunk Log Driver
// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.splunk(&splunkLogDriverProps{
		token: awscdk.SecretValue.secretsManager(jsii.String("my-splunk-token")),
		url: jsii.String("my-splunk-url"),
	}),
})
syslog Log Driver
// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.syslog(),
})
firelens Log Driver
// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.firelens(&fireLensLogDriverProps{
		options: map[string]*string{
			"Name": jsii.String("firehose"),
			"region": jsii.String("us-west-2"),
			"delivery_stream": jsii.String("my-stream"),
		},
	}),
})

To pass secrets to the log configuration, use the secretOptions property of the log configuration. The task execution role is automatically granted read permissions on the secrets/parameters.

var secret secret
var parameter stringParameter


taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.firelens(&fireLensLogDriverProps{
		options: map[string]interface{}{
		},
		secretOptions: map[string]secret{
			 // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store
			"apikey": ecs.*secret.fromSecretsManager(secret),
			"host": ecs.*secret.fromSsmParameter(parameter),
		},
	}),
})
Generic Log Driver

A generic log driver object exists to provide a lower level abstraction of the log driver configuration.

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.NewGenericLogDriver(&genericLogDriverProps{
		logDriver: jsii.String("fluentd"),
		options: map[string]*string{
			"tag": jsii.String("example-tag"),
		},
	}),
})

CloudMap Service Discovery

To register your ECS service with a CloudMap Service Registry, you may add the cloudMapOptions property to your service:

var taskDefinition taskDefinition
var cluster cluster


service := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	cloudMapOptions: &cloudMapOptions{
		// Create A records - useful for AWSVPC network mode.
		dnsRecordType: cloudmap.dnsRecordType_A,
	},
})

With bridge or host network modes, only SRV DNS record types are supported. By default, SRV DNS record types will target the default container and default port. However, you may target a different container and port on the same ECS task:

var taskDefinition taskDefinition
var cluster cluster


// Add a container to the task definition
specificContainer := taskDefinition.addContainer(jsii.String("Container"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("/aws/aws-example-app")),
	memoryLimitMiB: jsii.Number(2048),
})

// Add a port mapping
specificContainer.addPortMappings(&portMapping{
	containerPort: jsii.Number(7600),
	protocol: ecs.protocol_TCP,
})

ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	cloudMapOptions: &cloudMapOptions{
		// Create SRV records - useful for bridge networking
		dnsRecordType: cloudmap.dnsRecordType_SRV,
		// Targets port TCP port 7600 `specificContainer`
		container: specificContainer,
		containerPort: jsii.Number(7600),
	},
})
Associate With a Specific CloudMap Service

You may associate an ECS service with a specific CloudMap service. To do this, use the service's associateCloudMapService method:

var cloudMapService service
var ecsService fargateService


ecsService.associateCloudMapService(&associateCloudMapServiceOptions{
	service: cloudMapService,
})

Capacity Providers

There are two major families of Capacity Providers: AWS Fargate (including Fargate Spot) and EC2 Auto Scaling Group Capacity Providers. Both are supported.

Fargate Capacity Providers

To enable Fargate capacity providers, you can either set enableFargateCapacityProviders to true when creating your cluster, or by invoking the enableFargateCapacityProviders() method after creating your cluster. This will add both FARGATE and FARGATE_SPOT as available capacity providers on your cluster.

var vpc vpc


cluster := ecs.NewCluster(this, jsii.String("FargateCPCluster"), &clusterProps{
	vpc: vpc,
	enableFargateCapacityProviders: jsii.Boolean(true),
})

taskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"))

taskDefinition.addContainer(jsii.String("web"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
})

ecs.NewFargateService(this, jsii.String("FargateService"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	capacityProviderStrategies: []capacityProviderStrategy{
		&capacityProviderStrategy{
			capacityProvider: jsii.String("FARGATE_SPOT"),
			weight: jsii.Number(2),
		},
		&capacityProviderStrategy{
			capacityProvider: jsii.String("FARGATE"),
			weight: jsii.Number(1),
		},
	},
})
Auto Scaling Group Capacity Providers

To add an Auto Scaling Group Capacity Provider, first create an EC2 Auto Scaling Group. Then, create an AsgCapacityProvider and pass the Auto Scaling Group to it in the constructor. Then add the Capacity Provider to the cluster. Finally, you can refer to the Provider by its name in your service's or task's Capacity Provider strategy.

By default, an Auto Scaling Group Capacity Provider will manage the Auto Scaling Group's size for you. It will also enable managed termination protection, in order to prevent EC2 Auto Scaling from terminating EC2 instances that have tasks running on them. If you want to disable this behavior, set both enableManagedScaling to and enableManagedTerminationProtection to false.

var vpc vpc


cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
})

autoScalingGroup := autoscaling.NewAutoScalingGroup(this, jsii.String("ASG"), &autoScalingGroupProps{
	vpc: vpc,
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
	machineImage: ecs.ecsOptimizedImage.amazonLinux2(),
	minCapacity: jsii.Number(0),
	maxCapacity: jsii.Number(100),
})

capacityProvider := ecs.NewAsgCapacityProvider(this, jsii.String("AsgCapacityProvider"), &asgCapacityProviderProps{
	autoScalingGroup: autoScalingGroup,
})
cluster.addAsgCapacityProvider(capacityProvider)

taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))

taskDefinition.addContainer(jsii.String("web"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryReservationMiB: jsii.Number(256),
})

ecs.NewEc2Service(this, jsii.String("EC2Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	capacityProviderStrategies: []capacityProviderStrategy{
		&capacityProviderStrategy{
			capacityProvider: capacityProvider.capacityProviderName,
			weight: jsii.Number(1),
		},
	},
})

Elastic Inference Accelerators

Currently, this feature is only supported for services with EC2 launch types.

To add elastic inference accelerators to your EC2 instance, first add inferenceAccelerators field to the Ec2TaskDefinition and set the deviceName and deviceType properties.

inferenceAccelerators := []map[string]*string{
	map[string]*string{
		"deviceName": jsii.String("device1"),
		"deviceType": jsii.String("eia2.medium"),
	},
}

taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("Ec2TaskDef"), &ec2TaskDefinitionProps{
	inferenceAccelerators: inferenceAccelerators,
})

To enable using the inference accelerators in the containers, add inferenceAcceleratorResources field and set it to a list of device names used for the inference accelerators. Each value in the list should match a DeviceName for an InferenceAccelerator specified in the task definition.

var taskDefinition taskDefinition

inferenceAcceleratorResources := []*string{
	"device1",
}

taskDefinition.addContainer(jsii.String("cont"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("test")),
	memoryLimitMiB: jsii.Number(1024),
	inferenceAcceleratorResources: inferenceAcceleratorResources,
})

ECS Exec command

Please note, ECS Exec leverages AWS Systems Manager (SSM). So as a prerequisite for the exec command to work, you need to have the SSM plugin for the AWS CLI installed locally. For more information, see Install Session Manager plugin for AWS CLI.

To enable the ECS Exec feature for your containers, set the boolean flag enableExecuteCommand to true in your Ec2Service or FargateService.

var cluster cluster
var taskDefinition taskDefinition


service := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	enableExecuteCommand: jsii.Boolean(true),
})
Enabling logging

You can enable sending logs of your execute session commands to a CloudWatch log group or S3 bucket by configuring the executeCommandConfiguration property for your cluster. The default configuration will send the logs to the CloudWatch Logs using the awslogs log driver that is configured in your task definition. Please note, when using your own logConfiguration the log group or S3 Bucket specified must already be created.

To encrypt data using your own KMS Customer Key (CMK), you must create a CMK and provide the key in the kmsKey field of the executeCommandConfiguration. To use this key for encrypting CloudWatch log data or S3 bucket, make sure to associate the key to these resources on creation.

var vpc vpc

kmsKey := kms.NewKey(this, jsii.String("KmsKey"))

// Pass the KMS key in the `encryptionKey` field to associate the key to the log group
logGroup := logs.NewLogGroup(this, jsii.String("LogGroup"), &logGroupProps{
	encryptionKey: kmsKey,
})

// Pass the KMS key in the `encryptionKey` field to associate the key to the S3 bucket
execBucket := s3.NewBucket(this, jsii.String("EcsExecBucket"), &bucketProps{
	encryptionKey: kmsKey,
})

cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
	executeCommandConfiguration: &executeCommandConfiguration{
		kmsKey: kmsKey,
		logConfiguration: &executeCommandLogConfiguration{
			cloudWatchLogGroup: logGroup,
			cloudWatchEncryptionEnabled: jsii.Boolean(true),
			s3Bucket: execBucket,
			s3EncryptionEnabled: jsii.Boolean(true),
			s3KeyPrefix: jsii.String("exec-command-output"),
		},
		logging: ecs.executeCommandLogging_OVERRIDE,
	},
})

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsgCapacityProvider_IsConstruct

func AsgCapacityProvider_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func BaseService_IsConstruct

func BaseService_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func BaseService_IsResource

func BaseService_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func BuiltInAttributes_AMI_ID

func BuiltInAttributes_AMI_ID() *string

func BuiltInAttributes_AVAILABILITY_ZONE

func BuiltInAttributes_AVAILABILITY_ZONE() *string

func BuiltInAttributes_INSTANCE_ID

func BuiltInAttributes_INSTANCE_ID() *string

func BuiltInAttributes_INSTANCE_TYPE

func BuiltInAttributes_INSTANCE_TYPE() *string

func BuiltInAttributes_OS_TYPE

func BuiltInAttributes_OS_TYPE() *string

func CfnCapacityProvider_CFN_RESOURCE_TYPE_NAME

func CfnCapacityProvider_CFN_RESOURCE_TYPE_NAME() *string

func CfnCapacityProvider_IsCfnElement

func CfnCapacityProvider_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 CfnCapacityProvider_IsCfnResource

func CfnCapacityProvider_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnCapacityProvider_IsConstruct

func CfnCapacityProvider_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnClusterCapacityProviderAssociations_CFN_RESOURCE_TYPE_NAME

func CfnClusterCapacityProviderAssociations_CFN_RESOURCE_TYPE_NAME() *string

func CfnClusterCapacityProviderAssociations_IsCfnElement

func CfnClusterCapacityProviderAssociations_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 CfnClusterCapacityProviderAssociations_IsCfnResource

func CfnClusterCapacityProviderAssociations_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnClusterCapacityProviderAssociations_IsConstruct

func CfnClusterCapacityProviderAssociations_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnCluster_CFN_RESOURCE_TYPE_NAME

func CfnCluster_CFN_RESOURCE_TYPE_NAME() *string

func CfnCluster_IsCfnElement

func CfnCluster_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 CfnCluster_IsCfnResource

func CfnCluster_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnCluster_IsConstruct

func CfnCluster_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnPrimaryTaskSet_CFN_RESOURCE_TYPE_NAME

func CfnPrimaryTaskSet_CFN_RESOURCE_TYPE_NAME() *string

func CfnPrimaryTaskSet_IsCfnElement

func CfnPrimaryTaskSet_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 CfnPrimaryTaskSet_IsCfnResource

func CfnPrimaryTaskSet_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnPrimaryTaskSet_IsConstruct

func CfnPrimaryTaskSet_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnService_CFN_RESOURCE_TYPE_NAME

func CfnService_CFN_RESOURCE_TYPE_NAME() *string

func CfnService_IsCfnElement

func CfnService_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 CfnService_IsCfnResource

func CfnService_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnService_IsConstruct

func CfnService_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnTaskDefinition_CFN_RESOURCE_TYPE_NAME

func CfnTaskDefinition_CFN_RESOURCE_TYPE_NAME() *string

func CfnTaskDefinition_IsCfnElement

func CfnTaskDefinition_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 CfnTaskDefinition_IsCfnResource

func CfnTaskDefinition_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnTaskDefinition_IsConstruct

func CfnTaskDefinition_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnTaskSet_CFN_RESOURCE_TYPE_NAME

func CfnTaskSet_CFN_RESOURCE_TYPE_NAME() *string

func CfnTaskSet_IsCfnElement

func CfnTaskSet_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 CfnTaskSet_IsCfnResource

func CfnTaskSet_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnTaskSet_IsConstruct

func CfnTaskSet_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Cluster_IsConstruct

func Cluster_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Cluster_IsResource

func Cluster_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func ContainerDefinition_IsConstruct

func ContainerDefinition_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Ec2Service_IsConstruct

func Ec2Service_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Ec2Service_IsResource

func Ec2Service_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Ec2TaskDefinition_IsConstruct

func Ec2TaskDefinition_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Ec2TaskDefinition_IsResource

func Ec2TaskDefinition_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func ExternalService_IsConstruct

func ExternalService_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func ExternalService_IsResource

func ExternalService_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func ExternalTaskDefinition_IsConstruct

func ExternalTaskDefinition_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func ExternalTaskDefinition_IsResource

func ExternalTaskDefinition_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func FargateService_IsConstruct

func FargateService_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func FargateService_IsResource

func FargateService_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func FargateTaskDefinition_IsConstruct

func FargateTaskDefinition_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func FargateTaskDefinition_IsResource

func FargateTaskDefinition_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func FirelensLogRouter_IsConstruct

func FirelensLogRouter_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func LinuxParameters_IsConstruct

func LinuxParameters_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func NewAppMeshProxyConfiguration_Override

func NewAppMeshProxyConfiguration_Override(a AppMeshProxyConfiguration, props *AppMeshProxyConfigurationConfigProps)

Constructs a new instance of the AppMeshProxyConfiguration class. Experimental.

func NewAsgCapacityProvider_Override

func NewAsgCapacityProvider_Override(a AsgCapacityProvider, scope constructs.Construct, id *string, props *AsgCapacityProviderProps)

Experimental.

func NewAssetEnvironmentFile_Override

func NewAssetEnvironmentFile_Override(a AssetEnvironmentFile, path *string, options *awss3assets.AssetOptions)

Experimental.

func NewAssetImage_Override

func NewAssetImage_Override(a AssetImage, directory *string, props *AssetImageProps)

Constructs a new instance of the AssetImage class. Experimental.

func NewAwsLogDriver_Override

func NewAwsLogDriver_Override(a AwsLogDriver, props *AwsLogDriverProps)

Constructs a new instance of the AwsLogDriver class. Experimental.

func NewBaseService_Override

func NewBaseService_Override(b BaseService, scope constructs.Construct, id *string, props *BaseServiceProps, additionalProps interface{}, taskDefinition TaskDefinition)

Constructs a new instance of the BaseService class. Experimental.

func NewBottleRocketImage_Override

func NewBottleRocketImage_Override(b BottleRocketImage, props *BottleRocketImageProps)

Constructs a new instance of the BottleRocketImage class. Experimental.

func NewBuiltInAttributes_Override

func NewBuiltInAttributes_Override(b BuiltInAttributes)

Experimental.

func NewCfnCapacityProvider_Override

func NewCfnCapacityProvider_Override(c CfnCapacityProvider, scope awscdk.Construct, id *string, props *CfnCapacityProviderProps)

Create a new `AWS::ECS::CapacityProvider`.

func NewCfnClusterCapacityProviderAssociations_Override

func NewCfnClusterCapacityProviderAssociations_Override(c CfnClusterCapacityProviderAssociations, scope awscdk.Construct, id *string, props *CfnClusterCapacityProviderAssociationsProps)

Create a new `AWS::ECS::ClusterCapacityProviderAssociations`.

func NewCfnCluster_Override

func NewCfnCluster_Override(c CfnCluster, scope awscdk.Construct, id *string, props *CfnClusterProps)

Create a new `AWS::ECS::Cluster`.

func NewCfnPrimaryTaskSet_Override

func NewCfnPrimaryTaskSet_Override(c CfnPrimaryTaskSet, scope awscdk.Construct, id *string, props *CfnPrimaryTaskSetProps)

Create a new `AWS::ECS::PrimaryTaskSet`.

func NewCfnService_Override

func NewCfnService_Override(c CfnService, scope awscdk.Construct, id *string, props *CfnServiceProps)

Create a new `AWS::ECS::Service`.

func NewCfnTaskDefinition_Override

func NewCfnTaskDefinition_Override(c CfnTaskDefinition, scope awscdk.Construct, id *string, props *CfnTaskDefinitionProps)

Create a new `AWS::ECS::TaskDefinition`.

func NewCfnTaskSet_Override

func NewCfnTaskSet_Override(c CfnTaskSet, scope awscdk.Construct, id *string, props *CfnTaskSetProps)

Create a new `AWS::ECS::TaskSet`.

func NewCluster_Override

func NewCluster_Override(c Cluster, scope constructs.Construct, id *string, props *ClusterProps)

Constructs a new instance of the Cluster class. Experimental.

func NewContainerDefinition_Override

func NewContainerDefinition_Override(c ContainerDefinition, scope constructs.Construct, id *string, props *ContainerDefinitionProps)

Constructs a new instance of the ContainerDefinition class. Experimental.

func NewContainerImage_Override

func NewContainerImage_Override(c ContainerImage)

Experimental.

func NewEc2Service_Override

func NewEc2Service_Override(e Ec2Service, scope constructs.Construct, id *string, props *Ec2ServiceProps)

Constructs a new instance of the Ec2Service class. Experimental.

func NewEc2TaskDefinition_Override

func NewEc2TaskDefinition_Override(e Ec2TaskDefinition, scope constructs.Construct, id *string, props *Ec2TaskDefinitionProps)

Constructs a new instance of the Ec2TaskDefinition class. Experimental.

func NewEcrImage_Override

func NewEcrImage_Override(e EcrImage, repository awsecr.IRepository, tagOrDigest *string)

Constructs a new instance of the EcrImage class. Experimental.

func NewEcsOptimizedAmi_Override

func NewEcsOptimizedAmi_Override(e EcsOptimizedAmi, props *EcsOptimizedAmiProps)

Constructs a new instance of the EcsOptimizedAmi class. Deprecated: see {@link EcsOptimizedImage#amazonLinux}, {@link EcsOptimizedImage#amazonLinux} and {@link EcsOptimizedImage#windows}.

func NewEnvironmentFile_Override

func NewEnvironmentFile_Override(e EnvironmentFile)

Experimental.

func NewExternalService_Override

func NewExternalService_Override(e ExternalService, scope constructs.Construct, id *string, props *ExternalServiceProps)

Constructs a new instance of the ExternalService class. Experimental.

func NewExternalTaskDefinition_Override

func NewExternalTaskDefinition_Override(e ExternalTaskDefinition, scope constructs.Construct, id *string, props *ExternalTaskDefinitionProps)

Constructs a new instance of the ExternalTaskDefinition class. Experimental.

func NewFargateService_Override

func NewFargateService_Override(f FargateService, scope constructs.Construct, id *string, props *FargateServiceProps)

Constructs a new instance of the FargateService class. Experimental.

func NewFargateTaskDefinition_Override

func NewFargateTaskDefinition_Override(f FargateTaskDefinition, scope constructs.Construct, id *string, props *FargateTaskDefinitionProps)

Constructs a new instance of the FargateTaskDefinition class. Experimental.

func NewFireLensLogDriver_Override

func NewFireLensLogDriver_Override(f FireLensLogDriver, props *FireLensLogDriverProps)

Constructs a new instance of the FireLensLogDriver class. Experimental.

func NewFirelensLogRouter_Override

func NewFirelensLogRouter_Override(f FirelensLogRouter, scope constructs.Construct, id *string, props *FirelensLogRouterProps)

Constructs a new instance of the FirelensLogRouter class. Experimental.

func NewFluentdLogDriver_Override

func NewFluentdLogDriver_Override(f FluentdLogDriver, props *FluentdLogDriverProps)

Constructs a new instance of the FluentdLogDriver class. Experimental.

func NewGelfLogDriver_Override

func NewGelfLogDriver_Override(g GelfLogDriver, props *GelfLogDriverProps)

Constructs a new instance of the GelfLogDriver class. Experimental.

func NewGenericLogDriver_Override

func NewGenericLogDriver_Override(g GenericLogDriver, props *GenericLogDriverProps)

Constructs a new instance of the GenericLogDriver class. Experimental.

func NewJournaldLogDriver_Override

func NewJournaldLogDriver_Override(j JournaldLogDriver, props *JournaldLogDriverProps)

Constructs a new instance of the JournaldLogDriver class. Experimental.

func NewJsonFileLogDriver_Override

func NewJsonFileLogDriver_Override(j JsonFileLogDriver, props *JsonFileLogDriverProps)

Constructs a new instance of the JsonFileLogDriver class. Experimental.

func NewLinuxParameters_Override

func NewLinuxParameters_Override(l LinuxParameters, scope constructs.Construct, id *string, props *LinuxParametersProps)

Constructs a new instance of the LinuxParameters class. Experimental.

func NewListenerConfig_Override

func NewListenerConfig_Override(l ListenerConfig)

Experimental.

func NewLogDriver_Override

func NewLogDriver_Override(l LogDriver)

Experimental.

func NewLogDrivers_Override

func NewLogDrivers_Override(l LogDrivers)

Experimental.

func NewProxyConfiguration_Override

func NewProxyConfiguration_Override(p ProxyConfiguration)

Experimental.

func NewProxyConfigurations_Override

func NewProxyConfigurations_Override(p ProxyConfigurations)

Experimental.

func NewRepositoryImage_Override

func NewRepositoryImage_Override(r RepositoryImage, imageName *string, props *RepositoryImageProps)

Constructs a new instance of the RepositoryImage class. Experimental.

func NewS3EnvironmentFile_Override

func NewS3EnvironmentFile_Override(s S3EnvironmentFile, bucket awss3.IBucket, key *string, objectVersion *string)

Experimental.

func NewScalableTaskCount_Override

func NewScalableTaskCount_Override(s ScalableTaskCount, scope constructs.Construct, id *string, props *ScalableTaskCountProps)

Constructs a new instance of the ScalableTaskCount class. Experimental.

func NewSecret_Override

func NewSecret_Override(s Secret)

Experimental.

func NewSplunkLogDriver_Override

func NewSplunkLogDriver_Override(s SplunkLogDriver, props *SplunkLogDriverProps)

Constructs a new instance of the SplunkLogDriver class. Experimental.

func NewSyslogLogDriver_Override

func NewSyslogLogDriver_Override(s SyslogLogDriver, props *SyslogLogDriverProps)

Constructs a new instance of the SyslogLogDriver class. Experimental.

func NewTagParameterContainerImage_Override

func NewTagParameterContainerImage_Override(t TagParameterContainerImage, repository awsecr.IRepository)

Experimental.

func NewTaskDefinition_Override

func NewTaskDefinition_Override(t TaskDefinition, scope constructs.Construct, id *string, props *TaskDefinitionProps)

Constructs a new instance of the TaskDefinition class. Experimental.

func ScalableTaskCount_IsConstruct

func ScalableTaskCount_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func TaskDefinition_IsConstruct

func TaskDefinition_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func TaskDefinition_IsResource

func TaskDefinition_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

Types

type AddAutoScalingGroupCapacityOptions

type AddAutoScalingGroupCapacityOptions struct {
	// Specifies whether the containers can access the container instance role.
	// Experimental.
	CanContainersAccessInstanceRole *bool `field:"optional" json:"canContainersAccessInstanceRole" yaml:"canContainersAccessInstanceRole"`
	// What type of machine image this is.
	//
	// Depending on the setting, different UserData will automatically be added
	// to the `AutoScalingGroup` to configure it properly for use with ECS.
	//
	// If you create an `AutoScalingGroup` yourself and are adding it via
	// `addAutoScalingGroup()`, you must specify this value. If you are adding an
	// `autoScalingGroup` via `addCapacity`, this value will be determined
	// from the `machineImage` you pass.
	// Experimental.
	MachineImageType MachineImageType `field:"optional" json:"machineImageType" yaml:"machineImageType"`
	// Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.
	//
	// For more information, see [Using Spot Instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-spot.html).
	// Experimental.
	SpotInstanceDraining *bool `field:"optional" json:"spotInstanceDraining" yaml:"spotInstanceDraining"`
	// The time period to wait before force terminating an instance that is draining.
	//
	// This creates a Lambda function that is used by a lifecycle hook for the
	// AutoScalingGroup that will delay instance termination until all ECS tasks
	// have drained from the instance. Set to 0 to disable task draining.
	//
	// Set to 0 to disable task draining.
	// Deprecated: The lifecycle draining hook is not configured if using the EC2 Capacity Provider. Enable managed termination protection instead.
	TaskDrainTime awscdk.Duration `field:"optional" json:"taskDrainTime" yaml:"taskDrainTime"`
	// If {@link AddAutoScalingGroupCapacityOptions.taskDrainTime} is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See [SNS Data Encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-data-encryption.html) for more information.
	// Experimental.
	TopicEncryptionKey awskms.IKey `field:"optional" json:"topicEncryptionKey" yaml:"topicEncryptionKey"`
}

The properties for adding an AutoScalingGroup.

Example:

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

var duration duration
var key key

addAutoScalingGroupCapacityOptions := &addAutoScalingGroupCapacityOptions{
	canContainersAccessInstanceRole: jsii.Boolean(false),
	machineImageType: awscdk.Aws_ecs.machineImageType_AMAZON_LINUX_2,
	spotInstanceDraining: jsii.Boolean(false),
	taskDrainTime: duration,
	topicEncryptionKey: key,
}

Experimental.

type AddCapacityOptions

type AddCapacityOptions struct {
	// Specifies whether the containers can access the container instance role.
	// Experimental.
	CanContainersAccessInstanceRole *bool `field:"optional" json:"canContainersAccessInstanceRole" yaml:"canContainersAccessInstanceRole"`
	// What type of machine image this is.
	//
	// Depending on the setting, different UserData will automatically be added
	// to the `AutoScalingGroup` to configure it properly for use with ECS.
	//
	// If you create an `AutoScalingGroup` yourself and are adding it via
	// `addAutoScalingGroup()`, you must specify this value. If you are adding an
	// `autoScalingGroup` via `addCapacity`, this value will be determined
	// from the `machineImage` you pass.
	// Experimental.
	MachineImageType MachineImageType `field:"optional" json:"machineImageType" yaml:"machineImageType"`
	// Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.
	//
	// For more information, see [Using Spot Instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-spot.html).
	// Experimental.
	SpotInstanceDraining *bool `field:"optional" json:"spotInstanceDraining" yaml:"spotInstanceDraining"`
	// The time period to wait before force terminating an instance that is draining.
	//
	// This creates a Lambda function that is used by a lifecycle hook for the
	// AutoScalingGroup that will delay instance termination until all ECS tasks
	// have drained from the instance. Set to 0 to disable task draining.
	//
	// Set to 0 to disable task draining.
	// Deprecated: The lifecycle draining hook is not configured if using the EC2 Capacity Provider. Enable managed termination protection instead.
	TaskDrainTime awscdk.Duration `field:"optional" json:"taskDrainTime" yaml:"taskDrainTime"`
	// If {@link AddAutoScalingGroupCapacityOptions.taskDrainTime} is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See [SNS Data Encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-data-encryption.html) for more information.
	// Experimental.
	TopicEncryptionKey awskms.IKey `field:"optional" json:"topicEncryptionKey" yaml:"topicEncryptionKey"`
	// Whether the instances can initiate connections to anywhere by default.
	// Experimental.
	AllowAllOutbound *bool `field:"optional" json:"allowAllOutbound" yaml:"allowAllOutbound"`
	// Whether instances in the Auto Scaling Group should have public IP addresses associated with them.
	// Experimental.
	AssociatePublicIpAddress *bool `field:"optional" json:"associatePublicIpAddress" yaml:"associatePublicIpAddress"`
	// The name of the Auto Scaling group.
	//
	// This name must be unique per Region per account.
	// Experimental.
	AutoScalingGroupName *string `field:"optional" json:"autoScalingGroupName" yaml:"autoScalingGroupName"`
	// Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
	//
	// Each instance that is launched has an associated root device volume,
	// either an Amazon EBS volume or an instance store volume.
	// You can use block device mappings to specify additional EBS volumes or
	// instance store volumes to attach to an instance when it is launched.
	// See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
	//
	// Experimental.
	BlockDevices *[]*awsautoscaling.BlockDevice `field:"optional" json:"blockDevices" yaml:"blockDevices"`
	// Default scaling cooldown for this AutoScalingGroup.
	// Experimental.
	Cooldown awscdk.Duration `field:"optional" json:"cooldown" yaml:"cooldown"`
	// Initial amount of instances in the fleet.
	//
	// If this is set to a number, every deployment will reset the amount of
	// instances to this number. It is recommended to leave this value blank.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacity
	//
	// Experimental.
	DesiredCapacity *float64 `field:"optional" json:"desiredCapacity" yaml:"desiredCapacity"`
	// Enable monitoring for group metrics, these metrics describe the group rather than any of its instances.
	//
	// To report all group metrics use `GroupMetrics.all()`
	// Group metrics are reported in a granularity of 1 minute at no additional charge.
	// Experimental.
	GroupMetrics *[]awsautoscaling.GroupMetrics `field:"optional" json:"groupMetrics" yaml:"groupMetrics"`
	// Configuration for health checks.
	// Experimental.
	HealthCheck awsautoscaling.HealthCheck `field:"optional" json:"healthCheck" yaml:"healthCheck"`
	// If the ASG has scheduled actions, don't reset unchanged group sizes.
	//
	// Only used if the ASG has scheduled actions (which may scale your ASG up
	// or down regardless of cdk deployments). If true, the size of the group
	// will only be reset if it has been changed in the CDK app. If false, the
	// sizes will always be changed back to what they were in the CDK app
	// on deployment.
	// Experimental.
	IgnoreUnmodifiedSizeProperties *bool `field:"optional" json:"ignoreUnmodifiedSizeProperties" yaml:"ignoreUnmodifiedSizeProperties"`
	// Controls whether instances in this group are launched with detailed or basic monitoring.
	//
	// When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account
	// is charged a fee. When you disable detailed monitoring, CloudWatch generates metrics every 5 minutes.
	// See: https://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-monitoring.html#enable-as-instance-metrics
	//
	// Experimental.
	InstanceMonitoring awsautoscaling.Monitoring `field:"optional" json:"instanceMonitoring" yaml:"instanceMonitoring"`
	// Name of SSH keypair to grant access to instances.
	// Experimental.
	KeyName *string `field:"optional" json:"keyName" yaml:"keyName"`
	// Maximum number of instances in the fleet.
	// Experimental.
	MaxCapacity *float64 `field:"optional" json:"maxCapacity" yaml:"maxCapacity"`
	// The maximum amount of time that an instance can be in service.
	//
	// The maximum duration applies
	// to all current and future instances in the group. As an instance approaches its maximum duration,
	// it is terminated and replaced, and cannot be used again.
	//
	// You must specify a value of at least 604,800 seconds (7 days). To clear a previously set value,
	// leave this property undefined.
	// See: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html
	//
	// Experimental.
	MaxInstanceLifetime awscdk.Duration `field:"optional" json:"maxInstanceLifetime" yaml:"maxInstanceLifetime"`
	// Minimum number of instances in the fleet.
	// Experimental.
	MinCapacity *float64 `field:"optional" json:"minCapacity" yaml:"minCapacity"`
	// Whether newly-launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in.
	//
	// By default, Auto Scaling can terminate an instance at any time after launch
	// when scaling in an Auto Scaling Group, subject to the group's termination
	// policy. However, you may wish to protect newly-launched instances from
	// being scaled in if they are going to run critical applications that should
	// not be prematurely terminated.
	//
	// This flag must be enabled if the Auto Scaling Group will be associated with
	// an ECS Capacity Provider with managed termination protection.
	// Experimental.
	NewInstancesProtectedFromScaleIn *bool `field:"optional" json:"newInstancesProtectedFromScaleIn" yaml:"newInstancesProtectedFromScaleIn"`
	// Configure autoscaling group to send notifications about fleet changes to an SNS topic(s).
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-notificationconfigurations
	//
	// Experimental.
	Notifications *[]*awsautoscaling.NotificationConfiguration `field:"optional" json:"notifications" yaml:"notifications"`
	// SNS topic to send notifications about fleet changes.
	// Deprecated: use `notifications`.
	NotificationsTopic awssns.ITopic `field:"optional" json:"notificationsTopic" yaml:"notificationsTopic"`
	// Configuration for replacing updates.
	//
	// Only used if updateType == UpdateType.ReplacingUpdate. Specifies how
	// many instances must signal success for the update to succeed.
	// Deprecated: Use `signals` instead.
	ReplacingUpdateMinSuccessfulInstancesPercent *float64 `field:"optional" json:"replacingUpdateMinSuccessfulInstancesPercent" yaml:"replacingUpdateMinSuccessfulInstancesPercent"`
	// How many ResourceSignal calls CloudFormation expects before the resource is considered created.
	// Deprecated: Use `signals` instead.
	ResourceSignalCount *float64 `field:"optional" json:"resourceSignalCount" yaml:"resourceSignalCount"`
	// The length of time to wait for the resourceSignalCount.
	//
	// The maximum value is 43200 (12 hours).
	// Deprecated: Use `signals` instead.
	ResourceSignalTimeout awscdk.Duration `field:"optional" json:"resourceSignalTimeout" yaml:"resourceSignalTimeout"`
	// Configuration for rolling updates.
	//
	// Only used if updateType == UpdateType.RollingUpdate.
	// Deprecated: Use `updatePolicy` instead.
	RollingUpdateConfiguration *awsautoscaling.RollingUpdateConfiguration `field:"optional" json:"rollingUpdateConfiguration" yaml:"rollingUpdateConfiguration"`
	// Configure waiting for signals during deployment.
	//
	// Use this to pause the CloudFormation deployment to wait for the instances
	// in the AutoScalingGroup to report successful startup during
	// creation and updates. The UserData script needs to invoke `cfn-signal`
	// with a success or failure code after it is done setting up the instance.
	//
	// Without waiting for signals, the CloudFormation deployment will proceed as
	// soon as the AutoScalingGroup has been created or updated but before the
	// instances in the group have been started.
	//
	// For example, to have instances wait for an Elastic Load Balancing health check before
	// they signal success, add a health-check verification by using the
	// cfn-init helper script. For an example, see the verify_instance_health
	// command in the Auto Scaling rolling updates sample template:
	//
	// https://github.com/awslabs/aws-cloudformation-templates/blob/master/aws/services/AutoScaling/AutoScalingRollingUpdates.yaml
	// Experimental.
	Signals awsautoscaling.Signals `field:"optional" json:"signals" yaml:"signals"`
	// The maximum hourly price (in USD) to be paid for any Spot Instance launched to fulfill the request.
	//
	// Spot Instances are
	// launched when the price you specify exceeds the current Spot market price.
	// Experimental.
	SpotPrice *string `field:"optional" json:"spotPrice" yaml:"spotPrice"`
	// A policy or a list of policies that are used to select the instances to terminate.
	//
	// The policies are executed in the order that you list them.
	// See: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html
	//
	// Experimental.
	TerminationPolicies *[]awsautoscaling.TerminationPolicy `field:"optional" json:"terminationPolicies" yaml:"terminationPolicies"`
	// What to do when an AutoScalingGroup's instance configuration is changed.
	//
	// This is applied when any of the settings on the ASG are changed that
	// affect how the instances should be created (VPC, instance type, startup
	// scripts, etc.). It indicates how the existing instances should be
	// replaced with new instances matching the new config. By default, nothing
	// is done and only new instances are launched with the new config.
	// Experimental.
	UpdatePolicy awsautoscaling.UpdatePolicy `field:"optional" json:"updatePolicy" yaml:"updatePolicy"`
	// What to do when an AutoScalingGroup's instance configuration is changed.
	//
	// This is applied when any of the settings on the ASG are changed that
	// affect how the instances should be created (VPC, instance type, startup
	// scripts, etc.). It indicates how the existing instances should be
	// replaced with new instances matching the new config. By default, nothing
	// is done and only new instances are launched with the new config.
	// Deprecated: Use `updatePolicy` instead.
	UpdateType awsautoscaling.UpdateType `field:"optional" json:"updateType" yaml:"updateType"`
	// Where to place instances within the VPC.
	// Experimental.
	VpcSubnets *awsec2.SubnetSelection `field:"optional" json:"vpcSubnets" yaml:"vpcSubnets"`
	// The EC2 instance type to use when launching instances into the AutoScalingGroup.
	// Experimental.
	InstanceType awsec2.InstanceType `field:"required" json:"instanceType" yaml:"instanceType"`
	// The ECS-optimized AMI variant to use.
	//
	// The default is to use an ECS-optimized AMI of Amazon Linux 2 which is
	// automatically updated to the latest version on every deployment. This will
	// replace the instances in the AutoScalingGroup. Make sure you have not disabled
	// task draining, to avoid downtime when the AMI updates.
	//
	// To use an image that does not update on every deployment, pass:
	//
	// “`ts
	// const machineImage = ecs.EcsOptimizedImage.amazonLinux2(ecs.AmiHardwareType.STANDARD, {
	//    cachedInContext: true,
	// });
	// “`
	//
	// For more information, see [Amazon ECS-optimized
	// AMIs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html).
	//
	// You must define either `machineImage` or `machineImageType`, not both.
	// Experimental.
	MachineImage awsec2.IMachineImage `field:"optional" json:"machineImage" yaml:"machineImage"`
}

The properties for adding instance capacity to an AutoScalingGroup.

Example:

var vpc vpc

// Create an ECS cluster
cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
})

// Add capacity to it
cluster.addCapacity(jsii.String("DefaultAutoScalingGroupCapacity"), &addCapacityOptions{
	instanceType: ec2.NewInstanceType(jsii.String("t2.xlarge")),
	desiredCapacity: jsii.Number(3),
})

taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))

taskDefinition.addContainer(jsii.String("DefaultContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(512),
})

// Instantiate an Amazon ECS Service
ecsService := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

Experimental.

type AmiHardwareType

type AmiHardwareType string

The ECS-optimized AMI variant to use.

For more information, see [Amazon ECS-optimized AMIs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html).

Example:

var cluster cluster

cluster.addCapacity(jsii.String("graviton-cluster"), &addCapacityOptions{
	minCapacity: jsii.Number(2),
	instanceType: ec2.NewInstanceType(jsii.String("c6g.large")),
	machineImage: ecs.ecsOptimizedImage.amazonLinux2(ecs.amiHardwareType_ARM),
})

Experimental.

const (
	// Use the standard Amazon ECS-optimized AMI.
	// Experimental.
	AmiHardwareType_STANDARD AmiHardwareType = "STANDARD"
	// Use the Amazon ECS GPU-optimized AMI.
	// Experimental.
	AmiHardwareType_GPU AmiHardwareType = "GPU"
	// Use the Amazon ECS-optimized Amazon Linux 2 (arm64) AMI.
	// Experimental.
	AmiHardwareType_ARM AmiHardwareType = "ARM"
)

type AppMeshProxyConfiguration

type AppMeshProxyConfiguration interface {
	ProxyConfiguration
	// Called when the proxy configuration is configured on a task definition.
	// Experimental.
	Bind(_scope awscdk.Construct, _taskDefinition TaskDefinition) *CfnTaskDefinition_ProxyConfigurationProperty
}

The class for App Mesh proxy configurations.

For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the ecs-init package to enable a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version 20190301 or later, then they contain the required versions of the container agent and ecs-init. For more information, see [Amazon ECS-optimized AMIs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html).

For tasks using the Fargate launch type, the task or service requires platform version 1.3.0 or later.

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"

appMeshProxyConfiguration := awscdk.Aws_ecs.NewAppMeshProxyConfiguration(&appMeshProxyConfigurationConfigProps{
	containerName: jsii.String("containerName"),
	properties: &appMeshProxyConfigurationProps{
		appPorts: []*f64{
			jsii.Number(123),
		},
		proxyEgressPort: jsii.Number(123),
		proxyIngressPort: jsii.Number(123),

		// the properties below are optional
		egressIgnoredIPs: []*string{
			jsii.String("egressIgnoredIPs"),
		},
		egressIgnoredPorts: []*f64{
			jsii.Number(123),
		},
		ignoredGID: jsii.Number(123),
		ignoredUID: jsii.Number(123),
	},
})

Experimental.

func NewAppMeshProxyConfiguration

func NewAppMeshProxyConfiguration(props *AppMeshProxyConfigurationConfigProps) AppMeshProxyConfiguration

Constructs a new instance of the AppMeshProxyConfiguration class. Experimental.

type AppMeshProxyConfigurationConfigProps

type AppMeshProxyConfigurationConfigProps struct {
	// The name of the container that will serve as the App Mesh proxy.
	// Experimental.
	ContainerName *string `field:"required" json:"containerName" yaml:"containerName"`
	// The set of network configuration parameters to provide the Container Network Interface (CNI) plugin.
	// Experimental.
	Properties *AppMeshProxyConfigurationProps `field:"required" json:"properties" yaml:"properties"`
}

The configuration to use when setting an App Mesh proxy 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"

appMeshProxyConfigurationConfigProps := &appMeshProxyConfigurationConfigProps{
	containerName: jsii.String("containerName"),
	properties: &appMeshProxyConfigurationProps{
		appPorts: []*f64{
			jsii.Number(123),
		},
		proxyEgressPort: jsii.Number(123),
		proxyIngressPort: jsii.Number(123),

		// the properties below are optional
		egressIgnoredIPs: []*string{
			jsii.String("egressIgnoredIPs"),
		},
		egressIgnoredPorts: []*f64{
			jsii.Number(123),
		},
		ignoredGID: jsii.Number(123),
		ignoredUID: jsii.Number(123),
	},
}

Experimental.

type AppMeshProxyConfigurationProps

type AppMeshProxyConfigurationProps struct {
	// The list of ports that the application uses.
	//
	// Network traffic to these ports is forwarded to the ProxyIngressPort and ProxyEgressPort.
	// Experimental.
	AppPorts *[]*float64 `field:"required" json:"appPorts" yaml:"appPorts"`
	// Specifies the port that outgoing traffic from the AppPorts is directed to.
	// Experimental.
	ProxyEgressPort *float64 `field:"required" json:"proxyEgressPort" yaml:"proxyEgressPort"`
	// Specifies the port that incoming traffic to the AppPorts is directed to.
	// Experimental.
	ProxyIngressPort *float64 `field:"required" json:"proxyIngressPort" yaml:"proxyIngressPort"`
	// The egress traffic going to these specified IP addresses is ignored and not redirected to the ProxyEgressPort.
	//
	// It can be an empty list.
	// Experimental.
	EgressIgnoredIPs *[]*string `field:"optional" json:"egressIgnoredIPs" yaml:"egressIgnoredIPs"`
	// The egress traffic going to these specified ports is ignored and not redirected to the ProxyEgressPort.
	//
	// It can be an empty list.
	// Experimental.
	EgressIgnoredPorts *[]*float64 `field:"optional" json:"egressIgnoredPorts" yaml:"egressIgnoredPorts"`
	// The group ID (GID) of the proxy container as defined by the user parameter in a container definition.
	//
	// This is used to ensure the proxy ignores its own traffic. If IgnoredUID is specified, this field can be empty.
	// Experimental.
	IgnoredGID *float64 `field:"optional" json:"ignoredGID" yaml:"ignoredGID"`
	// The user ID (UID) of the proxy container as defined by the user parameter in a container definition.
	//
	// This is used to ensure the proxy ignores its own traffic. If IgnoredGID is specified, this field can be empty.
	// Experimental.
	IgnoredUID *float64 `field:"optional" json:"ignoredUID" yaml:"ignoredUID"`
}

Interface for setting the properties of proxy 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"

appMeshProxyConfigurationProps := &appMeshProxyConfigurationProps{
	appPorts: []*f64{
		jsii.Number(123),
	},
	proxyEgressPort: jsii.Number(123),
	proxyIngressPort: jsii.Number(123),

	// the properties below are optional
	egressIgnoredIPs: []*string{
		jsii.String("egressIgnoredIPs"),
	},
	egressIgnoredPorts: []*f64{
		jsii.Number(123),
	},
	ignoredGID: jsii.Number(123),
	ignoredUID: jsii.Number(123),
}

Experimental.

type AsgCapacityProvider

type AsgCapacityProvider interface {
	awscdk.Construct
	// Auto Scaling Group.
	// Experimental.
	AutoScalingGroup() awsautoscaling.AutoScalingGroup
	// Specifies whether the containers can access the container instance role.
	// Experimental.
	CanContainersAccessInstanceRole() *bool
	// Capacity provider name.
	// Experimental.
	CapacityProviderName() *string
	// Whether managed termination protection is enabled.
	// Experimental.
	EnableManagedTerminationProtection() *bool
	// Auto Scaling Group machineImageType.
	// Experimental.
	MachineImageType() MachineImageType
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// 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
}

An Auto Scaling Group Capacity Provider.

This allows an ECS cluster to target a specific EC2 Auto Scaling Group for the placement of tasks. Optionally (and recommended), ECS can manage the number of instances in the ASG to fit the tasks, and can ensure that instances are not prematurely terminated while there are still tasks running on them.

Example:

var vpc vpc

cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
})

autoScalingGroup := autoscaling.NewAutoScalingGroup(this, jsii.String("ASG"), &autoScalingGroupProps{
	vpc: vpc,
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
	machineImage: ecs.ecsOptimizedImage.amazonLinux2(),
	minCapacity: jsii.Number(0),
	maxCapacity: jsii.Number(100),
})

capacityProvider := ecs.NewAsgCapacityProvider(this, jsii.String("AsgCapacityProvider"), &asgCapacityProviderProps{
	autoScalingGroup: autoScalingGroup,
})
cluster.addAsgCapacityProvider(capacityProvider)

taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))

taskDefinition.addContainer(jsii.String("web"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryReservationMiB: jsii.Number(256),
})

ecs.NewEc2Service(this, jsii.String("EC2Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	capacityProviderStrategies: []capacityProviderStrategy{
		&capacityProviderStrategy{
			capacityProvider: capacityProvider.capacityProviderName,
			weight: jsii.Number(1),
		},
	},
})

Experimental.

func NewAsgCapacityProvider

func NewAsgCapacityProvider(scope constructs.Construct, id *string, props *AsgCapacityProviderProps) AsgCapacityProvider

Experimental.

type AsgCapacityProviderProps

type AsgCapacityProviderProps struct {
	// Specifies whether the containers can access the container instance role.
	// Experimental.
	CanContainersAccessInstanceRole *bool `field:"optional" json:"canContainersAccessInstanceRole" yaml:"canContainersAccessInstanceRole"`
	// What type of machine image this is.
	//
	// Depending on the setting, different UserData will automatically be added
	// to the `AutoScalingGroup` to configure it properly for use with ECS.
	//
	// If you create an `AutoScalingGroup` yourself and are adding it via
	// `addAutoScalingGroup()`, you must specify this value. If you are adding an
	// `autoScalingGroup` via `addCapacity`, this value will be determined
	// from the `machineImage` you pass.
	// Experimental.
	MachineImageType MachineImageType `field:"optional" json:"machineImageType" yaml:"machineImageType"`
	// Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.
	//
	// For more information, see [Using Spot Instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-spot.html).
	// Experimental.
	SpotInstanceDraining *bool `field:"optional" json:"spotInstanceDraining" yaml:"spotInstanceDraining"`
	// The time period to wait before force terminating an instance that is draining.
	//
	// This creates a Lambda function that is used by a lifecycle hook for the
	// AutoScalingGroup that will delay instance termination until all ECS tasks
	// have drained from the instance. Set to 0 to disable task draining.
	//
	// Set to 0 to disable task draining.
	// Deprecated: The lifecycle draining hook is not configured if using the EC2 Capacity Provider. Enable managed termination protection instead.
	TaskDrainTime awscdk.Duration `field:"optional" json:"taskDrainTime" yaml:"taskDrainTime"`
	// If {@link AddAutoScalingGroupCapacityOptions.taskDrainTime} is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See [SNS Data Encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-data-encryption.html) for more information.
	// Experimental.
	TopicEncryptionKey awskms.IKey `field:"optional" json:"topicEncryptionKey" yaml:"topicEncryptionKey"`
	// The autoscaling group to add as a Capacity Provider.
	// Experimental.
	AutoScalingGroup awsautoscaling.IAutoScalingGroup `field:"required" json:"autoScalingGroup" yaml:"autoScalingGroup"`
	// The name of the capacity provider.
	//
	// If a name is specified,
	// it cannot start with `aws`, `ecs`, or `fargate`. If no name is specified,
	// a default name in the CFNStackName-CFNResourceName-RandomString format is used.
	// Experimental.
	CapacityProviderName *string `field:"optional" json:"capacityProviderName" yaml:"capacityProviderName"`
	// Whether to enable managed scaling.
	// Experimental.
	EnableManagedScaling *bool `field:"optional" json:"enableManagedScaling" yaml:"enableManagedScaling"`
	// Whether to enable managed termination protection.
	// Experimental.
	EnableManagedTerminationProtection *bool `field:"optional" json:"enableManagedTerminationProtection" yaml:"enableManagedTerminationProtection"`
	// Maximum scaling step size.
	//
	// In most cases this should be left alone.
	// Experimental.
	MaximumScalingStepSize *float64 `field:"optional" json:"maximumScalingStepSize" yaml:"maximumScalingStepSize"`
	// Minimum scaling step size.
	//
	// In most cases this should be left alone.
	// Experimental.
	MinimumScalingStepSize *float64 `field:"optional" json:"minimumScalingStepSize" yaml:"minimumScalingStepSize"`
	// Target capacity percent.
	//
	// In most cases this should be left alone.
	// Experimental.
	TargetCapacityPercent *float64 `field:"optional" json:"targetCapacityPercent" yaml:"targetCapacityPercent"`
}

The options for creating an Auto Scaling Group Capacity Provider.

Example:

var vpc vpc

cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
})

autoScalingGroup := autoscaling.NewAutoScalingGroup(this, jsii.String("ASG"), &autoScalingGroupProps{
	vpc: vpc,
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
	machineImage: ecs.ecsOptimizedImage.amazonLinux2(),
	minCapacity: jsii.Number(0),
	maxCapacity: jsii.Number(100),
})

capacityProvider := ecs.NewAsgCapacityProvider(this, jsii.String("AsgCapacityProvider"), &asgCapacityProviderProps{
	autoScalingGroup: autoScalingGroup,
})
cluster.addAsgCapacityProvider(capacityProvider)

taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))

taskDefinition.addContainer(jsii.String("web"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryReservationMiB: jsii.Number(256),
})

ecs.NewEc2Service(this, jsii.String("EC2Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	capacityProviderStrategies: []capacityProviderStrategy{
		&capacityProviderStrategy{
			capacityProvider: capacityProvider.capacityProviderName,
			weight: jsii.Number(1),
		},
	},
})

Experimental.

type AssetEnvironmentFile

type AssetEnvironmentFile interface {
	EnvironmentFile
	// The path to the asset file or directory.
	// Experimental.
	Path() *string
	// Called when the container is initialized to allow this object to bind to the stack.
	// Experimental.
	Bind(scope awscdk.Construct) *EnvironmentFileConfig
}

Environment file from a local directory.

Example:

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

var dockerImage dockerImage
var grantable iGrantable
var localBundling iLocalBundling

assetEnvironmentFile := awscdk.Aws_ecs.NewAssetEnvironmentFile(jsii.String("path"), &assetOptions{
	assetHash: jsii.String("assetHash"),
	assetHashType: monocdk.assetHashType_SOURCE,
	bundling: &bundlingOptions{
		image: dockerImage,

		// the properties below are optional
		command: []*string{
			jsii.String("command"),
		},
		entrypoint: []*string{
			jsii.String("entrypoint"),
		},
		environment: map[string]*string{
			"environmentKey": jsii.String("environment"),
		},
		local: localBundling,
		outputType: monocdk.bundlingOutput_ARCHIVED,
		securityOpt: jsii.String("securityOpt"),
		user: jsii.String("user"),
		volumes: []dockerVolume{
			&dockerVolume{
				containerPath: jsii.String("containerPath"),
				hostPath: jsii.String("hostPath"),

				// the properties below are optional
				consistency: monocdk.dockerVolumeConsistency_CONSISTENT,
			},
		},
		workingDirectory: jsii.String("workingDirectory"),
	},
	exclude: []*string{
		jsii.String("exclude"),
	},
	follow: awscdk.Assets.followMode_NEVER,
	followSymlinks: monocdk.symlinkFollowMode_NEVER,
	ignoreMode: monocdk.ignoreMode_GLOB,
	readers: []*iGrantable{
		grantable,
	},
	sourceHash: jsii.String("sourceHash"),
})

Experimental.

func AssetEnvironmentFile_FromAsset

func AssetEnvironmentFile_FromAsset(path *string, options *awss3assets.AssetOptions) AssetEnvironmentFile

Loads the environment file from a local disk path. Experimental.

func EnvironmentFile_FromAsset

func EnvironmentFile_FromAsset(path *string, options *awss3assets.AssetOptions) AssetEnvironmentFile

Loads the environment file from a local disk path. Experimental.

func NewAssetEnvironmentFile

func NewAssetEnvironmentFile(path *string, options *awss3assets.AssetOptions) AssetEnvironmentFile

Experimental.

func S3EnvironmentFile_FromAsset

func S3EnvironmentFile_FromAsset(path *string, options *awss3assets.AssetOptions) AssetEnvironmentFile

Loads the environment file from a local disk path. Experimental.

type AssetImage

type AssetImage interface {
	ContainerImage
	// Called when the image is used by a ContainerDefinition.
	// Experimental.
	Bind(scope awscdk.Construct, containerDefinition ContainerDefinition) *ContainerImageConfig
}

An image that will be built from a local directory with a Dockerfile.

Example:

import "github.com/aws/aws-cdk-go/awscdk"
import ec2 "github.com/aws/aws-cdk-go/awscdk"
import ecs "github.com/aws/aws-cdk-go/awscdk"
import ecsPatterns "github.com/aws/aws-cdk-go/awscdk"
import cxapi "github.com/aws/aws-cdk-go/awscdk"
import path "github.com/aws-samples/dummy/path"

app := awscdk.NewApp()

stack := awscdk.NewStack(app, jsii.String("aws-ecs-patterns-queue"))
stack.node.setContext(cxapi.eCS_REMOVE_DEFAULT_DESIRED_COUNT, jsii.Boolean(true))

vpc := ec2.NewVpc(stack, jsii.String("VPC"), &vpcProps{
	maxAzs: jsii.Number(2),
})

ecsPatterns.NewQueueProcessingFargateService(stack, jsii.String("QueueProcessingService"), &queueProcessingFargateServiceProps{
	vpc: vpc,
	memoryLimitMiB: jsii.Number(512),
	image: ecs.NewAssetImage(path.join(__dirname, jsii.String(".."), jsii.String("sqs-reader"))),
})

Experimental.

func AssetImage_FromAsset

func AssetImage_FromAsset(directory *string, props *AssetImageProps) AssetImage

Reference an image that's constructed directly from sources on disk.

If you already have a `DockerImageAsset` instance, you can use the `ContainerImage.fromDockerImageAsset` method instead. Experimental.

func ContainerImage_FromAsset

func ContainerImage_FromAsset(directory *string, props *AssetImageProps) AssetImage

Reference an image that's constructed directly from sources on disk.

If you already have a `DockerImageAsset` instance, you can use the `ContainerImage.fromDockerImageAsset` method instead. Experimental.

func EcrImage_FromAsset

func EcrImage_FromAsset(directory *string, props *AssetImageProps) AssetImage

Reference an image that's constructed directly from sources on disk.

If you already have a `DockerImageAsset` instance, you can use the `ContainerImage.fromDockerImageAsset` method instead. Experimental.

func NewAssetImage

func NewAssetImage(directory *string, props *AssetImageProps) AssetImage

Constructs a new instance of the AssetImage class. Experimental.

func RepositoryImage_FromAsset

func RepositoryImage_FromAsset(directory *string, props *AssetImageProps) AssetImage

Reference an image that's constructed directly from sources on disk.

If you already have a `DockerImageAsset` instance, you can use the `ContainerImage.fromDockerImageAsset` method instead. Experimental.

func TagParameterContainerImage_FromAsset

func TagParameterContainerImage_FromAsset(directory *string, props *AssetImageProps) AssetImage

Reference an image that's constructed directly from sources on disk.

If you already have a `DockerImageAsset` instance, you can use the `ContainerImage.fromDockerImageAsset` method instead. Experimental.

type AssetImageProps

type AssetImageProps struct {
	// Glob patterns to exclude from the copy.
	// Experimental.
	Exclude *[]*string `field:"optional" json:"exclude" yaml:"exclude"`
	// A strategy for how to handle symlinks.
	// Deprecated: use `followSymlinks` instead.
	Follow assets.FollowMode `field:"optional" json:"follow" yaml:"follow"`
	// The ignore behavior to use for exclude patterns.
	// Experimental.
	IgnoreMode awscdk.IgnoreMode `field:"optional" json:"ignoreMode" yaml:"ignoreMode"`
	// Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
	// Experimental.
	ExtraHash *string `field:"optional" json:"extraHash" yaml:"extraHash"`
	// A strategy for how to handle symlinks.
	// Experimental.
	FollowSymlinks awscdk.SymlinkFollowMode `field:"optional" json:"followSymlinks" yaml:"followSymlinks"`
	// Build args to pass to the `docker build` command.
	//
	// Since Docker build arguments are resolved before deployment, keys and
	// values cannot refer to unresolved tokens (such as `lambda.functionArn` or
	// `queue.queueUrl`).
	// Experimental.
	BuildArgs *map[string]*string `field:"optional" json:"buildArgs" yaml:"buildArgs"`
	// Path to the Dockerfile (relative to the directory).
	// Experimental.
	File *string `field:"optional" json:"file" yaml:"file"`
	// Options to control which parameters are used to invalidate the asset hash.
	// Experimental.
	Invalidation *awsecrassets.DockerImageAssetInvalidationOptions `field:"optional" json:"invalidation" yaml:"invalidation"`
	// Networking mode for the RUN commands during build.
	//
	// Support docker API 1.25+.
	// Experimental.
	NetworkMode awsecrassets.NetworkMode `field:"optional" json:"networkMode" yaml:"networkMode"`
	// Platform to build for.
	//
	// _Requires Docker Buildx_.
	// Experimental.
	Platform awsecrassets.Platform `field:"optional" json:"platform" yaml:"platform"`
	// ECR repository name.
	//
	// Specify this property if you need to statically address the image, e.g.
	// from a Kubernetes Pod. Note, this is only the repository name, without the
	// registry and the tag parts.
	// Deprecated: to control the location of docker image assets, please override
	// `Stack.addDockerImageAsset`. this feature will be removed in future
	// releases.
	RepositoryName *string `field:"optional" json:"repositoryName" yaml:"repositoryName"`
	// Docker target to build to.
	// Experimental.
	Target *string `field:"optional" json:"target" yaml:"target"`
}

The properties for building an AssetImage.

Example:

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

var networkMode networkMode
var platform platform

assetImageProps := &assetImageProps{
	buildArgs: map[string]*string{
		"buildArgsKey": jsii.String("buildArgs"),
	},
	exclude: []*string{
		jsii.String("exclude"),
	},
	extraHash: jsii.String("extraHash"),
	file: jsii.String("file"),
	follow: awscdk.Assets.followMode_NEVER,
	followSymlinks: monocdk.symlinkFollowMode_NEVER,
	ignoreMode: monocdk.ignoreMode_GLOB,
	invalidation: &dockerImageAssetInvalidationOptions{
		buildArgs: jsii.Boolean(false),
		extraHash: jsii.Boolean(false),
		file: jsii.Boolean(false),
		networkMode: jsii.Boolean(false),
		platform: jsii.Boolean(false),
		repositoryName: jsii.Boolean(false),
		target: jsii.Boolean(false),
	},
	networkMode: networkMode,
	platform: platform,
	repositoryName: jsii.String("repositoryName"),
	target: jsii.String("target"),
}

Experimental.

type AssociateCloudMapServiceOptions

type AssociateCloudMapServiceOptions struct {
	// The cloudmap service to register with.
	// Experimental.
	Service awsservicediscovery.IService `field:"required" json:"service" yaml:"service"`
	// The container to point to for a SRV record.
	// Experimental.
	Container ContainerDefinition `field:"optional" json:"container" yaml:"container"`
	// The port to point to for a SRV record.
	// Experimental.
	ContainerPort *float64 `field:"optional" json:"containerPort" yaml:"containerPort"`
}

The options for using a cloudmap service.

Example:

var cloudMapService service
var ecsService fargateService

ecsService.associateCloudMapService(&associateCloudMapServiceOptions{
	service: cloudMapService,
})

Experimental.

type AuthorizationConfig

type AuthorizationConfig struct {
	// The access point ID to use.
	//
	// If an access point is specified, the root directory value will be
	// relative to the directory set for the access point.
	// If specified, transit encryption must be enabled in the EFSVolumeConfiguration.
	// Experimental.
	AccessPointId *string `field:"optional" json:"accessPointId" yaml:"accessPointId"`
	// Whether or not to use the Amazon ECS task IAM role defined in a task definition when mounting the Amazon EFS file system.
	//
	// If enabled, transit encryption must be enabled in the EFSVolumeConfiguration.
	//
	// Valid values: ENABLED | DISABLED.
	// Experimental.
	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"

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

Experimental.

type AwsLogDriver

type AwsLogDriver interface {
	LogDriver
	// The log group to send log streams to.
	//
	// Only available after the LogDriver has been bound to a ContainerDefinition.
	// Experimental.
	LogGroup() awslogs.ILogGroup
	// Experimental.
	SetLogGroup(val awslogs.ILogGroup)
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(scope awscdk.Construct, containerDefinition ContainerDefinition) *LogDriverConfig
}

A log driver that sends log information to CloudWatch Logs.

Example:

var cluster cluster

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromAsset(path.resolve(__dirname, jsii.String(".."), jsii.String("eventhandler-image"))),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.NewAwsLogDriver(&awsLogDriverProps{
		streamPrefix: jsii.String("EventDemo"),
		mode: ecs.awsLogDriverMode_NON_BLOCKING,
	}),
})

// An Rule that describes the event trigger (in this case a scheduled run)
rule := events.NewRule(this, jsii.String("Rule"), &ruleProps{
	schedule: events.schedule.expression(jsii.String("rate(1 min)")),
})

// Pass an environment variable to the container 'TheContainer' in the task
rule.addTarget(targets.NewEcsTask(&ecsTaskProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	taskCount: jsii.Number(1),
	containerOverrides: []containerOverride{
		&containerOverride{
			containerName: jsii.String("TheContainer"),
			environment: []taskEnvironmentVariable{
				&taskEnvironmentVariable{
					name: jsii.String("I_WAS_TRIGGERED"),
					value: jsii.String("From CloudWatch Events"),
				},
			},
		},
	},
}))

Experimental.

func NewAwsLogDriver

func NewAwsLogDriver(props *AwsLogDriverProps) AwsLogDriver

Constructs a new instance of the AwsLogDriver class. Experimental.

type AwsLogDriverMode

type AwsLogDriverMode string

awslogs provides two modes for delivering messages from the container to the log driver.

Example:

var cluster cluster

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromAsset(path.resolve(__dirname, jsii.String(".."), jsii.String("eventhandler-image"))),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.NewAwsLogDriver(&awsLogDriverProps{
		streamPrefix: jsii.String("EventDemo"),
		mode: ecs.awsLogDriverMode_NON_BLOCKING,
	}),
})

// An Rule that describes the event trigger (in this case a scheduled run)
rule := events.NewRule(this, jsii.String("Rule"), &ruleProps{
	schedule: events.schedule.expression(jsii.String("rate(1 min)")),
})

// Pass an environment variable to the container 'TheContainer' in the task
rule.addTarget(targets.NewEcsTask(&ecsTaskProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	taskCount: jsii.Number(1),
	containerOverrides: []containerOverride{
		&containerOverride{
			containerName: jsii.String("TheContainer"),
			environment: []taskEnvironmentVariable{
				&taskEnvironmentVariable{
					name: jsii.String("I_WAS_TRIGGERED"),
					value: jsii.String("From CloudWatch Events"),
				},
			},
		},
	},
}))

Experimental.

const (
	// (default) direct, blocking delivery from container to driver.
	// Experimental.
	AwsLogDriverMode_BLOCKING AwsLogDriverMode = "BLOCKING"
	// The non-blocking message delivery mode prevents applications from blocking due to logging back pressure.
	//
	// Applications are likely to fail in unexpected ways when STDERR or STDOUT streams block.
	// Experimental.
	AwsLogDriverMode_NON_BLOCKING AwsLogDriverMode = "NON_BLOCKING"
)

type AwsLogDriverProps

type AwsLogDriverProps struct {
	// Prefix for the log streams.
	//
	// The awslogs-stream-prefix option allows you to associate a log stream
	// with the specified prefix, the container name, and the ID of the Amazon
	// ECS task to which the container belongs. If you specify a prefix with
	// this option, then the log stream takes the following format:
	//
	// prefix-name/container-name/ecs-task-id.
	// Experimental.
	StreamPrefix *string `field:"required" json:"streamPrefix" yaml:"streamPrefix"`
	// This option defines a multiline start pattern in Python strftime format.
	//
	// A log message consists of a line that matches the pattern and any
	// following lines that don’t match the pattern. Thus the matched line is
	// the delimiter between log messages.
	// Experimental.
	DatetimeFormat *string `field:"optional" json:"datetimeFormat" yaml:"datetimeFormat"`
	// The log group to log to.
	// Experimental.
	LogGroup awslogs.ILogGroup `field:"optional" json:"logGroup" yaml:"logGroup"`
	// The number of days log events are kept in CloudWatch Logs when the log group is automatically created by this construct.
	// Experimental.
	LogRetention awslogs.RetentionDays `field:"optional" json:"logRetention" yaml:"logRetention"`
	// The delivery mode of log messages from the container to awslogs.
	// Experimental.
	Mode AwsLogDriverMode `field:"optional" json:"mode" yaml:"mode"`
	// This option defines a multiline start pattern using a regular expression.
	//
	// A log message consists of a line that matches the pattern and any
	// following lines that don’t match the pattern. Thus the matched line is
	// the delimiter between log messages.
	//
	// This option is ignored if datetimeFormat is also configured.
	// Experimental.
	MultilinePattern *string `field:"optional" json:"multilinePattern" yaml:"multilinePattern"`
}

Specifies the awslogs log driver configuration options.

Example:

// Create a Task Definition for the Windows container to start
taskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	runtimePlatform: &runtimePlatform{
		operatingSystemFamily: ecs.operatingSystemFamily_WINDOWS_SERVER_2019_CORE(),
		cpuArchitecture: ecs.cpuArchitecture_X86_64(),
	},
	cpu: jsii.Number(1024),
	memoryLimitMiB: jsii.Number(2048),
})

taskDefinition.addContainer(jsii.String("windowsservercore"), &containerDefinitionOptions{
	logging: ecs.logDriver.awsLogs(&awsLogDriverProps{
		streamPrefix: jsii.String("win-iis-on-fargate"),
	}),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(80),
		},
	},
	image: ecs.containerImage.fromRegistry(jsii.String("mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019")),
})

Experimental.

type BaseLogDriverProps

type BaseLogDriverProps struct {
	// The env option takes an array of keys.
	//
	// If there is collision between
	// label and env keys, the value of the env takes precedence. Adds additional fields
	// to the extra attributes of a logging message.
	// Experimental.
	Env *[]*string `field:"optional" json:"env" yaml:"env"`
	// The env-regex option is similar to and compatible with env.
	//
	// Its value is a regular
	// expression to match logging-related environment variables. It is used for advanced
	// log tag options.
	// Experimental.
	EnvRegex *string `field:"optional" json:"envRegex" yaml:"envRegex"`
	// The labels option takes an array of keys.
	//
	// If there is collision
	// between label and env keys, the value of the env takes precedence. Adds additional
	// fields to the extra attributes of a logging message.
	// Experimental.
	Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
	// By default, Docker uses the first 12 characters of the container ID to tag log messages.
	//
	// Refer to the log tag option documentation for customizing the
	// log tag format.
	// Experimental.
	Tag *string `field:"optional" json:"tag" yaml:"tag"`
}

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"

baseLogDriverProps := &baseLogDriverProps{
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	labels: []*string{
		jsii.String("labels"),
	},
	tag: jsii.String("tag"),
}

Experimental.

type BaseService

type BaseService interface {
	awscdk.Resource
	IBaseService
	awselasticloadbalancing.ILoadBalancerTarget
	awselasticloadbalancingv2.IApplicationLoadBalancerTarget
	awselasticloadbalancingv2.INetworkLoadBalancerTarget
	// The details of the AWS Cloud Map service.
	// Experimental.
	CloudmapService() awsservicediscovery.Service
	// Experimental.
	SetCloudmapService(val awsservicediscovery.Service)
	// The CloudMap service created for this service, if any.
	// Experimental.
	CloudMapService() awsservicediscovery.IService
	// The cluster that hosts the service.
	// Experimental.
	Cluster() ICluster
	// The security groups which manage the allowed network traffic for the service.
	// Experimental.
	Connections() awsec2.Connections
	// 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
	// A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
	// Experimental.
	LoadBalancers() *[]*CfnService_LoadBalancerProperty
	// Experimental.
	SetLoadBalancers(val *[]*CfnService_LoadBalancerProperty)
	// A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
	// Experimental.
	NetworkConfiguration() *CfnService_NetworkConfigurationProperty
	// Experimental.
	SetNetworkConfiguration(val *CfnService_NetworkConfigurationProperty)
	// 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 Amazon Resource Name (ARN) of the service.
	// Experimental.
	ServiceArn() *string
	// The name of the service.
	// Experimental.
	ServiceName() *string
	// The details of the service discovery registries to assign to this service.
	//
	// For more information, see Service Discovery.
	// Experimental.
	ServiceRegistries() *[]*CfnService_ServiceRegistryProperty
	// Experimental.
	SetServiceRegistries(val *[]*CfnService_ServiceRegistryProperty)
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The task definition to use for tasks in the service.
	// Experimental.
	TaskDefinition() TaskDefinition
	// 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)
	// Associates this service with a CloudMap service.
	// Experimental.
	AssociateCloudMapService(options *AssociateCloudMapServiceOptions)
	// This method is called to attach this service to an Application Load Balancer.
	//
	// Don't call this function directly. Instead, call `listener.addTargets()`
	// to add this service to a load balancer.
	// Experimental.
	AttachToApplicationTargetGroup(targetGroup awselasticloadbalancingv2.IApplicationTargetGroup) *awselasticloadbalancingv2.LoadBalancerTargetProps
	// Registers the service as a target of a Classic Load Balancer (CLB).
	//
	// Don't call this. Call `loadBalancer.addTarget()` instead.
	// Experimental.
	AttachToClassicLB(loadBalancer awselasticloadbalancing.LoadBalancer)
	// This method is called to attach this service to a Network Load Balancer.
	//
	// Don't call this function directly. Instead, call `listener.addTargets()`
	// to add this service to a load balancer.
	// Experimental.
	AttachToNetworkTargetGroup(targetGroup awselasticloadbalancingv2.INetworkTargetGroup) *awselasticloadbalancingv2.LoadBalancerTargetProps
	// An attribute representing the minimum and maximum task count for an AutoScalingGroup.
	// Experimental.
	AutoScaleTaskCount(props *awsapplicationautoscaling.EnableScalingProps) ScalableTaskCount
	// This method is called to create a networkConfiguration.
	// Deprecated: use configureAwsVpcNetworkingWithSecurityGroups instead.
	ConfigureAwsVpcNetworking(vpc awsec2.IVpc, assignPublicIp *bool, vpcSubnets *awsec2.SubnetSelection, securityGroup awsec2.ISecurityGroup)
	// This method is called to create a networkConfiguration.
	// Experimental.
	ConfigureAwsVpcNetworkingWithSecurityGroups(vpc awsec2.IVpc, assignPublicIp *bool, vpcSubnets *awsec2.SubnetSelection, securityGroups *[]awsec2.ISecurityGroup)
	// Enable CloudMap service discovery for the service.
	//
	// Returns: The created CloudMap service.
	// Experimental.
	EnableCloudMap(options *CloudMapOptions) awsservicediscovery.Service
	// 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
	// Return a load balancing target for a specific container and port.
	//
	// Use this function to create a load balancer target if you want to load balance to
	// another container than the first essential container or the first mapped port on
	// the container.
	//
	// Use the return value of this function where you would normally use a load balancer
	// target, instead of the `Service` object itself.
	//
	// Example:
	//   var listener applicationListener
	//   var service baseService
	//
	//   listener.addTargets(jsii.String("ECS"), &addApplicationTargetsProps{
	//   	port: jsii.Number(80),
	//   	targets: []iApplicationLoadBalancerTarget{
	//   		service.loadBalancerTarget(&loadBalancerTargetOptions{
	//   			containerName: jsii.String("MyContainer"),
	//   			containerPort: jsii.Number(1234),
	//   		}),
	//   	},
	//   })
	//
	// Experimental.
	LoadBalancerTarget(options *LoadBalancerTargetOptions) IEcsLoadBalancerTarget
	// This method returns the specified CloudWatch metric name for this service.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this service's CPU utilization.
	// Experimental.
	MetricCpuUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this service's memory utilization.
	// Experimental.
	MetricMemoryUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// 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()
	// Use this function to create all load balancer targets to be registered in this service, add them to target groups, and attach target groups to listeners accordingly.
	//
	// Alternatively, you can use `listener.addTargets()` to create targets and add them to target groups.
	//
	// Example:
	//   var listener applicationListener
	//   var service baseService
	//
	//   service.registerLoadBalancerTargets(&ecsTarget{
	//   	containerName: jsii.String("web"),
	//   	containerPort: jsii.Number(80),
	//   	newTargetGroupId: jsii.String("ECS"),
	//   	listener: ecs.listenerConfig.applicationListener(listener, &addApplicationTargetsProps{
	//   		protocol: elbv2.applicationProtocol_HTTPS,
	//   	}),
	//   })
	//
	// Experimental.
	RegisterLoadBalancerTargets(targets ...*EcsTarget)
	// 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
}

The base class for Ec2Service and FargateService services.

Example:

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

service := ecs.baseService.fromServiceArnWithCluster(this, jsii.String("EcsService"), jsii.String("arn:aws:ecs:us-east-1:123456789012:service/myClusterName/myServiceName"))
pipeline := codepipeline.NewPipeline(this, jsii.String("MyPipeline"))
buildOutput := codepipeline.NewArtifact()
// add source and build stages to the pipeline as usual...
deployStage := pipeline.addStage(&stageOptions{
	stageName: jsii.String("Deploy"),
	actions: []iAction{
		codepipeline_actions.NewEcsDeployAction(&ecsDeployActionProps{
			actionName: jsii.String("DeployAction"),
			service: service,
			input: buildOutput,
		}),
	},
})

Experimental.

type BaseServiceOptions

type BaseServiceOptions struct {
	// The name of the cluster that hosts the service.
	// Experimental.
	Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"`
	// A list of Capacity Provider strategies used to place a service.
	// Experimental.
	CapacityProviderStrategies *[]*CapacityProviderStrategy `field:"optional" json:"capacityProviderStrategies" yaml:"capacityProviderStrategies"`
	// Whether to enable the deployment circuit breaker.
	//
	// If this property is defined, circuit breaker will be implicitly
	// enabled.
	// Experimental.
	CircuitBreaker *DeploymentCircuitBreaker `field:"optional" json:"circuitBreaker" yaml:"circuitBreaker"`
	// The options for configuring an Amazon ECS service to use service discovery.
	// Experimental.
	CloudMapOptions *CloudMapOptions `field:"optional" json:"cloudMapOptions" yaml:"cloudMapOptions"`
	// Specifies which deployment controller to use for the service.
	//
	// For more information, see
	// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
	// Experimental.
	DeploymentController *DeploymentController `field:"optional" json:"deploymentController" yaml:"deploymentController"`
	// The desired number of instantiations of the task definition to keep running on the service.
	// Experimental.
	DesiredCount *float64 `field:"optional" json:"desiredCount" yaml:"desiredCount"`
	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
	//
	// For more information, see
	// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
	// Experimental.
	EnableECSManagedTags *bool `field:"optional" json:"enableECSManagedTags" yaml:"enableECSManagedTags"`
	// Whether to enable the ability to execute into a container.
	// Experimental.
	EnableExecuteCommand *bool `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"`
	// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
	// Experimental.
	HealthCheckGracePeriod awscdk.Duration `field:"optional" json:"healthCheckGracePeriod" yaml:"healthCheckGracePeriod"`
	// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
	// Experimental.
	MaxHealthyPercent *float64 `field:"optional" json:"maxHealthyPercent" yaml:"maxHealthyPercent"`
	// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
	// Experimental.
	MinHealthyPercent *float64 `field:"optional" json:"minHealthyPercent" yaml:"minHealthyPercent"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE
	// Experimental.
	PropagateTags PropagatedTagSource `field:"optional" json:"propagateTags" yaml:"propagateTags"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Tags can only be propagated to the tasks within the service during service creation.
	// Deprecated: Use `propagateTags` instead.
	PropagateTaskTagsFrom PropagatedTagSource `field:"optional" json:"propagateTaskTagsFrom" yaml:"propagateTaskTagsFrom"`
	// The name of the service.
	// Experimental.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
}

The properties for the base Ec2Service or FargateService service.

Example:

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

var cluster cluster
var containerDefinition containerDefinition
var duration duration
var namespace iNamespace

baseServiceOptions := &baseServiceOptions{
	cluster: cluster,

	// the properties below are optional
	capacityProviderStrategies: []capacityProviderStrategy{
		&capacityProviderStrategy{
			capacityProvider: jsii.String("capacityProvider"),

			// the properties below are optional
			base: jsii.Number(123),
			weight: jsii.Number(123),
		},
	},
	circuitBreaker: &deploymentCircuitBreaker{
		rollback: jsii.Boolean(false),
	},
	cloudMapOptions: &cloudMapOptions{
		cloudMapNamespace: namespace,
		container: containerDefinition,
		containerPort: jsii.Number(123),
		dnsRecordType: awscdk.Aws_servicediscovery.dnsRecordType_A,
		dnsTtl: duration,
		failureThreshold: jsii.Number(123),
		name: jsii.String("name"),
	},
	deploymentController: &deploymentController{
		type: awscdk.Aws_ecs.deploymentControllerType_ECS,
	},
	desiredCount: jsii.Number(123),
	enableECSManagedTags: jsii.Boolean(false),
	enableExecuteCommand: jsii.Boolean(false),
	healthCheckGracePeriod: duration,
	maxHealthyPercent: jsii.Number(123),
	minHealthyPercent: jsii.Number(123),
	propagateTags: awscdk.*Aws_ecs.propagatedTagSource_SERVICE,
	propagateTaskTagsFrom: awscdk.*Aws_ecs.*propagatedTagSource_SERVICE,
	serviceName: jsii.String("serviceName"),
}

Experimental.

type BaseServiceProps

type BaseServiceProps struct {
	// The name of the cluster that hosts the service.
	// Experimental.
	Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"`
	// A list of Capacity Provider strategies used to place a service.
	// Experimental.
	CapacityProviderStrategies *[]*CapacityProviderStrategy `field:"optional" json:"capacityProviderStrategies" yaml:"capacityProviderStrategies"`
	// Whether to enable the deployment circuit breaker.
	//
	// If this property is defined, circuit breaker will be implicitly
	// enabled.
	// Experimental.
	CircuitBreaker *DeploymentCircuitBreaker `field:"optional" json:"circuitBreaker" yaml:"circuitBreaker"`
	// The options for configuring an Amazon ECS service to use service discovery.
	// Experimental.
	CloudMapOptions *CloudMapOptions `field:"optional" json:"cloudMapOptions" yaml:"cloudMapOptions"`
	// Specifies which deployment controller to use for the service.
	//
	// For more information, see
	// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
	// Experimental.
	DeploymentController *DeploymentController `field:"optional" json:"deploymentController" yaml:"deploymentController"`
	// The desired number of instantiations of the task definition to keep running on the service.
	// Experimental.
	DesiredCount *float64 `field:"optional" json:"desiredCount" yaml:"desiredCount"`
	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
	//
	// For more information, see
	// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
	// Experimental.
	EnableECSManagedTags *bool `field:"optional" json:"enableECSManagedTags" yaml:"enableECSManagedTags"`
	// Whether to enable the ability to execute into a container.
	// Experimental.
	EnableExecuteCommand *bool `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"`
	// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
	// Experimental.
	HealthCheckGracePeriod awscdk.Duration `field:"optional" json:"healthCheckGracePeriod" yaml:"healthCheckGracePeriod"`
	// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
	// Experimental.
	MaxHealthyPercent *float64 `field:"optional" json:"maxHealthyPercent" yaml:"maxHealthyPercent"`
	// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
	// Experimental.
	MinHealthyPercent *float64 `field:"optional" json:"minHealthyPercent" yaml:"minHealthyPercent"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE
	// Experimental.
	PropagateTags PropagatedTagSource `field:"optional" json:"propagateTags" yaml:"propagateTags"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Tags can only be propagated to the tasks within the service during service creation.
	// Deprecated: Use `propagateTags` instead.
	PropagateTaskTagsFrom PropagatedTagSource `field:"optional" json:"propagateTaskTagsFrom" yaml:"propagateTaskTagsFrom"`
	// The name of the service.
	// Experimental.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
	// The launch type on which to run your service.
	//
	// LaunchType will be omitted if capacity provider strategies are specified on the service.
	// See: - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-capacityproviderstrategy
	//
	// Valid values are: LaunchType.ECS or LaunchType.FARGATE or LaunchType.EXTERNAL
	//
	// Experimental.
	LaunchType LaunchType `field:"required" json:"launchType" yaml:"launchType"`
}

Complete base service properties that are required to be supplied by the implementation of the BaseService class.

Example:

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

var cluster cluster
var containerDefinition containerDefinition
var duration duration
var namespace iNamespace

baseServiceProps := &baseServiceProps{
	cluster: cluster,
	launchType: awscdk.Aws_ecs.launchType_EC2,

	// the properties below are optional
	capacityProviderStrategies: []capacityProviderStrategy{
		&capacityProviderStrategy{
			capacityProvider: jsii.String("capacityProvider"),

			// the properties below are optional
			base: jsii.Number(123),
			weight: jsii.Number(123),
		},
	},
	circuitBreaker: &deploymentCircuitBreaker{
		rollback: jsii.Boolean(false),
	},
	cloudMapOptions: &cloudMapOptions{
		cloudMapNamespace: namespace,
		container: containerDefinition,
		containerPort: jsii.Number(123),
		dnsRecordType: awscdk.Aws_servicediscovery.dnsRecordType_A,
		dnsTtl: duration,
		failureThreshold: jsii.Number(123),
		name: jsii.String("name"),
	},
	deploymentController: &deploymentController{
		type: awscdk.*Aws_ecs.deploymentControllerType_ECS,
	},
	desiredCount: jsii.Number(123),
	enableECSManagedTags: jsii.Boolean(false),
	enableExecuteCommand: jsii.Boolean(false),
	healthCheckGracePeriod: duration,
	maxHealthyPercent: jsii.Number(123),
	minHealthyPercent: jsii.Number(123),
	propagateTags: awscdk.*Aws_ecs.propagatedTagSource_SERVICE,
	propagateTaskTagsFrom: awscdk.*Aws_ecs.*propagatedTagSource_SERVICE,
	serviceName: jsii.String("serviceName"),
}

Experimental.

type BinPackResource

type BinPackResource string

Instance resource used for bin packing. Experimental.

const (
	// Fill up hosts' CPU allocations first.
	// Experimental.
	BinPackResource_CPU BinPackResource = "CPU"
	// Fill up hosts' memory allocations first.
	// Experimental.
	BinPackResource_MEMORY BinPackResource = "MEMORY"
)

type BottleRocketImage

type BottleRocketImage interface {
	awsec2.IMachineImage
	// Return the correct image.
	// Experimental.
	GetImage(scope awscdk.Construct) *awsec2.MachineImageConfig
}

Construct an Bottlerocket image from the latest AMI published in SSM.

Example:

var cluster cluster

cluster.addCapacity(jsii.String("bottlerocket-asg"), &addCapacityOptions{
	minCapacity: jsii.Number(2),
	instanceType: ec2.NewInstanceType(jsii.String("c5.large")),
	machineImage: ecs.NewBottleRocketImage(),
})

Experimental.

func NewBottleRocketImage

func NewBottleRocketImage(props *BottleRocketImageProps) BottleRocketImage

Constructs a new instance of the BottleRocketImage class. Experimental.

type BottleRocketImageProps

type BottleRocketImageProps struct {
	// The CPU architecture.
	// Experimental.
	Architecture awsec2.InstanceArchitecture `field:"optional" json:"architecture" yaml:"architecture"`
	// Whether the AMI ID is cached to be stable between deployments.
	//
	// By default, the newest image is used on each deployment. This will cause
	// instances to be replaced whenever a new version is released, and may cause
	// downtime if there aren't enough running instances in the AutoScalingGroup
	// to reschedule the tasks on.
	//
	// If set to true, the AMI ID will be cached in `cdk.context.json` and the
	// same value will be used on future runs. Your instances will not be replaced
	// but your AMI version will grow old over time. To refresh the AMI lookup,
	// you will have to evict the value from the cache using the `cdk context`
	// command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for
	// more information.
	//
	// Can not be set to `true` in environment-agnostic stacks.
	// Experimental.
	CachedInContext *bool `field:"optional" json:"cachedInContext" yaml:"cachedInContext"`
	// The Amazon ECS variant to use.
	//
	// Only `aws-ecs-1` is currently available.
	// Experimental.
	Variant BottlerocketEcsVariant `field:"optional" json:"variant" yaml:"variant"`
}

Properties for BottleRocketImage.

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"
import "github.com/aws/aws-cdk-go/awscdk"

bottleRocketImageProps := &bottleRocketImageProps{
	architecture: awscdk.Aws_ec2.instanceArchitecture_ARM_64,
	cachedInContext: jsii.Boolean(false),
	variant: awscdk.Aws_ecs.bottlerocketEcsVariant_AWS_ECS_1,
}

Experimental.

type BottlerocketEcsVariant

type BottlerocketEcsVariant string

Amazon ECS variant. Experimental.

const (
	// aws-ecs-1 variant.
	// Experimental.
	BottlerocketEcsVariant_AWS_ECS_1 BottlerocketEcsVariant = "AWS_ECS_1"
)

type BuiltInAttributes

type BuiltInAttributes interface {
}

The built-in container instance attributes.

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"

builtInAttributes := awscdk.Aws_ecs.NewBuiltInAttributes()

Experimental.

func NewBuiltInAttributes

func NewBuiltInAttributes() BuiltInAttributes

Experimental.

type Capability

type Capability string

A Linux capability. Experimental.

const (
	// Experimental.
	Capability_ALL Capability = "ALL"
	// Experimental.
	Capability_AUDIT_CONTROL Capability = "AUDIT_CONTROL"
	// Experimental.
	Capability_AUDIT_WRITE Capability = "AUDIT_WRITE"
	// Experimental.
	Capability_BLOCK_SUSPEND Capability = "BLOCK_SUSPEND"
	// Experimental.
	Capability_CHOWN Capability = "CHOWN"
	// Experimental.
	Capability_DAC_OVERRIDE Capability = "DAC_OVERRIDE"
	// Experimental.
	Capability_DAC_READ_SEARCH Capability = "DAC_READ_SEARCH"
	// Experimental.
	Capability_FOWNER Capability = "FOWNER"
	// Experimental.
	Capability_FSETID Capability = "FSETID"
	// Experimental.
	Capability_IPC_LOCK Capability = "IPC_LOCK"
	// Experimental.
	Capability_IPC_OWNER Capability = "IPC_OWNER"
	// Experimental.
	Capability_KILL Capability = "KILL"
	// Experimental.
	Capability_LEASE Capability = "LEASE"
	// Experimental.
	Capability_LINUX_IMMUTABLE Capability = "LINUX_IMMUTABLE"
	// Experimental.
	Capability_MAC_ADMIN Capability = "MAC_ADMIN"
	// Experimental.
	Capability_MAC_OVERRIDE Capability = "MAC_OVERRIDE"
	// Experimental.
	Capability_MKNOD Capability = "MKNOD"
	// Experimental.
	Capability_NET_ADMIN Capability = "NET_ADMIN"
	// Experimental.
	Capability_NET_BIND_SERVICE Capability = "NET_BIND_SERVICE"
	// Experimental.
	Capability_NET_BROADCAST Capability = "NET_BROADCAST"
	// Experimental.
	Capability_NET_RAW Capability = "NET_RAW"
	// Experimental.
	Capability_SETFCAP Capability = "SETFCAP"
	// Experimental.
	Capability_SETGID Capability = "SETGID"
	// Experimental.
	Capability_SETPCAP Capability = "SETPCAP"
	// Experimental.
	Capability_SETUID Capability = "SETUID"
	// Experimental.
	Capability_SYS_ADMIN Capability = "SYS_ADMIN"
	// Experimental.
	Capability_SYS_BOOT Capability = "SYS_BOOT"
	// Experimental.
	Capability_SYS_CHROOT Capability = "SYS_CHROOT"
	// Experimental.
	Capability_SYS_MODULE Capability = "SYS_MODULE"
	// Experimental.
	Capability_SYS_NICE Capability = "SYS_NICE"
	// Experimental.
	Capability_SYS_PACCT Capability = "SYS_PACCT"
	// Experimental.
	Capability_SYS_PTRACE Capability = "SYS_PTRACE"
	// Experimental.
	Capability_SYS_RAWIO Capability = "SYS_RAWIO"
	// Experimental.
	Capability_SYS_RESOURCE Capability = "SYS_RESOURCE"
	// Experimental.
	Capability_SYS_TIME Capability = "SYS_TIME"
	// Experimental.
	Capability_SYS_TTY_CONFIG Capability = "SYS_TTY_CONFIG"
	// Experimental.
	Capability_SYSLOG Capability = "SYSLOG"
	// Experimental.
	Capability_WAKE_ALARM Capability = "WAKE_ALARM"
)

type CapacityProviderStrategy

type CapacityProviderStrategy struct {
	// The name of the capacity provider.
	// Experimental.
	CapacityProvider *string `field:"required" json:"capacityProvider" yaml:"capacityProvider"`
	// The base value designates how many tasks, at a minimum, to run on the specified capacity provider.
	//
	// Only one
	// capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default
	// value of 0 is used.
	// Experimental.
	Base *float64 `field:"optional" json:"base" yaml:"base"`
	// The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.
	//
	// The weight value is taken into consideration after the base value, if defined, is satisfied.
	// Experimental.
	Weight *float64 `field:"optional" json:"weight" yaml:"weight"`
}

A Capacity Provider strategy to use for the service.

NOTE: defaultCapacityProviderStrategy on cluster not currently supported.

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"

capacityProviderStrategy := &capacityProviderStrategy{
	capacityProvider: jsii.String("capacityProvider"),

	// the properties below are optional
	base: jsii.Number(123),
	weight: jsii.Number(123),
}

Experimental.

type CfnCapacityProvider

type CfnCapacityProvider interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The Auto Scaling group settings for the capacity provider.
	AutoScalingGroupProvider() interface{}
	SetAutoScalingGroupProvider(val interface{})
	// 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 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 capacity provider.
	//
	// If a name is specified, it cannot start with `aws` , `ecs` , or `fargate` . If no name is specified, a default name in the `CFNStackName-CFNResourceName-RandomString` format is used.
	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 metadata that you apply to the capacity provider to help you categorize and organize it.
	//
	// Each tag consists of a key and an optional value. You define both.
	//
	// The following basic restrictions apply to tags:
	//
	// - Maximum number of tags per resource - 50
	// - For each resource, each tag key must be unique, and each tag key can have only one value.
	// - Maximum key length - 128 Unicode characters in UTF-8
	// - Maximum value length - 256 Unicode characters in UTF-8
	// - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
	// - Tag keys and values are case-sensitive.
	// - Do not use `aws:` , `AWS:` , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
	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::ECS::CapacityProvider`.

The `AWS::ECS::CapacityProvider` resource creates an Amazon Elastic Container Service (Amazon ECS) capacity provider. Capacity providers are associated with an Amazon ECS cluster and are used in capacity provider strategies to facilitate cluster auto scaling.

Only capacity providers using an Auto Scaling group can be created. Amazon ECS tasks on AWS Fargate use the `FARGATE` and `FARGATE_SPOT` capacity providers which are already created and available to all accounts in Regions supported by AWS Fargate .

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"

cfnCapacityProvider := awscdk.Aws_ecs.NewCfnCapacityProvider(this, jsii.String("MyCfnCapacityProvider"), &cfnCapacityProviderProps{
	autoScalingGroupProvider: &autoScalingGroupProviderProperty{
		autoScalingGroupArn: jsii.String("autoScalingGroupArn"),

		// the properties below are optional
		managedScaling: &managedScalingProperty{
			instanceWarmupPeriod: jsii.Number(123),
			maximumScalingStepSize: jsii.Number(123),
			minimumScalingStepSize: jsii.Number(123),
			status: jsii.String("status"),
			targetCapacity: jsii.Number(123),
		},
		managedTerminationProtection: jsii.String("managedTerminationProtection"),
	},

	// the properties below are optional
	name: jsii.String("name"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
})

func NewCfnCapacityProvider

func NewCfnCapacityProvider(scope awscdk.Construct, id *string, props *CfnCapacityProviderProps) CfnCapacityProvider

Create a new `AWS::ECS::CapacityProvider`.

type CfnCapacityProviderProps

type CfnCapacityProviderProps struct {
	// The Auto Scaling group settings for the capacity provider.
	AutoScalingGroupProvider interface{} `field:"required" json:"autoScalingGroupProvider" yaml:"autoScalingGroupProvider"`
	// The name of the capacity provider.
	//
	// If a name is specified, it cannot start with `aws` , `ecs` , or `fargate` . If no name is specified, a default name in the `CFNStackName-CFNResourceName-RandomString` format is used.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The metadata that you apply to the capacity provider to help you categorize and organize it.
	//
	// Each tag consists of a key and an optional value. You define both.
	//
	// The following basic restrictions apply to tags:
	//
	// - Maximum number of tags per resource - 50
	// - For each resource, each tag key must be unique, and each tag key can have only one value.
	// - Maximum key length - 128 Unicode characters in UTF-8
	// - Maximum value length - 256 Unicode characters in UTF-8
	// - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
	// - Tag keys and values are case-sensitive.
	// - Do not use `aws:` , `AWS:` , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `CfnCapacityProvider`.

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"

cfnCapacityProviderProps := &cfnCapacityProviderProps{
	autoScalingGroupProvider: &autoScalingGroupProviderProperty{
		autoScalingGroupArn: jsii.String("autoScalingGroupArn"),

		// the properties below are optional
		managedScaling: &managedScalingProperty{
			instanceWarmupPeriod: jsii.Number(123),
			maximumScalingStepSize: jsii.Number(123),
			minimumScalingStepSize: jsii.Number(123),
			status: jsii.String("status"),
			targetCapacity: jsii.Number(123),
		},
		managedTerminationProtection: jsii.String("managedTerminationProtection"),
	},

	// the properties below are optional
	name: jsii.String("name"),
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
}

type CfnCapacityProvider_AutoScalingGroupProviderProperty

type CfnCapacityProvider_AutoScalingGroupProviderProperty struct {
	// The Amazon Resource Name (ARN) or short name that identifies the Auto Scaling group.
	AutoScalingGroupArn *string `field:"required" json:"autoScalingGroupArn" yaml:"autoScalingGroupArn"`
	// The managed scaling settings for the Auto Scaling group capacity provider.
	ManagedScaling interface{} `field:"optional" json:"managedScaling" yaml:"managedScaling"`
	// The managed termination protection setting to use for the Auto Scaling group capacity provider.
	//
	// This determines whether the Auto Scaling group has managed termination protection. The default is disabled.
	//
	// > When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn't work.
	//
	// When managed termination protection is enabled, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions enabled as well. For more information, see [Instance Protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) in the *AWS Auto Scaling User Guide* .
	//
	// When managed termination protection is disabled, your Amazon EC2 instances aren't protected from termination when the Auto Scaling group scales in.
	ManagedTerminationProtection *string `field:"optional" json:"managedTerminationProtection" yaml:"managedTerminationProtection"`
}

The `AutoScalingGroupProvider` property specifies the details of the Auto Scaling group for the capacity provider.

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"

autoScalingGroupProviderProperty := &autoScalingGroupProviderProperty{
	autoScalingGroupArn: jsii.String("autoScalingGroupArn"),

	// the properties below are optional
	managedScaling: &managedScalingProperty{
		instanceWarmupPeriod: jsii.Number(123),
		maximumScalingStepSize: jsii.Number(123),
		minimumScalingStepSize: jsii.Number(123),
		status: jsii.String("status"),
		targetCapacity: jsii.Number(123),
	},
	managedTerminationProtection: jsii.String("managedTerminationProtection"),
}

type CfnCapacityProvider_ManagedScalingProperty

type CfnCapacityProvider_ManagedScalingProperty struct {
	// The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group.
	//
	// If this parameter is omitted, the default value of `300` seconds is used.
	InstanceWarmupPeriod *float64 `field:"optional" json:"instanceWarmupPeriod" yaml:"instanceWarmupPeriod"`
	// The maximum number of container instances that Amazon ECS scales in or scales out at one time.
	//
	// If this parameter is omitted, the default value of `10000` is used.
	MaximumScalingStepSize *float64 `field:"optional" json:"maximumScalingStepSize" yaml:"maximumScalingStepSize"`
	// The minimum number of container instances that Amazon ECS scales in or scales out at one time.
	//
	// If this parameter is omitted, the default value of `1` is used.
	MinimumScalingStepSize *float64 `field:"optional" json:"minimumScalingStepSize" yaml:"minimumScalingStepSize"`
	// Determines whether to use managed scaling for the capacity provider.
	Status *string `field:"optional" json:"status" yaml:"status"`
	// The target capacity value for the capacity provider.
	//
	// The specified value must be greater than `0` and less than or equal to `100` . A value of `100` results in the Amazon EC2 instances in your Auto Scaling group being completely used.
	TargetCapacity *float64 `field:"optional" json:"targetCapacity" yaml:"targetCapacity"`
}

The `ManagedScaling` property specifies the settings for the Auto Scaling group capacity provider.

When managed scaling is enabled, Amazon ECS manages the scale-in and scale-out actions of the Auto Scaling group. Amazon ECS manages a target tracking scaling policy using an Amazon ECS-managed CloudWatch metric with the specified `targetCapacity` value as the target value for the metric. For more information, see [Using Managed Scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling) in the *Amazon Elastic Container Service Developer Guide* .

If managed scaling is disabled, the user must manage the scaling of the Auto Scaling group.

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"

managedScalingProperty := &managedScalingProperty{
	instanceWarmupPeriod: jsii.Number(123),
	maximumScalingStepSize: jsii.Number(123),
	minimumScalingStepSize: jsii.Number(123),
	status: jsii.String("status"),
	targetCapacity: jsii.Number(123),
}

type CfnCluster

type CfnCluster interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The Amazon Resource Name (ARN) of the Amazon ECS cluster, such as `arn:aws:ecs:us-east-2:123456789012:cluster/MyECSCluster` .
	AttrArn() *string
	// The short name of one or more capacity providers to associate with the cluster.
	//
	// A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy.
	//
	// If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created and not already associated with another cluster.
	//
	// To use an AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.
	CapacityProviders() *[]*string
	SetCapacityProviders(val *[]*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
	// A user-generated string that you use to identify your cluster.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID for the name.
	ClusterName() *string
	SetClusterName(val *string)
	// The setting to use when creating a cluster.
	//
	// This parameter is used to enable CloudWatch Container Insights for a cluster. If this value is specified, it will override the `containerInsights` value set with [PutAccountSetting](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html) or [PutAccountSettingDefault](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html) .
	ClusterSettings() interface{}
	SetClusterSettings(val interface{})
	// The execute command configuration for the cluster.
	Configuration() interface{}
	SetConfiguration(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 default capacity provider strategy for the cluster.
	//
	// When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.
	DefaultCapacityProviderStrategy() interface{}
	SetDefaultCapacityProviderStrategy(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 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 metadata that you apply to the cluster to help you categorize and organize them.
	//
	// Each tag consists of a key and an optional value. You define both.
	//
	// The following basic restrictions apply to tags:
	//
	// - Maximum number of tags per resource - 50
	// - For each resource, each tag key must be unique, and each tag key can have only one value.
	// - Maximum key length - 128 Unicode characters in UTF-8
	// - Maximum value length - 256 Unicode characters in UTF-8
	// - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
	// - Tag keys and values are case-sensitive.
	// - Do not use `aws:` , `AWS:` , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
	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::ECS::Cluster`.

The `AWS::ECS::Cluster` resource creates an Amazon Elastic Container Service (Amazon ECS) cluster.

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"

cfnCluster := awscdk.Aws_ecs.NewCfnCluster(this, jsii.String("MyCfnCluster"), &cfnClusterProps{
	capacityProviders: []*string{
		jsii.String("capacityProviders"),
	},
	clusterName: jsii.String("clusterName"),
	clusterSettings: []interface{}{
		&clusterSettingsProperty{
			name: jsii.String("name"),
			value: jsii.String("value"),
		},
	},
	configuration: &clusterConfigurationProperty{
		executeCommandConfiguration: &executeCommandConfigurationProperty{
			kmsKeyId: jsii.String("kmsKeyId"),
			logConfiguration: &executeCommandLogConfigurationProperty{
				cloudWatchEncryptionEnabled: jsii.Boolean(false),
				cloudWatchLogGroupName: jsii.String("cloudWatchLogGroupName"),
				s3BucketName: jsii.String("s3BucketName"),
				s3EncryptionEnabled: jsii.Boolean(false),
				s3KeyPrefix: jsii.String("s3KeyPrefix"),
			},
			logging: jsii.String("logging"),
		},
	},
	defaultCapacityProviderStrategy: []interface{}{
		&capacityProviderStrategyItemProperty{
			base: jsii.Number(123),
			capacityProvider: jsii.String("capacityProvider"),
			weight: jsii.Number(123),
		},
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
})

func NewCfnCluster

func NewCfnCluster(scope awscdk.Construct, id *string, props *CfnClusterProps) CfnCluster

Create a new `AWS::ECS::Cluster`.

type CfnClusterCapacityProviderAssociations

type CfnClusterCapacityProviderAssociations interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The capacity providers to associate with the cluster.
	CapacityProviders() *[]*string
	SetCapacityProviders(val *[]*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 cluster the capacity provider association is the target of.
	Cluster() *string
	SetCluster(val *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 default capacity provider strategy to associate with the cluster.
	DefaultCapacityProviderStrategy() interface{}
	SetDefaultCapacityProviderStrategy(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 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
	// 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::ECS::ClusterCapacityProviderAssociations`.

The `AWS::ECS::ClusterCapacityProviderAssociations` resource associates one or more capacity providers and a default capacity provider strategy with a cluster.

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"

cfnClusterCapacityProviderAssociations := awscdk.Aws_ecs.NewCfnClusterCapacityProviderAssociations(this, jsii.String("MyCfnClusterCapacityProviderAssociations"), &cfnClusterCapacityProviderAssociationsProps{
	capacityProviders: []*string{
		jsii.String("capacityProviders"),
	},
	cluster: jsii.String("cluster"),
	defaultCapacityProviderStrategy: []interface{}{
		&capacityProviderStrategyProperty{
			capacityProvider: jsii.String("capacityProvider"),

			// the properties below are optional
			base: jsii.Number(123),
			weight: jsii.Number(123),
		},
	},
})

func NewCfnClusterCapacityProviderAssociations

func NewCfnClusterCapacityProviderAssociations(scope awscdk.Construct, id *string, props *CfnClusterCapacityProviderAssociationsProps) CfnClusterCapacityProviderAssociations

Create a new `AWS::ECS::ClusterCapacityProviderAssociations`.

type CfnClusterCapacityProviderAssociationsProps

type CfnClusterCapacityProviderAssociationsProps struct {
	// The capacity providers to associate with the cluster.
	CapacityProviders *[]*string `field:"required" json:"capacityProviders" yaml:"capacityProviders"`
	// The cluster the capacity provider association is the target of.
	Cluster *string `field:"required" json:"cluster" yaml:"cluster"`
	// The default capacity provider strategy to associate with the cluster.
	DefaultCapacityProviderStrategy interface{} `field:"required" json:"defaultCapacityProviderStrategy" yaml:"defaultCapacityProviderStrategy"`
}

Properties for defining a `CfnClusterCapacityProviderAssociations`.

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"

cfnClusterCapacityProviderAssociationsProps := &cfnClusterCapacityProviderAssociationsProps{
	capacityProviders: []*string{
		jsii.String("capacityProviders"),
	},
	cluster: jsii.String("cluster"),
	defaultCapacityProviderStrategy: []interface{}{
		&capacityProviderStrategyProperty{
			capacityProvider: jsii.String("capacityProvider"),

			// the properties below are optional
			base: jsii.Number(123),
			weight: jsii.Number(123),
		},
	},
}

type CfnClusterCapacityProviderAssociations_CapacityProviderStrategyProperty

type CfnClusterCapacityProviderAssociations_CapacityProviderStrategyProperty struct {
	// The short name of the capacity provider.
	CapacityProvider *string `field:"required" json:"capacityProvider" yaml:"capacityProvider"`
	// The *base* value designates how many tasks, at a minimum, to run on the specified capacity provider.
	//
	// Only one capacity provider in a capacity provider strategy can have a *base* defined. If no value is specified, the default value of `0` is used.
	Base *float64 `field:"optional" json:"base" yaml:"base"`
	// The *weight* value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.
	//
	// The `weight` value is taken into consideration after the `base` value, if defined, is satisfied.
	//
	// If no `weight` value is specified, the default value of `0` is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of `0` will not be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of `0` , any `RunTask` or `CreateService` actions using the capacity provider strategy will fail.
	//
	// An example scenario for using weights is defining a strategy that contains two capacity providers and both have a weight of `1` , then when the `base` is satisfied, the tasks will be split evenly across the two capacity providers. Using that same logic, if you specify a weight of `1` for *capacityProviderA* and a weight of `4` for *capacityProviderB* , then for every one task that is run using *capacityProviderA* , four tasks would use *capacityProviderB* .
	Weight *float64 `field:"optional" json:"weight" yaml:"weight"`
}

The `CapacityProviderStrategy` property specifies the details of the default capacity provider strategy for the cluster.

When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

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"

capacityProviderStrategyProperty := &capacityProviderStrategyProperty{
	capacityProvider: jsii.String("capacityProvider"),

	// the properties below are optional
	base: jsii.Number(123),
	weight: jsii.Number(123),
}

type CfnClusterProps

type CfnClusterProps struct {
	// The short name of one or more capacity providers to associate with the cluster.
	//
	// A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy.
	//
	// If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created and not already associated with another cluster.
	//
	// To use an AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.
	CapacityProviders *[]*string `field:"optional" json:"capacityProviders" yaml:"capacityProviders"`
	// A user-generated string that you use to identify your cluster.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID for the name.
	ClusterName *string `field:"optional" json:"clusterName" yaml:"clusterName"`
	// The setting to use when creating a cluster.
	//
	// This parameter is used to enable CloudWatch Container Insights for a cluster. If this value is specified, it will override the `containerInsights` value set with [PutAccountSetting](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html) or [PutAccountSettingDefault](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html) .
	ClusterSettings interface{} `field:"optional" json:"clusterSettings" yaml:"clusterSettings"`
	// The execute command configuration for the cluster.
	Configuration interface{} `field:"optional" json:"configuration" yaml:"configuration"`
	// The default capacity provider strategy for the cluster.
	//
	// When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.
	DefaultCapacityProviderStrategy interface{} `field:"optional" json:"defaultCapacityProviderStrategy" yaml:"defaultCapacityProviderStrategy"`
	// The metadata that you apply to the cluster to help you categorize and organize them.
	//
	// Each tag consists of a key and an optional value. You define both.
	//
	// The following basic restrictions apply to tags:
	//
	// - Maximum number of tags per resource - 50
	// - For each resource, each tag key must be unique, and each tag key can have only one value.
	// - Maximum key length - 128 Unicode characters in UTF-8
	// - Maximum value length - 256 Unicode characters in UTF-8
	// - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
	// - Tag keys and values are case-sensitive.
	// - Do not use `aws:` , `AWS:` , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
}

Properties for defining a `CfnCluster`.

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"

cfnClusterProps := &cfnClusterProps{
	capacityProviders: []*string{
		jsii.String("capacityProviders"),
	},
	clusterName: jsii.String("clusterName"),
	clusterSettings: []interface{}{
		&clusterSettingsProperty{
			name: jsii.String("name"),
			value: jsii.String("value"),
		},
	},
	configuration: &clusterConfigurationProperty{
		executeCommandConfiguration: &executeCommandConfigurationProperty{
			kmsKeyId: jsii.String("kmsKeyId"),
			logConfiguration: &executeCommandLogConfigurationProperty{
				cloudWatchEncryptionEnabled: jsii.Boolean(false),
				cloudWatchLogGroupName: jsii.String("cloudWatchLogGroupName"),
				s3BucketName: jsii.String("s3BucketName"),
				s3EncryptionEnabled: jsii.Boolean(false),
				s3KeyPrefix: jsii.String("s3KeyPrefix"),
			},
			logging: jsii.String("logging"),
		},
	},
	defaultCapacityProviderStrategy: []interface{}{
		&capacityProviderStrategyItemProperty{
			base: jsii.Number(123),
			capacityProvider: jsii.String("capacityProvider"),
			weight: jsii.Number(123),
		},
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
}

type CfnCluster_CapacityProviderStrategyItemProperty

type CfnCluster_CapacityProviderStrategyItemProperty struct {
	// The *base* value designates how many tasks, at a minimum, to run on the specified capacity provider.
	//
	// Only one capacity provider in a capacity provider strategy can have a *base* defined. If no value is specified, the default value of `0` is used.
	Base *float64 `field:"optional" json:"base" yaml:"base"`
	// The short name of the capacity provider.
	CapacityProvider *string `field:"optional" json:"capacityProvider" yaml:"capacityProvider"`
	// The *weight* value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.
	//
	// The `weight` value is taken into consideration after the `base` value, if defined, is satisfied.
	//
	// If no `weight` value is specified, the default value of `0` is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of `0` can't be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of `0` , any `RunTask` or `CreateService` actions using the capacity provider strategy will fail.
	//
	// An example scenario for using weights is defining a strategy that contains two capacity providers and both have a weight of `1` , then when the `base` is satisfied, the tasks will be split evenly across the two capacity providers. Using that same logic, if you specify a weight of `1` for *capacityProviderA* and a weight of `4` for *capacityProviderB* , then for every one task that's run using *capacityProviderA* , four tasks would use *capacityProviderB* .
	Weight *float64 `field:"optional" json:"weight" yaml:"weight"`
}

The `CapacityProviderStrategyItem` property specifies the details of the default capacity provider strategy for the cluster.

When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

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"

capacityProviderStrategyItemProperty := &capacityProviderStrategyItemProperty{
	base: jsii.Number(123),
	capacityProvider: jsii.String("capacityProvider"),
	weight: jsii.Number(123),
}

type CfnCluster_ClusterConfigurationProperty

type CfnCluster_ClusterConfigurationProperty struct {
	// The details of the execute command configuration.
	ExecuteCommandConfiguration interface{} `field:"optional" json:"executeCommandConfiguration" yaml:"executeCommandConfiguration"`
}

The execute command configuration for the cluster.

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"

clusterConfigurationProperty := &clusterConfigurationProperty{
	executeCommandConfiguration: &executeCommandConfigurationProperty{
		kmsKeyId: jsii.String("kmsKeyId"),
		logConfiguration: &executeCommandLogConfigurationProperty{
			cloudWatchEncryptionEnabled: jsii.Boolean(false),
			cloudWatchLogGroupName: jsii.String("cloudWatchLogGroupName"),
			s3BucketName: jsii.String("s3BucketName"),
			s3EncryptionEnabled: jsii.Boolean(false),
			s3KeyPrefix: jsii.String("s3KeyPrefix"),
		},
		logging: jsii.String("logging"),
	},
}

type CfnCluster_ClusterSettingsProperty

type CfnCluster_ClusterSettingsProperty struct {
	// The name of the cluster setting.
	//
	// The only supported value is `containerInsights` .
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The value to set for the cluster setting.
	//
	// The supported values are `enabled` and `disabled` . If `enabled` is specified, CloudWatch Container Insights will be enabled for the cluster, otherwise it will be disabled unless the `containerInsights` account setting is enabled. If a cluster value is specified, it will override the `containerInsights` value set with [PutAccountSetting](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html) or [PutAccountSettingDefault](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html) .
	Value *string `field:"optional" json:"value" yaml:"value"`
}

The settings to use when creating a cluster.

This parameter is used to turn on CloudWatch Container Insights for a cluster.

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"

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

type CfnCluster_ExecuteCommandConfigurationProperty

type CfnCluster_ExecuteCommandConfigurationProperty struct {
	// Specify an AWS Key Management Service key ID to encrypt the data between the local client and the container.
	KmsKeyId *string `field:"optional" json:"kmsKeyId" yaml:"kmsKeyId"`
	// The log configuration for the results of the execute command actions.
	//
	// The logs can be sent to CloudWatch Logs or an Amazon S3 bucket. When `logging=OVERRIDE` is specified, a `logConfiguration` must be provided.
	LogConfiguration interface{} `field:"optional" json:"logConfiguration" yaml:"logConfiguration"`
	// The log setting to use for redirecting logs for your execute command results. The following log settings are available.
	//
	// - `NONE` : The execute command session is not logged.
	// - `DEFAULT` : The `awslogs` configuration in the task definition is used. If no logging parameter is specified, it defaults to this value. If no `awslogs` log driver is configured in the task definition, the output won't be logged.
	// - `OVERRIDE` : Specify the logging details as a part of `logConfiguration` . If the `OVERRIDE` logging option is specified, the `logConfiguration` is required.
	Logging *string `field:"optional" json:"logging" yaml:"logging"`
}

The details of the execute command 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"

executeCommandConfigurationProperty := &executeCommandConfigurationProperty{
	kmsKeyId: jsii.String("kmsKeyId"),
	logConfiguration: &executeCommandLogConfigurationProperty{
		cloudWatchEncryptionEnabled: jsii.Boolean(false),
		cloudWatchLogGroupName: jsii.String("cloudWatchLogGroupName"),
		s3BucketName: jsii.String("s3BucketName"),
		s3EncryptionEnabled: jsii.Boolean(false),
		s3KeyPrefix: jsii.String("s3KeyPrefix"),
	},
	logging: jsii.String("logging"),
}

type CfnCluster_ExecuteCommandLogConfigurationProperty

type CfnCluster_ExecuteCommandLogConfigurationProperty struct {
	// Determines whether to use encryption on the CloudWatch logs.
	//
	// If not specified, encryption will be disabled.
	CloudWatchEncryptionEnabled interface{} `field:"optional" json:"cloudWatchEncryptionEnabled" yaml:"cloudWatchEncryptionEnabled"`
	// The name of the CloudWatch log group to send logs to.
	//
	// > The CloudWatch log group must already be created.
	CloudWatchLogGroupName *string `field:"optional" json:"cloudWatchLogGroupName" yaml:"cloudWatchLogGroupName"`
	// The name of the S3 bucket to send logs to.
	//
	// > The S3 bucket must already be created.
	S3BucketName *string `field:"optional" json:"s3BucketName" yaml:"s3BucketName"`
	// Determines whether to use encryption on the S3 logs.
	//
	// If not specified, encryption is not used.
	S3EncryptionEnabled interface{} `field:"optional" json:"s3EncryptionEnabled" yaml:"s3EncryptionEnabled"`
	// An optional folder in the S3 bucket to place logs in.
	S3KeyPrefix *string `field:"optional" json:"s3KeyPrefix" yaml:"s3KeyPrefix"`
}

The log configuration for the results of the execute command actions.

The logs can be sent to CloudWatch Logs or an Amazon S3 bucket.

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"

executeCommandLogConfigurationProperty := &executeCommandLogConfigurationProperty{
	cloudWatchEncryptionEnabled: jsii.Boolean(false),
	cloudWatchLogGroupName: jsii.String("cloudWatchLogGroupName"),
	s3BucketName: jsii.String("s3BucketName"),
	s3EncryptionEnabled: jsii.Boolean(false),
	s3KeyPrefix: jsii.String("s3KeyPrefix"),
}

type CfnPrimaryTaskSet

type CfnPrimaryTaskSet 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
	// The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.
	Cluster() *string
	SetCluster(val *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 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
	// The short name or full Amazon Resource Name (ARN) of the service that the task set exists in.
	Service() *string
	SetService(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 short name or full Amazon Resource Name (ARN) of the task set to set as the primary task set in the deployment.
	TaskSetId() *string
	SetTaskSetId(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::ECS::PrimaryTaskSet`.

Specifies which task set in a service is the primary task set. Any parameters that are updated on the primary task set in a service will transition to the service. This is used when a service uses the `EXTERNAL` deployment controller type. For more information, see [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the *Amazon Elastic Container Service Developer 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"

cfnPrimaryTaskSet := awscdk.Aws_ecs.NewCfnPrimaryTaskSet(this, jsii.String("MyCfnPrimaryTaskSet"), &cfnPrimaryTaskSetProps{
	cluster: jsii.String("cluster"),
	service: jsii.String("service"),
	taskSetId: jsii.String("taskSetId"),
})

func NewCfnPrimaryTaskSet

func NewCfnPrimaryTaskSet(scope awscdk.Construct, id *string, props *CfnPrimaryTaskSetProps) CfnPrimaryTaskSet

Create a new `AWS::ECS::PrimaryTaskSet`.

type CfnPrimaryTaskSetProps

type CfnPrimaryTaskSetProps struct {
	// The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.
	Cluster *string `field:"required" json:"cluster" yaml:"cluster"`
	// The short name or full Amazon Resource Name (ARN) of the service that the task set exists in.
	Service *string `field:"required" json:"service" yaml:"service"`
	// The short name or full Amazon Resource Name (ARN) of the task set to set as the primary task set in the deployment.
	TaskSetId *string `field:"required" json:"taskSetId" yaml:"taskSetId"`
}

Properties for defining a `CfnPrimaryTaskSet`.

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"

cfnPrimaryTaskSetProps := &cfnPrimaryTaskSetProps{
	cluster: jsii.String("cluster"),
	service: jsii.String("service"),
	taskSetId: jsii.String("taskSetId"),
}

type CfnService

type CfnService interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The name of the Amazon ECS service, such as `sample-webapp` .
	AttrName() *string
	// Not currently supported in AWS CloudFormation .
	AttrServiceArn() *string
	// The capacity provider strategy to use for the service.
	//
	// A capacity provider strategy consists of one or more capacity providers along with the `base` and `weight` to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The PutClusterCapacityProviders API is used to associate a capacity provider with a cluster. Only capacity providers with an `ACTIVE` or `UPDATING` status can be used.
	//
	// Review the [Capacity provider considerations](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html#capacity-providers-considerations) in the *Amazon Elastic Container Service Developer Guide.*
	//
	// If a `capacityProviderStrategy` is specified, the `launchType` parameter must be omitted. If no `capacityProviderStrategy` or `launchType` is specified, the `defaultCapacityProviderStrategy` for the cluster is used.
	//
	// If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateCapacityProvider API operation.
	//
	// To use an AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.
	//
	// The PutClusterCapacityProviders API operation is used to update the list of available capacity providers for a cluster after the cluster is created.
	CapacityProviderStrategy() interface{}
	SetCapacityProviderStrategy(val interface{})
	// 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 short name or full Amazon Resource Name (ARN) of the cluster that you run your service on.
	//
	// If you do not specify a cluster, the default cluster is assumed.
	Cluster() *string
	SetCluster(val *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
	// Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
	DeploymentConfiguration() interface{}
	SetDeploymentConfiguration(val interface{})
	// The deployment controller to use for the service.
	//
	// If no deployment controller is specified, the default value of `ECS` is used.
	DeploymentController() interface{}
	SetDeploymentController(val interface{})
	// The number of instantiations of the specified task definition to place and keep running on your cluster.
	//
	// For new services, if a desired count is not specified, a default value of `1` is used. When using the `DAEMON` scheduling strategy, the desired count is not required.
	//
	// For existing services, if a desired count is not specified, it is omitted from the operation.
	DesiredCount() *float64
	SetDesiredCount(val *float64)
	// Specifies whether to turn on Amazon ECS managed tags for the tasks within the service.
	//
	// For more information, see [Tagging your Amazon ECS resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) in the *Amazon Elastic Container Service Developer Guide* .
	EnableEcsManagedTags() interface{}
	SetEnableEcsManagedTags(val interface{})
	// Determines whether the execute command functionality is enabled for the service.
	//
	// If `true` , the execute command functionality is enabled for all containers in tasks as part of the service.
	EnableExecuteCommand() interface{}
	SetEnableExecuteCommand(val interface{})
	// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
	//
	// This is only used when your service is configured to use a load balancer. If your service has a load balancer defined and you don't specify a health check grace period value, the default value of `0` is used.
	//
	// If you do not use an Elastic Load Balancing, we recomend that you use the `startPeriod` in the task definition healtch check parameters. For more information, see [Health check](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_HealthCheck.html) .
	//
	// If your service's tasks take a while to start and respond to Elastic Load Balancing health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.
	HealthCheckGracePeriodSeconds() *float64
	SetHealthCheckGracePeriodSeconds(val *float64)
	// The launch type on which to run your service.
	//
	// For more information, see [Amazon ECS Launch Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) in the *Amazon Elastic Container Service Developer Guide* .
	LaunchType() *string
	SetLaunchType(val *string)
	// A list of load balancer objects to associate with the service.
	//
	// If you specify the `Role` property, `LoadBalancers` must be specified as well. For information about the number of load balancers that you can specify per service, see [Service Load Balancing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) in the *Amazon Elastic Container Service Developer Guide* .
	LoadBalancers() interface{}
	SetLoadBalancers(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 network configuration for the service.
	//
	// This parameter is required for task definitions that use the `awsvpc` network mode to receive their own elastic network interface, and it is not supported for other network modes. For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide* .
	NetworkConfiguration() interface{}
	SetNetworkConfiguration(val interface{})
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// An array of placement constraint objects to use for tasks in your service.
	//
	// You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
	PlacementConstraints() interface{}
	SetPlacementConstraints(val interface{})
	// The placement strategy objects to use for tasks in your service.
	//
	// You can specify a maximum of five strategy rules per service. For more information, see [Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html) in the *Amazon Elastic Container Service Developer Guide* .
	PlacementStrategies() interface{}
	SetPlacementStrategies(val interface{})
	// The platform version that your tasks in the service are running on.
	//
	// A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the `LATEST` platform version is used. 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
	SetPlatformVersion(val *string)
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// If no value is specified, the tags are not propagated. Tags can only be propagated to the tasks within the service during service creation. To add tags to a task after service creation, use the [TagResource](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html) API action.
	PropagateTags() *string
	SetPropagateTags(val *string)
	// 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 name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf.
	//
	// This parameter is only permitted if you are using a load balancer with your service and your task definition doesn't use the `awsvpc` network mode. If you specify the `role` parameter, you must also specify a load balancer object with the `loadBalancers` parameter.
	//
	// > If your account has already created the Amazon ECS service-linked role, that role is used for your service unless you specify a role here. The service-linked role is required if your task definition uses the `awsvpc` network mode or if the service is configured to use service discovery, an external deployment controller, multiple target groups, or Elastic Inference accelerators in which case you don't specify a role here. For more information, see [Using service-linked roles for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// If your specified role has a path other than `/` , then you must either specify the full role ARN (this is recommended) or prefix the role name with the path. 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* .
	Role() *string
	SetRole(val *string)
	// The scheduling strategy to use for the service. For more information, see [Services](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html) .
	//
	// There are two service scheduler strategies available:
	//
	// - `REPLICA` -The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. This scheduler strategy is required if the service uses the `CODE_DEPLOY` or `EXTERNAL` deployment controller types.
	// - `DAEMON` -The daemon scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks and will stop tasks that don't meet the placement constraints. When you're using this strategy, you don't need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies.
	//
	// > Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy.
	SchedulingStrategy() *string
	SetSchedulingStrategy(val *string)
	// The name of your service.
	//
	// Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a Region or across multiple Regions.
	ServiceName() *string
	SetServiceName(val *string)
	// The details of the service discovery registry to associate with this service. For more information, see [Service discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) .
	//
	// > Each service may be associated with one service registry. Multiple service registries for each service isn't supported.
	ServiceRegistries() interface{}
	SetServiceRegistries(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The metadata that you apply to the service to help you categorize and organize them.
	//
	// Each tag consists of a key and an optional value, both of which you define. When a service is deleted, the tags are deleted as well.
	//
	// The following basic restrictions apply to tags:
	//
	// - Maximum number of tags per resource - 50
	// - For each resource, each tag key must be unique, and each tag key can have only one value.
	// - Maximum key length - 128 Unicode characters in UTF-8
	// - Maximum value length - 256 Unicode characters in UTF-8
	// - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
	// - Tag keys and values are case-sensitive.
	// - Do not use `aws:` , `AWS:` , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
	Tags() awscdk.TagManager
	// The `family` and `revision` ( `family:revision` ) or full ARN of the task definition to run in your service.
	//
	// The `revision` is required in order for the resource to stabilize.
	//
	// A task definition must be specified if the service is using either the `ECS` or `CODE_DEPLOY` deployment controllers.
	TaskDefinition() *string
	SetTaskDefinition(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::ECS::Service`.

The `AWS::ECS::Service` resource creates an Amazon Elastic Container Service (Amazon ECS) service that runs and maintains the requested number of tasks and associated load balancers.

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"

cfnService := awscdk.Aws_ecs.NewCfnService(this, jsii.String("MyCfnService"), &cfnServiceProps{
	capacityProviderStrategy: []interface{}{
		&capacityProviderStrategyItemProperty{
			base: jsii.Number(123),
			capacityProvider: jsii.String("capacityProvider"),
			weight: jsii.Number(123),
		},
	},
	cluster: jsii.String("cluster"),
	deploymentConfiguration: &deploymentConfigurationProperty{
		deploymentCircuitBreaker: &deploymentCircuitBreakerProperty{
			enable: jsii.Boolean(false),
			rollback: jsii.Boolean(false),
		},
		maximumPercent: jsii.Number(123),
		minimumHealthyPercent: jsii.Number(123),
	},
	deploymentController: &deploymentControllerProperty{
		type: jsii.String("type"),
	},
	desiredCount: jsii.Number(123),
	enableEcsManagedTags: jsii.Boolean(false),
	enableExecuteCommand: jsii.Boolean(false),
	healthCheckGracePeriodSeconds: jsii.Number(123),
	launchType: jsii.String("launchType"),
	loadBalancers: []interface{}{
		&loadBalancerProperty{
			containerPort: jsii.Number(123),

			// the properties below are optional
			containerName: jsii.String("containerName"),
			loadBalancerName: jsii.String("loadBalancerName"),
			targetGroupArn: jsii.String("targetGroupArn"),
		},
	},
	networkConfiguration: &networkConfigurationProperty{
		awsvpcConfiguration: &awsVpcConfigurationProperty{
			subnets: []*string{
				jsii.String("subnets"),
			},

			// the properties below are optional
			assignPublicIp: jsii.String("assignPublicIp"),
			securityGroups: []*string{
				jsii.String("securityGroups"),
			},
		},
	},
	placementConstraints: []interface{}{
		&placementConstraintProperty{
			type: jsii.String("type"),

			// the properties below are optional
			expression: jsii.String("expression"),
		},
	},
	placementStrategies: []interface{}{
		&placementStrategyProperty{
			type: jsii.String("type"),

			// the properties below are optional
			field: jsii.String("field"),
		},
	},
	platformVersion: jsii.String("platformVersion"),
	propagateTags: jsii.String("propagateTags"),
	role: jsii.String("role"),
	schedulingStrategy: jsii.String("schedulingStrategy"),
	serviceName: jsii.String("serviceName"),
	serviceRegistries: []interface{}{
		&serviceRegistryProperty{
			containerName: jsii.String("containerName"),
			containerPort: jsii.Number(123),
			port: jsii.Number(123),
			registryArn: jsii.String("registryArn"),
		},
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	taskDefinition: jsii.String("taskDefinition"),
})

func NewCfnService

func NewCfnService(scope awscdk.Construct, id *string, props *CfnServiceProps) CfnService

Create a new `AWS::ECS::Service`.

type CfnServiceProps

type CfnServiceProps struct {
	// The capacity provider strategy to use for the service.
	//
	// A capacity provider strategy consists of one or more capacity providers along with the `base` and `weight` to assign to them. A capacity provider must be associated with the cluster to be used in a capacity provider strategy. The PutClusterCapacityProviders API is used to associate a capacity provider with a cluster. Only capacity providers with an `ACTIVE` or `UPDATING` status can be used.
	//
	// Review the [Capacity provider considerations](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html#capacity-providers-considerations) in the *Amazon Elastic Container Service Developer Guide.*
	//
	// If a `capacityProviderStrategy` is specified, the `launchType` parameter must be omitted. If no `capacityProviderStrategy` or `launchType` is specified, the `defaultCapacityProviderStrategy` for the cluster is used.
	//
	// If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New capacity providers can be created with the CreateCapacityProvider API operation.
	//
	// To use an AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.
	//
	// The PutClusterCapacityProviders API operation is used to update the list of available capacity providers for a cluster after the cluster is created.
	CapacityProviderStrategy interface{} `field:"optional" json:"capacityProviderStrategy" yaml:"capacityProviderStrategy"`
	// The short name or full Amazon Resource Name (ARN) of the cluster that you run your service on.
	//
	// If you do not specify a cluster, the default cluster is assumed.
	Cluster *string `field:"optional" json:"cluster" yaml:"cluster"`
	// Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
	DeploymentConfiguration interface{} `field:"optional" json:"deploymentConfiguration" yaml:"deploymentConfiguration"`
	// The deployment controller to use for the service.
	//
	// If no deployment controller is specified, the default value of `ECS` is used.
	DeploymentController interface{} `field:"optional" json:"deploymentController" yaml:"deploymentController"`
	// The number of instantiations of the specified task definition to place and keep running on your cluster.
	//
	// For new services, if a desired count is not specified, a default value of `1` is used. When using the `DAEMON` scheduling strategy, the desired count is not required.
	//
	// For existing services, if a desired count is not specified, it is omitted from the operation.
	DesiredCount *float64 `field:"optional" json:"desiredCount" yaml:"desiredCount"`
	// Specifies whether to turn on Amazon ECS managed tags for the tasks within the service.
	//
	// For more information, see [Tagging your Amazon ECS resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) in the *Amazon Elastic Container Service Developer Guide* .
	EnableEcsManagedTags interface{} `field:"optional" json:"enableEcsManagedTags" yaml:"enableEcsManagedTags"`
	// Determines whether the execute command functionality is enabled for the service.
	//
	// If `true` , the execute command functionality is enabled for all containers in tasks as part of the service.
	EnableExecuteCommand interface{} `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"`
	// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
	//
	// This is only used when your service is configured to use a load balancer. If your service has a load balancer defined and you don't specify a health check grace period value, the default value of `0` is used.
	//
	// If you do not use an Elastic Load Balancing, we recomend that you use the `startPeriod` in the task definition healtch check parameters. For more information, see [Health check](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_HealthCheck.html) .
	//
	// If your service's tasks take a while to start and respond to Elastic Load Balancing health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.
	HealthCheckGracePeriodSeconds *float64 `field:"optional" json:"healthCheckGracePeriodSeconds" yaml:"healthCheckGracePeriodSeconds"`
	// The launch type on which to run your service.
	//
	// For more information, see [Amazon ECS Launch Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) in the *Amazon Elastic Container Service Developer Guide* .
	LaunchType *string `field:"optional" json:"launchType" yaml:"launchType"`
	// A list of load balancer objects to associate with the service.
	//
	// If you specify the `Role` property, `LoadBalancers` must be specified as well. For information about the number of load balancers that you can specify per service, see [Service Load Balancing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) in the *Amazon Elastic Container Service Developer Guide* .
	LoadBalancers interface{} `field:"optional" json:"loadBalancers" yaml:"loadBalancers"`
	// The network configuration for the service.
	//
	// This parameter is required for task definitions that use the `awsvpc` network mode to receive their own elastic network interface, and it is not supported for other network modes. For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide* .
	NetworkConfiguration interface{} `field:"optional" json:"networkConfiguration" yaml:"networkConfiguration"`
	// An array of placement constraint objects to use for tasks in your service.
	//
	// You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
	PlacementConstraints interface{} `field:"optional" json:"placementConstraints" yaml:"placementConstraints"`
	// The placement strategy objects to use for tasks in your service.
	//
	// You can specify a maximum of five strategy rules per service. For more information, see [Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html) in the *Amazon Elastic Container Service Developer Guide* .
	PlacementStrategies interface{} `field:"optional" json:"placementStrategies" yaml:"placementStrategies"`
	// The platform version that your tasks in the service are running on.
	//
	// A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the `LATEST` platform version is used. 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"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// If no value is specified, the tags are not propagated. Tags can only be propagated to the tasks within the service during service creation. To add tags to a task after service creation, use the [TagResource](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html) API action.
	PropagateTags *string `field:"optional" json:"propagateTags" yaml:"propagateTags"`
	// The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf.
	//
	// This parameter is only permitted if you are using a load balancer with your service and your task definition doesn't use the `awsvpc` network mode. If you specify the `role` parameter, you must also specify a load balancer object with the `loadBalancers` parameter.
	//
	// > If your account has already created the Amazon ECS service-linked role, that role is used for your service unless you specify a role here. The service-linked role is required if your task definition uses the `awsvpc` network mode or if the service is configured to use service discovery, an external deployment controller, multiple target groups, or Elastic Inference accelerators in which case you don't specify a role here. For more information, see [Using service-linked roles for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// If your specified role has a path other than `/` , then you must either specify the full role ARN (this is recommended) or prefix the role name with the path. 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* .
	Role *string `field:"optional" json:"role" yaml:"role"`
	// The scheduling strategy to use for the service. For more information, see [Services](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html) .
	//
	// There are two service scheduler strategies available:
	//
	// - `REPLICA` -The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. This scheduler strategy is required if the service uses the `CODE_DEPLOY` or `EXTERNAL` deployment controller types.
	// - `DAEMON` -The daemon scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks and will stop tasks that don't meet the placement constraints. When you're using this strategy, you don't need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies.
	//
	// > Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy.
	SchedulingStrategy *string `field:"optional" json:"schedulingStrategy" yaml:"schedulingStrategy"`
	// The name of your service.
	//
	// Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a Region or across multiple Regions.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
	// The details of the service discovery registry to associate with this service. For more information, see [Service discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) .
	//
	// > Each service may be associated with one service registry. Multiple service registries for each service isn't supported.
	ServiceRegistries interface{} `field:"optional" json:"serviceRegistries" yaml:"serviceRegistries"`
	// The metadata that you apply to the service to help you categorize and organize them.
	//
	// Each tag consists of a key and an optional value, both of which you define. When a service is deleted, the tags are deleted as well.
	//
	// The following basic restrictions apply to tags:
	//
	// - Maximum number of tags per resource - 50
	// - For each resource, each tag key must be unique, and each tag key can have only one value.
	// - Maximum key length - 128 Unicode characters in UTF-8
	// - Maximum value length - 256 Unicode characters in UTF-8
	// - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
	// - Tag keys and values are case-sensitive.
	// - Do not use `aws:` , `AWS:` , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
	// The `family` and `revision` ( `family:revision` ) or full ARN of the task definition to run in your service.
	//
	// The `revision` is required in order for the resource to stabilize.
	//
	// A task definition must be specified if the service is using either the `ECS` or `CODE_DEPLOY` deployment controllers.
	TaskDefinition *string `field:"optional" json:"taskDefinition" yaml:"taskDefinition"`
}

Properties for defining a `CfnService`.

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"

cfnServiceProps := &cfnServiceProps{
	capacityProviderStrategy: []interface{}{
		&capacityProviderStrategyItemProperty{
			base: jsii.Number(123),
			capacityProvider: jsii.String("capacityProvider"),
			weight: jsii.Number(123),
		},
	},
	cluster: jsii.String("cluster"),
	deploymentConfiguration: &deploymentConfigurationProperty{
		deploymentCircuitBreaker: &deploymentCircuitBreakerProperty{
			enable: jsii.Boolean(false),
			rollback: jsii.Boolean(false),
		},
		maximumPercent: jsii.Number(123),
		minimumHealthyPercent: jsii.Number(123),
	},
	deploymentController: &deploymentControllerProperty{
		type: jsii.String("type"),
	},
	desiredCount: jsii.Number(123),
	enableEcsManagedTags: jsii.Boolean(false),
	enableExecuteCommand: jsii.Boolean(false),
	healthCheckGracePeriodSeconds: jsii.Number(123),
	launchType: jsii.String("launchType"),
	loadBalancers: []interface{}{
		&loadBalancerProperty{
			containerPort: jsii.Number(123),

			// the properties below are optional
			containerName: jsii.String("containerName"),
			loadBalancerName: jsii.String("loadBalancerName"),
			targetGroupArn: jsii.String("targetGroupArn"),
		},
	},
	networkConfiguration: &networkConfigurationProperty{
		awsvpcConfiguration: &awsVpcConfigurationProperty{
			subnets: []*string{
				jsii.String("subnets"),
			},

			// the properties below are optional
			assignPublicIp: jsii.String("assignPublicIp"),
			securityGroups: []*string{
				jsii.String("securityGroups"),
			},
		},
	},
	placementConstraints: []interface{}{
		&placementConstraintProperty{
			type: jsii.String("type"),

			// the properties below are optional
			expression: jsii.String("expression"),
		},
	},
	placementStrategies: []interface{}{
		&placementStrategyProperty{
			type: jsii.String("type"),

			// the properties below are optional
			field: jsii.String("field"),
		},
	},
	platformVersion: jsii.String("platformVersion"),
	propagateTags: jsii.String("propagateTags"),
	role: jsii.String("role"),
	schedulingStrategy: jsii.String("schedulingStrategy"),
	serviceName: jsii.String("serviceName"),
	serviceRegistries: []interface{}{
		&serviceRegistryProperty{
			containerName: jsii.String("containerName"),
			containerPort: jsii.Number(123),
			port: jsii.Number(123),
			registryArn: jsii.String("registryArn"),
		},
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	taskDefinition: jsii.String("taskDefinition"),
}

type CfnService_AwsVpcConfigurationProperty

type CfnService_AwsVpcConfigurationProperty struct {
	// The IDs of the subnets associated with the task or service.
	//
	// There's a limit of 16 subnets that can be specified per `AwsVpcConfiguration` .
	//
	// > All specified subnets must be from the same VPC.
	Subnets *[]*string `field:"required" json:"subnets" yaml:"subnets"`
	// Whether the task's elastic network interface receives a public IP address.
	//
	// The default value is `DISABLED` .
	AssignPublicIp *string `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"`
	// The IDs of the security groups associated with the task or service.
	//
	// If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified per `AwsVpcConfiguration` .
	//
	// > All specified security groups must be from the same VPC.
	SecurityGroups *[]*string `field:"optional" json:"securityGroups" yaml:"securityGroups"`
}

An object representing the networking details for a task or service.

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"

awsVpcConfigurationProperty := &awsVpcConfigurationProperty{
	subnets: []*string{
		jsii.String("subnets"),
	},

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

type CfnService_CapacityProviderStrategyItemProperty

type CfnService_CapacityProviderStrategyItemProperty struct {
	// The *base* value designates how many tasks, at a minimum, to run on the specified capacity provider.
	//
	// Only one capacity provider in a capacity provider strategy can have a *base* defined. If no value is specified, the default value of `0` is used.
	Base *float64 `field:"optional" json:"base" yaml:"base"`
	// The short name of the capacity provider.
	CapacityProvider *string `field:"optional" json:"capacityProvider" yaml:"capacityProvider"`
	// The *weight* value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.
	//
	// The `weight` value is taken into consideration after the `base` value, if defined, is satisfied.
	//
	// If no `weight` value is specified, the default value of `0` is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of `0` can't be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of `0` , any `RunTask` or `CreateService` actions using the capacity provider strategy will fail.
	//
	// An example scenario for using weights is defining a strategy that contains two capacity providers and both have a weight of `1` , then when the `base` is satisfied, the tasks will be split evenly across the two capacity providers. Using that same logic, if you specify a weight of `1` for *capacityProviderA* and a weight of `4` for *capacityProviderB* , then for every one task that's run using *capacityProviderA* , four tasks would use *capacityProviderB* .
	Weight *float64 `field:"optional" json:"weight" yaml:"weight"`
}

The details of a capacity provider strategy.

A capacity provider strategy can be set when using the `RunTask` or `CreateService` APIs or as the default capacity provider strategy for a cluster with the `CreateCluster` API.

Only capacity providers that are already associated with a cluster and have an `ACTIVE` or `UPDATING` status can be used in a capacity provider strategy. The `PutClusterCapacityProviders` API is used to associate a capacity provider with a cluster.

If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New Auto Scaling group capacity providers can be created with the `CreateCapacityProvider` API operation.

To use an AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used in a capacity provider strategy.

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"

capacityProviderStrategyItemProperty := &capacityProviderStrategyItemProperty{
	base: jsii.Number(123),
	capacityProvider: jsii.String("capacityProvider"),
	weight: jsii.Number(123),
}

type CfnService_DeploymentCircuitBreakerProperty

type CfnService_DeploymentCircuitBreakerProperty struct {
	// Determines whether to use the deployment circuit breaker logic for the service.
	Enable interface{} `field:"required" json:"enable" yaml:"enable"`
	// Determines whether to configure Amazon ECS to roll back the service if a service deployment fails.
	//
	// If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
	Rollback interface{} `field:"required" json:"rollback" yaml:"rollback"`
}

> The deployment circuit breaker can only be used for services using the rolling update ( `ECS` ) deployment type.

The `DeploymentCircuitBreaker` property determines whether a service deployment will fail if the service can't reach a steady state. If deployment circuit breaker is enabled, a service deployment will transition to a failed state and stop launching new tasks. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.

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"

deploymentCircuitBreakerProperty := &deploymentCircuitBreakerProperty{
	enable: jsii.Boolean(false),
	rollback: jsii.Boolean(false),
}

type CfnService_DeploymentConfigurationProperty

type CfnService_DeploymentConfigurationProperty struct {
	// > The deployment circuit breaker can only be used for services using the rolling update ( `ECS` ) deployment type that are not behind a Classic Load Balancer.
	//
	// The *deployment circuit breaker* determines whether a service deployment will fail if the service can't reach a steady state. If enabled, a service deployment will transition to a failed state and stop launching new tasks. You can also enable Amazon ECS to roll back your service to the last completed deployment after a failure. For more information, see [Rolling update](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html) in the *Amazon Elastic Container Service Developer Guide* .
	DeploymentCircuitBreaker interface{} `field:"optional" json:"deploymentCircuitBreaker" yaml:"deploymentCircuitBreaker"`
	// If a service is using the rolling update ( `ECS` ) deployment type, the `maximumPercent` parameter represents an upper limit on the number of your service's tasks that are allowed in the `RUNNING` or `PENDING` state during a deployment, as a percentage of the `desiredCount` (rounded down to the nearest integer).
	//
	// This parameter enables you to define the deployment batch size. For example, if your service is using the `REPLICA` service scheduler and has a `desiredCount` of four tasks and a `maximumPercent` value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default `maximumPercent` value for a service using the `REPLICA` service scheduler is 200%.
	//
	// If a service is using either the blue/green ( `CODE_DEPLOY` ) or `EXTERNAL` deployment types and tasks that use the EC2 launch type, the *maximum percent* value is set to the default value and is used to define the upper limit on the number of the tasks in the service that remain in the `RUNNING` state while the container instances are in the `DRAINING` state. If the tasks in the service use the Fargate launch type, the maximum percent value is not used, although it is returned when describing your service.
	MaximumPercent *float64 `field:"optional" json:"maximumPercent" yaml:"maximumPercent"`
	// If a service is using the rolling update ( `ECS` ) deployment type, the `minimumHealthyPercent` represents a lower limit on the number of your service's tasks that must remain in the `RUNNING` state during a deployment, as a percentage of the `desiredCount` (rounded up to the nearest integer).
	//
	// This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a `desiredCount` of four tasks and a `minimumHealthyPercent` of 50%, the service scheduler may stop two existing tasks to free up cluster capacity before starting two new tasks.
	//
	// For services that *do not* use a load balancer, the following should be noted:
	//
	// - A service is considered healthy if all essential containers within the tasks in the service pass their health checks.
	// - If a task has no essential containers with a health check defined, the service scheduler will wait for 40 seconds after a task reaches a `RUNNING` state before the task is counted towards the minimum healthy percent total.
	// - If a task has one or more essential containers with a health check defined, the service scheduler will wait for the task to reach a healthy status before counting it towards the minimum healthy percent total. A task is considered healthy when all essential containers within the task have passed their health checks. The amount of time the service scheduler can wait for is determined by the container health check settings.
	//
	// For services are that *do* use a load balancer, the following should be noted:
	//
	// - If a task has no essential containers with a health check defined, the service scheduler will wait for the load balancer target group health check to return a healthy status before counting the task towards the minimum healthy percent total.
	// - If a task has an essential container with a health check defined, the service scheduler will wait for both the task to reach a healthy status and the load balancer target group health check to return a healthy status before counting the task towards the minimum healthy percent total.
	//
	// If a service is using either the blue/green ( `CODE_DEPLOY` ) or `EXTERNAL` deployment types and is running tasks that use the EC2 launch type, the *minimum healthy percent* value is set to the default value and is used to define the lower limit on the number of the tasks in the service that remain in the `RUNNING` state while the container instances are in the `DRAINING` state. If a service is using either the blue/green ( `CODE_DEPLOY` ) or `EXTERNAL` deployment types and is running tasks that use the Fargate launch type, the minimum healthy percent value is not used, although it is returned when describing your service.
	MinimumHealthyPercent *float64 `field:"optional" json:"minimumHealthyPercent" yaml:"minimumHealthyPercent"`
}

The `DeploymentConfiguration` property specifies optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.

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"

deploymentConfigurationProperty := &deploymentConfigurationProperty{
	deploymentCircuitBreaker: &deploymentCircuitBreakerProperty{
		enable: jsii.Boolean(false),
		rollback: jsii.Boolean(false),
	},
	maximumPercent: jsii.Number(123),
	minimumHealthyPercent: jsii.Number(123),
}

type CfnService_DeploymentControllerProperty

type CfnService_DeploymentControllerProperty struct {
	// The deployment controller type to use. There are three deployment controller types available:.
	//
	// - **ECS** - The rolling update ( `ECS` ) deployment type involves replacing the current running version of the container with the latest version. The number of containers Amazon ECS adds or removes from the service during a rolling update is controlled by adjusting the minimum and maximum number of healthy tasks allowed during a service deployment, as specified in the [DeploymentConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeploymentConfiguration.html) .
	// - **CODE_DEPLOY** - The blue/green ( `CODE_DEPLOY` ) deployment type uses the blue/green deployment model powered by AWS CodeDeploy , which allows you to verify a new deployment of a service before sending production traffic to it.
	// - **EXTERNAL** - The external ( `EXTERNAL` ) deployment type enables you to use any third-party deployment controller for full control over the deployment process for an Amazon ECS service.
	Type *string `field:"optional" json:"type" yaml:"type"`
}

The deployment controller to use for the service.

For more information, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the *Amazon Elastic Container Service Developer 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"

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

type CfnService_LoadBalancerProperty

type CfnService_LoadBalancerProperty struct {
	// The port on the container to associate with the load balancer.
	//
	// This port must correspond to a `containerPort` in the task definition the tasks in the service are using. For tasks that use the EC2 launch type, the container instance they're launched on must allow ingress traffic on the `hostPort` of the port mapping.
	ContainerPort *float64 `field:"required" json:"containerPort" yaml:"containerPort"`
	// The name of the container (as it appears in a container definition) to associate with the load balancer.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
	// The name of the load balancer to associate with the Amazon ECS service or task set.
	//
	// A load balancer name is only specified when using a Classic Load Balancer. If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be omitted.
	LoadBalancerName *string `field:"optional" json:"loadBalancerName" yaml:"loadBalancerName"`
	// The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set.
	//
	// A target group ARN is only specified when using an Application Load Balancer or Network Load Balancer. If you're using a Classic Load Balancer, omit the target group ARN.
	//
	// For services using the `ECS` deployment controller, you can specify one or multiple target groups. For more information, see [Registering multiple target groups with a service](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// For services using the `CODE_DEPLOY` deployment controller, you're required to define two target groups for the load balancer. For more information, see [Blue/green deployment with CodeDeploy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-bluegreen.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// > If your service's task definition uses the `awsvpc` network mode, you must choose `ip` as the target type, not `instance` . Do this when creating your target groups because tasks that use the `awsvpc` network mode are associated with an elastic network interface, not an Amazon EC2 instance. This network mode is required for the Fargate launch type.
	TargetGroupArn *string `field:"optional" json:"targetGroupArn" yaml:"targetGroupArn"`
}

The `LoadBalancer` property specifies details on a load balancer that is used with a service.

If the service is using the `CODE_DEPLOY` deployment controller, the service is required to use either an Application Load Balancer or Network Load Balancer. When you are creating an AWS CodeDeploy deployment group, you specify two target groups (referred to as a `targetGroupPair` ). Each target group binds to a separate task set in the deployment. The load balancer can also have up to two listeners, a required listener for production traffic and an optional listener that allows you to test new revisions of the service before routing production traffic to it.

Services with tasks that use the `awsvpc` network mode (for example, those with the Fargate launch type) only support Application Load Balancers and Network Load Balancers. Classic Load Balancers are not supported. Also, when you create any target groups for these services, you must choose `ip` as the target type, not `instance` . Tasks that use the `awsvpc` network mode are associated with an elastic network interface, not an Amazon EC2 instance.

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"

loadBalancerProperty := &loadBalancerProperty{
	containerPort: jsii.Number(123),

	// the properties below are optional
	containerName: jsii.String("containerName"),
	loadBalancerName: jsii.String("loadBalancerName"),
	targetGroupArn: jsii.String("targetGroupArn"),
}

type CfnService_NetworkConfigurationProperty

type CfnService_NetworkConfigurationProperty struct {
	// The VPC subnets and security groups that are associated with a task.
	//
	// > All specified subnets and security groups must be from the same VPC.
	AwsvpcConfiguration interface{} `field:"optional" json:"awsvpcConfiguration" yaml:"awsvpcConfiguration"`
}

The `NetworkConfiguration` property specifies an object representing the network configuration for a task or service.

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{
	awsvpcConfiguration: &awsVpcConfigurationProperty{
		subnets: []*string{
			jsii.String("subnets"),
		},

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

type CfnService_PlacementConstraintProperty

type CfnService_PlacementConstraintProperty struct {
	// The type of constraint.
	//
	// Use `distinctInstance` to ensure that each task in a particular group is running on a different container instance. Use `memberOf` to restrict the selection to a group of valid candidates.
	Type *string `field:"required" json:"type" yaml:"type"`
	// A cluster query language expression to apply to the constraint.
	//
	// The expression can have a maximum length of 2000 characters. You can't specify an expression if the constraint type is `distinctInstance` . For more information, see [Cluster query language](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) in the *Amazon Elastic Container Service Developer Guide* .
	Expression *string `field:"optional" json:"expression" yaml:"expression"`
}

The `PlacementConstraint` property specifies an object representing a constraint on task placement in the task definition.

For more information, see [Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) in the *Amazon Elastic Container Service Developer 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"

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

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

type CfnService_PlacementStrategyProperty

type CfnService_PlacementStrategyProperty struct {
	// The type of placement strategy.
	//
	// The `random` placement strategy randomly places tasks on available candidates. The `spread` placement strategy spreads placement across available candidates evenly based on the `field` parameter. The `binpack` strategy places tasks on available candidates that have the least available amount of the resource that's specified with the `field` parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory but still enough to run the task.
	Type *string `field:"required" json:"type" yaml:"type"`
	// The field to apply the placement strategy against.
	//
	// For the `spread` placement strategy, valid values are `instanceId` (or `host` , which has the same effect), or any platform or custom attribute that's applied to a container instance, such as `attribute:ecs.availability-zone` . For the `binpack` placement strategy, valid values are `cpu` and `memory` . For the `random` placement strategy, this field is not used.
	Field *string `field:"optional" json:"field" yaml:"field"`
}

The `PlacementStrategy` property specifies the task placement strategy for a task or service.

For more information, see [Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html) in the *Amazon Elastic Container Service Developer 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"

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

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

type CfnService_ServiceRegistryProperty

type CfnService_ServiceRegistryProperty struct {
	// The container name value to be used for your service discovery service.
	//
	// It's already specified in the task definition. If the task definition that your service task specifies uses the `bridge` or `host` network mode, you must specify a `containerName` and `containerPort` combination from the task definition. If the task definition that your service task specifies uses the `awsvpc` network mode and a type SRV DNS record is used, you must specify either a `containerName` and `containerPort` combination or a `port` value. However, you can't specify both.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
	// The port value to be used for your service discovery service.
	//
	// It's already specified in the task definition. If the task definition your service task specifies uses the `bridge` or `host` network mode, you must specify a `containerName` and `containerPort` combination from the task definition. If the task definition your service task specifies uses the `awsvpc` network mode and a type SRV DNS record is used, you must specify either a `containerName` and `containerPort` combination or a `port` value. However, you can't specify both.
	ContainerPort *float64 `field:"optional" json:"containerPort" yaml:"containerPort"`
	// The port value used if your service discovery service specified an SRV record.
	//
	// This field might be used if both the `awsvpc` network mode and SRV records are used.
	Port *float64 `field:"optional" json:"port" yaml:"port"`
	// The Amazon Resource Name (ARN) of the service registry.
	//
	// The currently supported service registry is AWS Cloud Map . For more information, see [CreateService](https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html) .
	RegistryArn *string `field:"optional" json:"registryArn" yaml:"registryArn"`
}

The `ServiceRegistry` property specifies details of the service registry.

For more information, see [Service Discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) in the *Amazon Elastic Container Service Developer 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"

serviceRegistryProperty := &serviceRegistryProperty{
	containerName: jsii.String("containerName"),
	containerPort: jsii.Number(123),
	port: jsii.Number(123),
	registryArn: jsii.String("registryArn"),
}

type CfnTaskDefinition

type CfnTaskDefinition interface {
	awscdk.CfnResource
	awscdk.IInspectable
	AttrTaskDefinitionArn() *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
	// A list of container definitions in JSON format that describe the different containers that make up your task.
	//
	// For more information about container definition parameters and defaults, see [Amazon ECS Task Definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) in the *Amazon Elastic Container Service Developer Guide* .
	ContainerDefinitions() interface{}
	SetContainerDefinitions(val interface{})
	// The number of `cpu` units used by the task.
	//
	// If you use the EC2 launch type, this field is optional. Any value can be used. If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines your range of valid values for the `memory` parameter.
	//
	// The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
	//
	// - 256 (.25 vCPU) - Available `memory` values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
	// - 512 (.5 vCPU) - Available `memory` values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
	// - 1024 (1 vCPU) - Available `memory` values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
	// - 2048 (2 vCPU) - Available `memory` values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
	// - 4096 (4 vCPU) - Available `memory` values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB).
	Cpu() *string
	SetCpu(val *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 ephemeral storage settings to use for tasks run with the task definition.
	EphemeralStorage() interface{}
	SetEphemeralStorage(val interface{})
	// The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make AWS API calls on your behalf.
	//
	// The task execution IAM role is required depending on the requirements of your task. For more information, see [Amazon ECS task execution IAM role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html) in the *Amazon Elastic Container Service Developer Guide* .
	ExecutionRoleArn() *string
	SetExecutionRoleArn(val *string)
	// The name of a family that this task definition is registered to.
	//
	// Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
	//
	// A family groups multiple versions of a task definition. Amazon ECS gives the first task definition that you registered to a family a revision number of 1. Amazon ECS gives sequential revision numbers to each task definition that you add.
	//
	// > To use revision numbers when you update a task definition, specify this property. If you don't specify a value, AWS CloudFormation generates a new task definition each time that you update it.
	Family() *string
	SetFamily(val *string)
	// The Elastic Inference accelerators to use for the containers in the task.
	InferenceAccelerators() interface{}
	SetInferenceAccelerators(val interface{})
	// The IPC resource namespace to use for the containers in the task.
	//
	// The valid values are `host` , `task` , or `none` . If `host` is specified, then all containers within the tasks that specified the `host` IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If `task` is specified, all containers within the specified task share the same IPC resources. If `none` is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see [IPC settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) in the *Docker run reference* .
	//
	// If the `host` IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose. For more information, see [Docker security](https://docs.aws.amazon.com/https://docs.docker.com/engine/security/security/) .
	//
	// If you are setting namespaced kernel parameters using `systemControls` for the containers in the task, the following will apply to your IPC resource namespace. For more information, see [System Controls](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// - For tasks that use the `host` IPC mode, IPC namespace related `systemControls` are not supported.
	// - For tasks that use the `task` IPC mode, IPC namespace related `systemControls` will apply to all containers within a task.
	//
	// > This parameter is not supported for Windows containers or tasks run on AWS Fargate .
	IpcMode() *string
	SetIpcMode(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 amount (in MiB) of memory used by the task.
	//
	// If your tasks runs on Amazon EC2 instances, you must specify either a task-level memory value or a container-level memory value. This field is optional and any value can be used. If a task-level memory value is specified, the container-level memory value is optional. For more information regarding container-level memory and memory reservation, see [ContainerDefinition](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) .
	//
	// If your tasks runs on AWS Fargate , this field is required. You must use one of the following values. The value you choose determines your range of valid values for the `cpu` parameter.
	//
	// - 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available `cpu` values: 256 (.25 vCPU)
	// - 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available `cpu` values: 512 (.5 vCPU)
	// - 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available `cpu` values: 1024 (1 vCPU)
	// - Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available `cpu` values: 2048 (2 vCPU)
	// - Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available `cpu` values: 4096 (4 vCPU).
	Memory() *string
	SetMemory(val *string)
	// The Docker networking mode to use for the containers in the task.
	//
	// The valid values are `none` , `bridge` , `awsvpc` , and `host` . The default Docker network mode is `bridge` . If you are using the Fargate launch type, the `awsvpc` network mode is required. If you are using the EC2 launch type, any network mode can be used. If the network mode is set to `none` , you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The `host` and `awsvpc` network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the `bridge` mode.
	//
	// With the `host` and `awsvpc` network modes, exposed container ports are mapped directly to the corresponding host port (for the `host` network mode) or the attached elastic network interface port (for the `awsvpc` network mode), so you cannot take advantage of dynamic host port mappings.
	//
	// If the network mode is `awsvpc` , the task is allocated an elastic network interface, and you must specify a [NetworkConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html) value when you create a service or run a task with the task definition. For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// > Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with the `ecs-init` package, or AWS Fargate infrastructure support the `awsvpc` network mode.
	//
	// If the network mode is `host` , you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.
	//
	// Docker for Windows uses different network modes than Docker for Linux. When you register a task definition with Windows containers, you must not specify a network mode. If you use the console to register a task definition with Windows containers, you must choose the `<default>` network mode object.
	//
	// For more information, see [Network settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#network-settings) in the *Docker run reference* .
	NetworkMode() *string
	SetNetworkMode(val *string)
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The process namespace to use for the containers in the task.
	//
	// The valid values are `host` or `task` . If `host` is specified, then all containers within the tasks that specified the `host` PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance. If `task` is specified, all containers within the specified task share the same process namespace. If no value is specified, the default is a private namespace. For more information, see [PID settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#pid-settings---pid) in the *Docker run reference* .
	//
	// If the `host` PID mode is used, be aware that there is a heightened risk of undesired process namespace expose. For more information, see [Docker security](https://docs.aws.amazon.com/https://docs.docker.com/engine/security/security/) .
	//
	// > This parameter is not supported for Windows containers or tasks run on AWS Fargate .
	PidMode() *string
	SetPidMode(val *string)
	// An array of placement constraint objects to use for tasks.
	//
	// > This parameter isn't supported for tasks run on AWS Fargate .
	PlacementConstraints() interface{}
	SetPlacementConstraints(val interface{})
	// The `ProxyConfiguration` property specifies the configuration details for the App Mesh proxy.
	//
	// Your Amazon ECS container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the `ecs-init` package to enable a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version `20190301` or later, then they contain the required versions of the container agent and `ecs-init` . For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide* .
	ProxyConfiguration() interface{}
	SetProxyConfiguration(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 task launch types the task definition was validated against.
	//
	// To determine which task launch types the task definition is validated for, see the `TaskDefinition$compatibilities` parameter.
	RequiresCompatibilities() *[]*string
	SetRequiresCompatibilities(val *[]*string)
	// The operating system that your tasks definitions run on.
	//
	// A platform family is specified only for tasks using the Fargate launch type.
	//
	// When you specify a task definition in a service, this value must match the `runtimePlatform` value of the service.
	RuntimePlatform() interface{}
	SetRuntimePlatform(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The metadata that you apply to the task definition to help you categorize and organize them.
	//
	// Each tag consists of a key and an optional value. You define both of them.
	//
	// The following basic restrictions apply to tags:
	//
	// - Maximum number of tags per resource - 50
	// - For each resource, each tag key must be unique, and each tag key can have only one value.
	// - Maximum key length - 128 Unicode characters in UTF-8
	// - Maximum value length - 256 Unicode characters in UTF-8
	// - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
	// - Tag keys and values are case-sensitive.
	// - Do not use `aws:` , `AWS:` , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
	Tags() awscdk.TagManager
	// The short name or full Amazon Resource Name (ARN) of the AWS Identity and Access Management role that grants containers in the task permission to call AWS APIs on your behalf.
	//
	// For more information, see [Amazon ECS Task Role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// IAM roles for tasks on Windows require that the `-EnableTaskIAMRole` option is set when you launch the Amazon ECS-optimized Windows AMI. Your containers must also run some configuration code to use the feature. For more information, see [Windows IAM roles for tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html) in the *Amazon Elastic Container Service Developer Guide* .
	TaskRoleArn() *string
	SetTaskRoleArn(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{}
	// The list of data volume definitions for the task.
	//
	// For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// > The `host` and `sourcePath` parameters aren't supported for tasks run on AWS Fargate .
	Volumes() interface{}
	SetVolumes(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::ECS::TaskDefinition`.

The `AWS::ECS::TaskDefinition` resource describes the container and volume definitions of an Amazon Elastic Container Service (Amazon ECS) task. You can specify which Docker images to use, the required resources, and other configurations related to launching the task definition through an Amazon ECS service or task.

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"

cfnTaskDefinition := awscdk.Aws_ecs.NewCfnTaskDefinition(this, jsii.String("MyCfnTaskDefinition"), &cfnTaskDefinitionProps{
	containerDefinitions: []interface{}{
		&containerDefinitionProperty{
			command: []*string{
				jsii.String("command"),
			},
			cpu: jsii.Number(123),
			dependsOn: []interface{}{
				&containerDependencyProperty{
					condition: jsii.String("condition"),
					containerName: jsii.String("containerName"),
				},
			},
			disableNetworking: jsii.Boolean(false),
			dnsSearchDomains: []*string{
				jsii.String("dnsSearchDomains"),
			},
			dnsServers: []*string{
				jsii.String("dnsServers"),
			},
			dockerLabels: map[string]*string{
				"dockerLabelsKey": jsii.String("dockerLabels"),
			},
			dockerSecurityOptions: []*string{
				jsii.String("dockerSecurityOptions"),
			},
			entryPoint: []*string{
				jsii.String("entryPoint"),
			},
			environment: []interface{}{
				&keyValuePairProperty{
					name: jsii.String("name"),
					value: jsii.String("value"),
				},
			},
			environmentFiles: []interface{}{
				&environmentFileProperty{
					type: jsii.String("type"),
					value: jsii.String("value"),
				},
			},
			essential: jsii.Boolean(false),
			extraHosts: []interface{}{
				&hostEntryProperty{
					hostname: jsii.String("hostname"),
					ipAddress: jsii.String("ipAddress"),
				},
			},
			firelensConfiguration: &firelensConfigurationProperty{
				options: map[string]*string{
					"optionsKey": jsii.String("options"),
				},
				type: jsii.String("type"),
			},
			healthCheck: &healthCheckProperty{
				command: []*string{
					jsii.String("command"),
				},
				interval: jsii.Number(123),
				retries: jsii.Number(123),
				startPeriod: jsii.Number(123),
				timeout: jsii.Number(123),
			},
			hostname: jsii.String("hostname"),
			image: jsii.String("image"),
			interactive: jsii.Boolean(false),
			links: []*string{
				jsii.String("links"),
			},
			linuxParameters: &linuxParametersProperty{
				capabilities: &kernelCapabilitiesProperty{
					add: []*string{
						jsii.String("add"),
					},
					drop: []*string{
						jsii.String("drop"),
					},
				},
				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{
						size: jsii.Number(123),

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

				// the properties below are optional
				options: map[string]*string{
					"optionsKey": jsii.String("options"),
				},
				secretOptions: []interface{}{
					&secretProperty{
						name: jsii.String("name"),
						valueFrom: jsii.String("valueFrom"),
					},
				},
			},
			memory: jsii.Number(123),
			memoryReservation: jsii.Number(123),
			mountPoints: []interface{}{
				&mountPointProperty{
					containerPath: jsii.String("containerPath"),
					readOnly: jsii.Boolean(false),
					sourceVolume: jsii.String("sourceVolume"),
				},
			},
			name: jsii.String("name"),
			portMappings: []interface{}{
				&portMappingProperty{
					containerPort: jsii.Number(123),
					hostPort: jsii.Number(123),
					protocol: jsii.String("protocol"),
				},
			},
			privileged: jsii.Boolean(false),
			pseudoTerminal: jsii.Boolean(false),
			readonlyRootFilesystem: jsii.Boolean(false),
			repositoryCredentials: &repositoryCredentialsProperty{
				credentialsParameter: jsii.String("credentialsParameter"),
			},
			resourceRequirements: []interface{}{
				&resourceRequirementProperty{
					type: jsii.String("type"),
					value: jsii.String("value"),
				},
			},
			secrets: []interface{}{
				&secretProperty{
					name: jsii.String("name"),
					valueFrom: jsii.String("valueFrom"),
				},
			},
			startTimeout: jsii.Number(123),
			stopTimeout: jsii.Number(123),
			systemControls: []interface{}{
				&systemControlProperty{
					namespace: jsii.String("namespace"),
					value: jsii.String("value"),
				},
			},
			ulimits: []interface{}{
				&ulimitProperty{
					hardLimit: jsii.Number(123),
					name: jsii.String("name"),
					softLimit: jsii.Number(123),
				},
			},
			user: jsii.String("user"),
			volumesFrom: []interface{}{
				&volumeFromProperty{
					readOnly: jsii.Boolean(false),
					sourceContainer: jsii.String("sourceContainer"),
				},
			},
			workingDirectory: jsii.String("workingDirectory"),
		},
	},
	cpu: jsii.String("cpu"),
	ephemeralStorage: &ephemeralStorageProperty{
		sizeInGiB: jsii.Number(123),
	},
	executionRoleArn: jsii.String("executionRoleArn"),
	family: jsii.String("family"),
	inferenceAccelerators: []interface{}{
		&inferenceAcceleratorProperty{
			deviceName: jsii.String("deviceName"),
			deviceType: jsii.String("deviceType"),
		},
	},
	ipcMode: jsii.String("ipcMode"),
	memory: jsii.String("memory"),
	networkMode: jsii.String("networkMode"),
	pidMode: jsii.String("pidMode"),
	placementConstraints: []interface{}{
		&taskDefinitionPlacementConstraintProperty{
			type: jsii.String("type"),

			// the properties below are optional
			expression: jsii.String("expression"),
		},
	},
	proxyConfiguration: &proxyConfigurationProperty{
		containerName: jsii.String("containerName"),

		// the properties below are optional
		proxyConfigurationProperties: []interface{}{
			&keyValuePairProperty{
				name: jsii.String("name"),
				value: jsii.String("value"),
			},
		},
		type: jsii.String("type"),
	},
	requiresCompatibilities: []*string{
		jsii.String("requiresCompatibilities"),
	},
	runtimePlatform: &runtimePlatformProperty{
		cpuArchitecture: jsii.String("cpuArchitecture"),
		operatingSystemFamily: jsii.String("operatingSystemFamily"),
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	taskRoleArn: jsii.String("taskRoleArn"),
	volumes: []interface{}{
		&volumeProperty{
			dockerVolumeConfiguration: &dockerVolumeConfigurationProperty{
				autoprovision: jsii.Boolean(false),
				driver: jsii.String("driver"),
				driverOpts: map[string]*string{
					"driverOptsKey": jsii.String("driverOpts"),
				},
				labels: map[string]*string{
					"labelsKey": jsii.String("labels"),
				},
				scope: jsii.String("scope"),
			},
			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: &hostVolumePropertiesProperty{
				sourcePath: jsii.String("sourcePath"),
			},
			name: jsii.String("name"),
		},
	},
})

func NewCfnTaskDefinition

func NewCfnTaskDefinition(scope awscdk.Construct, id *string, props *CfnTaskDefinitionProps) CfnTaskDefinition

Create a new `AWS::ECS::TaskDefinition`.

type CfnTaskDefinitionProps

type CfnTaskDefinitionProps struct {
	// A list of container definitions in JSON format that describe the different containers that make up your task.
	//
	// For more information about container definition parameters and defaults, see [Amazon ECS Task Definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) in the *Amazon Elastic Container Service Developer Guide* .
	ContainerDefinitions interface{} `field:"optional" json:"containerDefinitions" yaml:"containerDefinitions"`
	// The number of `cpu` units used by the task.
	//
	// If you use the EC2 launch type, this field is optional. Any value can be used. If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines your range of valid values for the `memory` parameter.
	//
	// The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
	//
	// - 256 (.25 vCPU) - Available `memory` values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
	// - 512 (.5 vCPU) - Available `memory` values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
	// - 1024 (1 vCPU) - Available `memory` values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
	// - 2048 (2 vCPU) - Available `memory` values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
	// - 4096 (4 vCPU) - Available `memory` values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB).
	Cpu *string `field:"optional" json:"cpu" yaml:"cpu"`
	// The ephemeral storage settings to use for tasks run with the task definition.
	EphemeralStorage interface{} `field:"optional" json:"ephemeralStorage" yaml:"ephemeralStorage"`
	// The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make AWS API calls on your behalf.
	//
	// The task execution IAM role is required depending on the requirements of your task. For more information, see [Amazon ECS task execution IAM role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html) in the *Amazon Elastic Container Service Developer Guide* .
	ExecutionRoleArn *string `field:"optional" json:"executionRoleArn" yaml:"executionRoleArn"`
	// The name of a family that this task definition is registered to.
	//
	// Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
	//
	// A family groups multiple versions of a task definition. Amazon ECS gives the first task definition that you registered to a family a revision number of 1. Amazon ECS gives sequential revision numbers to each task definition that you add.
	//
	// > To use revision numbers when you update a task definition, specify this property. If you don't specify a value, AWS CloudFormation generates a new task definition each time that you update it.
	Family *string `field:"optional" json:"family" yaml:"family"`
	// The Elastic Inference accelerators to use for the containers in the task.
	InferenceAccelerators interface{} `field:"optional" json:"inferenceAccelerators" yaml:"inferenceAccelerators"`
	// The IPC resource namespace to use for the containers in the task.
	//
	// The valid values are `host` , `task` , or `none` . If `host` is specified, then all containers within the tasks that specified the `host` IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If `task` is specified, all containers within the specified task share the same IPC resources. If `none` is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see [IPC settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) in the *Docker run reference* .
	//
	// If the `host` IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose. For more information, see [Docker security](https://docs.aws.amazon.com/https://docs.docker.com/engine/security/security/) .
	//
	// If you are setting namespaced kernel parameters using `systemControls` for the containers in the task, the following will apply to your IPC resource namespace. For more information, see [System Controls](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// - For tasks that use the `host` IPC mode, IPC namespace related `systemControls` are not supported.
	// - For tasks that use the `task` IPC mode, IPC namespace related `systemControls` will apply to all containers within a task.
	//
	// > This parameter is not supported for Windows containers or tasks run on AWS Fargate .
	IpcMode *string `field:"optional" json:"ipcMode" yaml:"ipcMode"`
	// The amount (in MiB) of memory used by the task.
	//
	// If your tasks runs on Amazon EC2 instances, you must specify either a task-level memory value or a container-level memory value. This field is optional and any value can be used. If a task-level memory value is specified, the container-level memory value is optional. For more information regarding container-level memory and memory reservation, see [ContainerDefinition](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) .
	//
	// If your tasks runs on AWS Fargate , this field is required. You must use one of the following values. The value you choose determines your range of valid values for the `cpu` parameter.
	//
	// - 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available `cpu` values: 256 (.25 vCPU)
	// - 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available `cpu` values: 512 (.5 vCPU)
	// - 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available `cpu` values: 1024 (1 vCPU)
	// - Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available `cpu` values: 2048 (2 vCPU)
	// - Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available `cpu` values: 4096 (4 vCPU).
	Memory *string `field:"optional" json:"memory" yaml:"memory"`
	// The Docker networking mode to use for the containers in the task.
	//
	// The valid values are `none` , `bridge` , `awsvpc` , and `host` . The default Docker network mode is `bridge` . If you are using the Fargate launch type, the `awsvpc` network mode is required. If you are using the EC2 launch type, any network mode can be used. If the network mode is set to `none` , you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The `host` and `awsvpc` network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the `bridge` mode.
	//
	// With the `host` and `awsvpc` network modes, exposed container ports are mapped directly to the corresponding host port (for the `host` network mode) or the attached elastic network interface port (for the `awsvpc` network mode), so you cannot take advantage of dynamic host port mappings.
	//
	// If the network mode is `awsvpc` , the task is allocated an elastic network interface, and you must specify a [NetworkConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html) value when you create a service or run a task with the task definition. For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// > Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with the `ecs-init` package, or AWS Fargate infrastructure support the `awsvpc` network mode.
	//
	// If the network mode is `host` , you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.
	//
	// Docker for Windows uses different network modes than Docker for Linux. When you register a task definition with Windows containers, you must not specify a network mode. If you use the console to register a task definition with Windows containers, you must choose the `<default>` network mode object.
	//
	// For more information, see [Network settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#network-settings) in the *Docker run reference* .
	NetworkMode *string `field:"optional" json:"networkMode" yaml:"networkMode"`
	// The process namespace to use for the containers in the task.
	//
	// The valid values are `host` or `task` . If `host` is specified, then all containers within the tasks that specified the `host` PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance. If `task` is specified, all containers within the specified task share the same process namespace. If no value is specified, the default is a private namespace. For more information, see [PID settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#pid-settings---pid) in the *Docker run reference* .
	//
	// If the `host` PID mode is used, be aware that there is a heightened risk of undesired process namespace expose. For more information, see [Docker security](https://docs.aws.amazon.com/https://docs.docker.com/engine/security/security/) .
	//
	// > This parameter is not supported for Windows containers or tasks run on AWS Fargate .
	PidMode *string `field:"optional" json:"pidMode" yaml:"pidMode"`
	// An array of placement constraint objects to use for tasks.
	//
	// > This parameter isn't supported for tasks run on AWS Fargate .
	PlacementConstraints interface{} `field:"optional" json:"placementConstraints" yaml:"placementConstraints"`
	// The `ProxyConfiguration` property specifies the configuration details for the App Mesh proxy.
	//
	// Your Amazon ECS container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the `ecs-init` package to enable a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version `20190301` or later, then they contain the required versions of the container agent and `ecs-init` . For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide* .
	ProxyConfiguration interface{} `field:"optional" json:"proxyConfiguration" yaml:"proxyConfiguration"`
	// The task launch types the task definition was validated against.
	//
	// To determine which task launch types the task definition is validated for, see the `TaskDefinition$compatibilities` parameter.
	RequiresCompatibilities *[]*string `field:"optional" json:"requiresCompatibilities" yaml:"requiresCompatibilities"`
	// The operating system that your tasks definitions run on.
	//
	// A platform family is specified only for tasks using the Fargate launch type.
	//
	// When you specify a task definition in a service, this value must match the `runtimePlatform` value of the service.
	RuntimePlatform interface{} `field:"optional" json:"runtimePlatform" yaml:"runtimePlatform"`
	// The metadata that you apply to the task definition to help you categorize and organize them.
	//
	// Each tag consists of a key and an optional value. You define both of them.
	//
	// The following basic restrictions apply to tags:
	//
	// - Maximum number of tags per resource - 50
	// - For each resource, each tag key must be unique, and each tag key can have only one value.
	// - Maximum key length - 128 Unicode characters in UTF-8
	// - Maximum value length - 256 Unicode characters in UTF-8
	// - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
	// - Tag keys and values are case-sensitive.
	// - Do not use `aws:` , `AWS:` , or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
	// The short name or full Amazon Resource Name (ARN) of the AWS Identity and Access Management role that grants containers in the task permission to call AWS APIs on your behalf.
	//
	// For more information, see [Amazon ECS Task Role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// IAM roles for tasks on Windows require that the `-EnableTaskIAMRole` option is set when you launch the Amazon ECS-optimized Windows AMI. Your containers must also run some configuration code to use the feature. For more information, see [Windows IAM roles for tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html) in the *Amazon Elastic Container Service Developer Guide* .
	TaskRoleArn *string `field:"optional" json:"taskRoleArn" yaml:"taskRoleArn"`
	// The list of data volume definitions for the task.
	//
	// For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// > The `host` and `sourcePath` parameters aren't supported for tasks run on AWS Fargate .
	Volumes interface{} `field:"optional" json:"volumes" yaml:"volumes"`
}

Properties for defining a `CfnTaskDefinition`.

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"

cfnTaskDefinitionProps := &cfnTaskDefinitionProps{
	containerDefinitions: []interface{}{
		&containerDefinitionProperty{
			command: []*string{
				jsii.String("command"),
			},
			cpu: jsii.Number(123),
			dependsOn: []interface{}{
				&containerDependencyProperty{
					condition: jsii.String("condition"),
					containerName: jsii.String("containerName"),
				},
			},
			disableNetworking: jsii.Boolean(false),
			dnsSearchDomains: []*string{
				jsii.String("dnsSearchDomains"),
			},
			dnsServers: []*string{
				jsii.String("dnsServers"),
			},
			dockerLabels: map[string]*string{
				"dockerLabelsKey": jsii.String("dockerLabels"),
			},
			dockerSecurityOptions: []*string{
				jsii.String("dockerSecurityOptions"),
			},
			entryPoint: []*string{
				jsii.String("entryPoint"),
			},
			environment: []interface{}{
				&keyValuePairProperty{
					name: jsii.String("name"),
					value: jsii.String("value"),
				},
			},
			environmentFiles: []interface{}{
				&environmentFileProperty{
					type: jsii.String("type"),
					value: jsii.String("value"),
				},
			},
			essential: jsii.Boolean(false),
			extraHosts: []interface{}{
				&hostEntryProperty{
					hostname: jsii.String("hostname"),
					ipAddress: jsii.String("ipAddress"),
				},
			},
			firelensConfiguration: &firelensConfigurationProperty{
				options: map[string]*string{
					"optionsKey": jsii.String("options"),
				},
				type: jsii.String("type"),
			},
			healthCheck: &healthCheckProperty{
				command: []*string{
					jsii.String("command"),
				},
				interval: jsii.Number(123),
				retries: jsii.Number(123),
				startPeriod: jsii.Number(123),
				timeout: jsii.Number(123),
			},
			hostname: jsii.String("hostname"),
			image: jsii.String("image"),
			interactive: jsii.Boolean(false),
			links: []*string{
				jsii.String("links"),
			},
			linuxParameters: &linuxParametersProperty{
				capabilities: &kernelCapabilitiesProperty{
					add: []*string{
						jsii.String("add"),
					},
					drop: []*string{
						jsii.String("drop"),
					},
				},
				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{
						size: jsii.Number(123),

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

				// the properties below are optional
				options: map[string]*string{
					"optionsKey": jsii.String("options"),
				},
				secretOptions: []interface{}{
					&secretProperty{
						name: jsii.String("name"),
						valueFrom: jsii.String("valueFrom"),
					},
				},
			},
			memory: jsii.Number(123),
			memoryReservation: jsii.Number(123),
			mountPoints: []interface{}{
				&mountPointProperty{
					containerPath: jsii.String("containerPath"),
					readOnly: jsii.Boolean(false),
					sourceVolume: jsii.String("sourceVolume"),
				},
			},
			name: jsii.String("name"),
			portMappings: []interface{}{
				&portMappingProperty{
					containerPort: jsii.Number(123),
					hostPort: jsii.Number(123),
					protocol: jsii.String("protocol"),
				},
			},
			privileged: jsii.Boolean(false),
			pseudoTerminal: jsii.Boolean(false),
			readonlyRootFilesystem: jsii.Boolean(false),
			repositoryCredentials: &repositoryCredentialsProperty{
				credentialsParameter: jsii.String("credentialsParameter"),
			},
			resourceRequirements: []interface{}{
				&resourceRequirementProperty{
					type: jsii.String("type"),
					value: jsii.String("value"),
				},
			},
			secrets: []interface{}{
				&secretProperty{
					name: jsii.String("name"),
					valueFrom: jsii.String("valueFrom"),
				},
			},
			startTimeout: jsii.Number(123),
			stopTimeout: jsii.Number(123),
			systemControls: []interface{}{
				&systemControlProperty{
					namespace: jsii.String("namespace"),
					value: jsii.String("value"),
				},
			},
			ulimits: []interface{}{
				&ulimitProperty{
					hardLimit: jsii.Number(123),
					name: jsii.String("name"),
					softLimit: jsii.Number(123),
				},
			},
			user: jsii.String("user"),
			volumesFrom: []interface{}{
				&volumeFromProperty{
					readOnly: jsii.Boolean(false),
					sourceContainer: jsii.String("sourceContainer"),
				},
			},
			workingDirectory: jsii.String("workingDirectory"),
		},
	},
	cpu: jsii.String("cpu"),
	ephemeralStorage: &ephemeralStorageProperty{
		sizeInGiB: jsii.Number(123),
	},
	executionRoleArn: jsii.String("executionRoleArn"),
	family: jsii.String("family"),
	inferenceAccelerators: []interface{}{
		&inferenceAcceleratorProperty{
			deviceName: jsii.String("deviceName"),
			deviceType: jsii.String("deviceType"),
		},
	},
	ipcMode: jsii.String("ipcMode"),
	memory: jsii.String("memory"),
	networkMode: jsii.String("networkMode"),
	pidMode: jsii.String("pidMode"),
	placementConstraints: []interface{}{
		&taskDefinitionPlacementConstraintProperty{
			type: jsii.String("type"),

			// the properties below are optional
			expression: jsii.String("expression"),
		},
	},
	proxyConfiguration: &proxyConfigurationProperty{
		containerName: jsii.String("containerName"),

		// the properties below are optional
		proxyConfigurationProperties: []interface{}{
			&keyValuePairProperty{
				name: jsii.String("name"),
				value: jsii.String("value"),
			},
		},
		type: jsii.String("type"),
	},
	requiresCompatibilities: []*string{
		jsii.String("requiresCompatibilities"),
	},
	runtimePlatform: &runtimePlatformProperty{
		cpuArchitecture: jsii.String("cpuArchitecture"),
		operatingSystemFamily: jsii.String("operatingSystemFamily"),
	},
	tags: []cfnTag{
		&cfnTag{
			key: jsii.String("key"),
			value: jsii.String("value"),
		},
	},
	taskRoleArn: jsii.String("taskRoleArn"),
	volumes: []interface{}{
		&volumeProperty{
			dockerVolumeConfiguration: &dockerVolumeConfigurationProperty{
				autoprovision: jsii.Boolean(false),
				driver: jsii.String("driver"),
				driverOpts: map[string]*string{
					"driverOptsKey": jsii.String("driverOpts"),
				},
				labels: map[string]*string{
					"labelsKey": jsii.String("labels"),
				},
				scope: jsii.String("scope"),
			},
			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: &hostVolumePropertiesProperty{
				sourcePath: jsii.String("sourcePath"),
			},
			name: jsii.String("name"),
		},
	},
}

type CfnTaskDefinition_AuthorizationConfigProperty

type CfnTaskDefinition_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"`
	// Determines whether to use the Amazon ECS task IAM role defined in a task 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/AmazonECS/latest/developerguide/efs-volumes.html#efs-volume-accesspoints) in the *Amazon Elastic Container Service Developer Guide* .
	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 CfnTaskDefinition_ContainerDefinitionProperty

type CfnTaskDefinition_ContainerDefinitionProperty struct {
	// 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `COMMAND` parameter to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) . 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) . If there are multiple arguments, each argument is a separated string in the array.
	Command *[]*string `field:"optional" json:"command" yaml:"command"`
	// The number of `cpu` units 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--cpu-shares` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// This field is optional for tasks using the Fargate launch type, and the only requirement is that the total amount of CPU reserved for all containers within a task be lower than the task-level `cpu` value.
	//
	// > You can determine the number of CPU units that are available per EC2 instance type by multiplying the vCPUs listed for that instance type on the [Amazon EC2 Instances](https://docs.aws.amazon.com/ec2/instance-types/) detail page by 1,024.
	//
	// Linux containers share unallocated CPU units with other containers on the container instance with the same ratio as their allocated amount. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that's the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task is guaranteed a minimum of 512 CPU units when needed. Moreover, each container could float to higher CPU usage if the other container was not using it. If both tasks were 100% active all of the time, they would be limited to 512 CPU units.
	//
	// On Linux container instances, the Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. For more information, see [CPU share constraint](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#cpu-share-constraint) in the Docker documentation. The minimum valid CPU share value that the Linux kernel allows is 2. However, the CPU parameter isn't required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS container agent version:
	//
	// - *Agent versions less than or equal to 1.1.0:* Null and zero CPU values are passed to Docker as 0, which Docker then converts to 1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which the Linux kernel converts to two CPU shares.
	// - *Agent versions greater than or equal to 1.2.0:* Null, zero, and CPU values of 1 are passed to Docker as 2.
	//
	// On Windows container instances, the CPU limit is enforced as an absolute limit, or a quota. Windows containers only have access to the specified amount of CPU that's described in the task definition. A null or zero CPU value is passed to Docker as `0` , which Windows interprets as 1% of one CPU.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// The dependencies defined for container startup and shutdown.
	//
	// A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.
	//
	// For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent to turn on container dependencies. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide* . If you're using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the `ecs-init` package. If your container instances are launched from version `20190301` or later, then they contain the required versions of the container agent and `ecs-init` . For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// For tasks using the Fargate launch type, the task or service requires the following platforms:
	//
	// - Linux platform version `1.3.0` or later.
	// - Windows platform version `1.0.0` or later.
	DependsOn interface{} `field:"optional" json:"dependsOn" yaml:"dependsOn"`
	// When this parameter is true, networking is disabled within the container.
	//
	// This parameter maps to `NetworkDisabled` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) .
	//
	// > This parameter is not supported for Windows containers.
	DisableNetworking interface{} `field:"optional" json:"disableNetworking" yaml:"disableNetworking"`
	// A list of DNS search domains that are presented to the container.
	//
	// This parameter maps to `DnsSearch` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--dns-search` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > This parameter is not supported for Windows containers.
	DnsSearchDomains *[]*string `field:"optional" json:"dnsSearchDomains" yaml:"dnsSearchDomains"`
	// A list of DNS servers that are presented to the container.
	//
	// This parameter maps to `Dns` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--dns` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > This parameter is not supported for Windows containers.
	DnsServers *[]*string `field:"optional" json:"dnsServers" yaml:"dnsServers"`
	// A key/value map of labels to add to the container.
	//
	// This parameter maps to `Labels` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--label` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) . 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 in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`
	DockerLabels interface{} `field:"optional" json:"dockerLabels" yaml:"dockerLabels"`
	// A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems.
	//
	// This field isn't valid for containers in tasks using the Fargate launch type.
	//
	// With Windows containers, this parameter can be used to reference a credential spec file when configuring a container for Active Directory authentication. For more information, see [Using gMSAs for Windows Containers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows-gmsa.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// This parameter maps to `SecurityOpt` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--security-opt` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > The Amazon ECS container agent running on a container instance must register with the `ECS_SELINUX_CAPABLE=true` or `ECS_APPARMOR_CAPABLE=true` environment variables before containers placed on that instance can use these security 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* .
	//
	// For more information about valid values, see [Docker Run Security Configuration](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// Valid values: "no-new-privileges" | "apparmor:PROFILE" | "label:value" | "credentialspec:CredentialSpecFilePath".
	DockerSecurityOptions *[]*string `field:"optional" json:"dockerSecurityOptions" yaml:"dockerSecurityOptions"`
	// > Early versions of the Amazon ECS container agent don't properly handle `entryPoint` parameters.
	//
	// If you have problems using `entryPoint` , update your container agent or enter your commands and arguments as `command` array items instead.
	//
	// The entry point that's passed to the container. This parameter maps to `Entrypoint` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--entrypoint` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) . For more information, see [https://docs.docker.com/engine/reference/builder/#entrypoint](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/builder/#entrypoint) .
	EntryPoint *[]*string `field:"optional" json:"entryPoint" yaml:"entryPoint"`
	// 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--env` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > We don't recommend that you use plaintext environment variables for sensitive information, such as credential data.
	Environment interface{} `field:"optional" json:"environment" yaml:"environment"`
	// A list of files containing the environment variables to pass to a container.
	//
	// This parameter maps to the `--env-file` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// You can specify up to ten environment files. The file must have a `.env` file extension. Each line in an environment file contains an environment variable in `VARIABLE=VALUE` format. Lines beginning with `#` are treated as comments and are ignored. For more information about the environment variable file syntax, see [Declare default environment variables in file](https://docs.aws.amazon.com/https://docs.docker.com/compose/env-file/) .
	//
	// If there are environment variables specified using the `environment` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend that you use unique variable names. For more information, see [Specifying Environment Variables](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) in the *Amazon Elastic Container Service Developer Guide* .
	EnvironmentFiles interface{} `field:"optional" json:"environmentFiles" yaml:"environmentFiles"`
	// If the `essential` parameter of a container is marked as `true` , and that container fails or stops for any reason, all other containers that are part of the task are stopped.
	//
	// If the `essential` parameter of a container is marked as `false` , its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.
	//
	// All tasks must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see [Application Architecture](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html) in the *Amazon Elastic Container Service Developer Guide* .
	Essential interface{} `field:"optional" json:"essential" yaml:"essential"`
	// A list of hostnames and IP address mappings to append to the `/etc/hosts` file on the container.
	//
	// This parameter maps to `ExtraHosts` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--add-host` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > This parameter isn't supported for Windows containers or tasks that use the `awsvpc` network mode.
	ExtraHosts interface{} `field:"optional" json:"extraHosts" yaml:"extraHosts"`
	// The FireLens configuration for the container.
	//
	// This is used to specify and configure a log router for container logs. For more information, see [Custom Log Routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide* .
	FirelensConfiguration interface{} `field:"optional" json:"firelensConfiguration" yaml:"firelensConfiguration"`
	// The container health check command and associated configuration parameters for the container.
	//
	// This parameter maps to `HealthCheck` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `HEALTHCHECK` parameter of [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	HealthCheck interface{} `field:"optional" json:"healthCheck" yaml:"healthCheck"`
	// The hostname to use for your container.
	//
	// This parameter maps to `Hostname` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--hostname` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > The `hostname` parameter is not supported if you're using the `awsvpc` network mode.
	Hostname *string `field:"optional" json:"hostname" yaml:"hostname"`
	// The image used to start a container.
	//
	// This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with either `*repository-url* / *image* : *tag*` or `*repository-url* / *image* @ *digest*` . 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `IMAGE` parameter of [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// - When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image and tag for the container to use. However, subsequent updates to a repository image aren't propagated to already running tasks.
	// - Images in Amazon ECR repositories can be specified by either using the full `registry/repository:tag` or `registry/repository@digest` . For example, `012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest` or `012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE` .
	// - 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:"optional" json:"image" yaml:"image"`
	// When this parameter is `true` , you can deploy containerized applications that require `stdin` or a `tty` to be allocated.
	//
	// This parameter maps to `OpenStdin` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--interactive` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	Interactive interface{} `field:"optional" json:"interactive" yaml:"interactive"`
	// The `links` parameter allows containers to communicate with each other without the need for port mappings.
	//
	// This parameter is only supported if the network mode of a task definition is `bridge` . The `name:internalName` construct is analogous to `name:alias` in Docker links. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. For more information about linking Docker containers, go to [Legacy container links](https://docs.aws.amazon.com/https://docs.docker.com/network/links/) in the Docker documentation. This parameter maps to `Links` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--link` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > This parameter is not supported for Windows containers. > Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
	Links *[]*string `field:"optional" json:"links" yaml:"links"`
	// Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information see [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html) .
	//
	// > This parameter is not supported for Windows containers.
	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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) 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 may 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.
	//
	// > Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the [LogConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_LogConfiguration.html) data type). Additional log drivers may be available in future releases of the Amazon ECS container agent.
	//
	// 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 in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`
	//
	// > 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"`
	// The amount (in MiB) of memory to present to the container.
	//
	// If your container attempts to exceed the memory specified here, the container is killed. The total amount of memory reserved for all containers within a task must be lower than the task `memory` value, if one is specified. This parameter maps to `Memory` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--memory` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// If using the Fargate launch type, this parameter is optional.
	//
	// If using the EC2 launch type, you must specify either a task-level memory value or a container-level memory value. If you specify both a container-level `memory` and `memoryReservation` value, `memory` must be greater than `memoryReservation` . If you specify `memoryReservation` , then that value is subtracted from the available memory resources for the container instance where the container is placed. Otherwise, the value of `memory` is used.
	//
	// The Docker 20.10.0 or later daemon reserves a minimum of 6 MiB of memory for a container, so you should not specify fewer than 6 MiB of memory for your containers.
	//
	// The Docker 19.03.13-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 MiB of memory for your containers.
	Memory *float64 `field:"optional" json:"memory" yaml:"memory"`
	// The soft limit (in MiB) of memory to reserve for the container.
	//
	// When system memory is under heavy contention, Docker attempts to keep the container memory to this soft limit. However, your container can consume more memory when it needs to, up to either the hard limit specified with the `memory` parameter (if applicable), or all of the available memory on the container instance, whichever comes first. This parameter maps to `MemoryReservation` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--memory-reservation` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// If a task-level memory value is not specified, you must specify a non-zero integer for one or both of `memory` or `memoryReservation` in a container definition. If you specify both, `memory` must be greater than `memoryReservation` . If you specify `memoryReservation` , then that value is subtracted from the available memory resources for the container instance where the container is placed. Otherwise, the value of `memory` is used.
	//
	// For example, if your container normally uses 128 MiB of memory, but occasionally bursts to 256 MiB of memory for short periods of time, you can set a `memoryReservation` of 128 MiB, and a `memory` hard limit of 300 MiB. This configuration would allow the container to only reserve 128 MiB of memory from the remaining resources on the container instance, but also allow the container to consume more memory resources when needed.
	//
	// The Docker daemon reserves a minimum of 4 MiB of memory for a container. Therefore, we recommend that you specify fewer than 4 MiB of memory for your containers.
	MemoryReservation *float64 `field:"optional" json:"memoryReservation" yaml:"memoryReservation"`
	// 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--volume` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// Windows containers can mount whole directories on the same drive as `$env:ProgramData` . Windows containers can't mount directories on a different drive, and mount point can't be across drives.
	MountPoints interface{} `field:"optional" json:"mountPoints" yaml:"mountPoints"`
	// The name of a container.
	//
	// If you're linking multiple containers together in a task definition, the `name` of one container can be entered in the `links` of another container to connect the containers. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. This parameter maps to `name` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--name` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The list of port mappings for the container.
	//
	// Port mappings allow containers to access ports on the host container instance to send or receive traffic.
	//
	// For task definitions that use the `awsvpc` network mode, you should only specify the `containerPort` . The `hostPort` can be left blank or it must be the same value as the `containerPort` .
	//
	// Port mappings on Windows use the `NetNAT` gateway address rather than `localhost` . There is no loopback for port mappings on Windows, so you cannot access a container's mapped port from the host itself.
	//
	// This parameter maps to `PortBindings` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--publish` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) . If the network mode of a task definition is set to `none` , then you can't specify port mappings. If the network mode of a task definition is set to `host` , then host ports must either be undefined or they must match the container port in the port mapping.
	//
	// > After a task reaches the `RUNNING` status, manual and automatic host and container port assignments are visible in the *Network Bindings* section of a container description for a selected task in the Amazon ECS console. The assignments are also visible in the `networkBindings` section [DescribeTasks](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) responses.
	PortMappings interface{} `field:"optional" json:"portMappings" yaml:"portMappings"`
	// When this parameter is true, the container is given elevated privileges 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--privileged` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > This parameter is not supported for Windows containers or tasks run on AWS Fargate .
	Privileged interface{} `field:"optional" json:"privileged" yaml:"privileged"`
	// When this parameter is `true` , a TTY is allocated.
	//
	// This parameter maps to `Tty` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--tty` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	PseudoTerminal interface{} `field:"optional" json:"pseudoTerminal" yaml:"pseudoTerminal"`
	// 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--read-only` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > This parameter is not supported for Windows containers.
	ReadonlyRootFilesystem interface{} `field:"optional" json:"readonlyRootFilesystem" yaml:"readonlyRootFilesystem"`
	// The private repository authentication credentials to use.
	RepositoryCredentials interface{} `field:"optional" json:"repositoryCredentials" yaml:"repositoryCredentials"`
	// The type and amount of a resource to assign to a container.
	//
	// The only supported resource is a GPU.
	ResourceRequirements interface{} `field:"optional" json:"resourceRequirements" yaml:"resourceRequirements"`
	// The secrets to pass to the container.
	//
	// For more information, see [Specifying Sensitive Data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide* .
	Secrets interface{} `field:"optional" json:"secrets" yaml:"secrets"`
	// Time duration (in seconds) to wait before giving up on resolving dependencies for a container.
	//
	// For example, you specify two containers in a task definition with containerA having a dependency on containerB reaching a `COMPLETE` , `SUCCESS` , or `HEALTHY` status. If a `startTimeout` value is specified for containerB and it doesn't reach the desired status within that time then containerA gives up and not start. This results in the task transitioning to a `STOPPED` state.
	//
	// > When the `ECS_CONTAINER_START_TIMEOUT` container agent configuration variable is used, it's enforced independently from this start timeout value.
	//
	// For tasks using the Fargate launch type, the task or service requires the following platforms:
	//
	// - Linux platform version `1.3.0` or later.
	// - Windows platform version `1.0.0` or later.
	//
	// For tasks using the EC2 launch type, your container instances require at least version `1.26.0` of the container agent to use a container start timeout value. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide* . If you're using an Amazon ECS-optimized Linux AMI, your instance needs at least version `1.26.0-1` of the `ecs-init` package. If your container instances are launched from version `20190301` or later, then they contain the required versions of the container agent and `ecs-init` . For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide* .
	StartTimeout *float64 `field:"optional" json:"startTimeout" yaml:"startTimeout"`
	// Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.
	//
	// For tasks using the Fargate launch type, the task or service requires the following platforms:
	//
	// - Linux platform version `1.3.0` or later.
	// - Windows platform version `1.0.0` or later.
	//
	// The max stop timeout value is 120 seconds and if the parameter is not specified, the default value of 30 seconds is used.
	//
	// For tasks that use the EC2 launch type, if the `stopTimeout` parameter isn't specified, the value set for the Amazon ECS container agent configuration variable `ECS_CONTAINER_STOP_TIMEOUT` is used. If neither the `stopTimeout` parameter or the `ECS_CONTAINER_STOP_TIMEOUT` agent configuration variable are set, then the default values of 30 seconds for Linux containers and 30 seconds on Windows containers are used. Your container instances require at least version 1.26.0 of the container agent to use a container stop timeout value. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide* . If you're using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the `ecs-init` package. If your container instances are launched from version `20190301` or later, then they contain the required versions of the container agent and `ecs-init` . For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide* .
	StopTimeout *float64 `field:"optional" json:"stopTimeout" yaml:"stopTimeout"`
	// A list of namespaced kernel parameters to set in the container.
	//
	// This parameter maps to `Sysctls` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--sysctl` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > We don't recommended that you specify network-related `systemControls` parameters for multiple containers in a single task that also uses either the `awsvpc` or `host` network modes. For tasks that use the `awsvpc` network mode, the container that's started last determines which `systemControls` parameters take effect. For tasks that use the `host` network mode, it changes the container instance's namespaced kernel parameters as well as the containers.
	SystemControls interface{} `field:"optional" json:"systemControls" yaml:"systemControls"`
	// 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--ulimit` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/) . Valid naming values are displayed in the [Ulimit](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Ulimit.html) 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 in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`
	//
	// > This parameter is not supported for Windows containers.
	Ulimits interface{} `field:"optional" json:"ulimits" yaml:"ulimits"`
	// The user 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--user` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > When running tasks using the `host` network mode, don't run containers using the root user (UID 0). We recommend using a non-root user for better security.
	//
	// You can specify the `user` using the following formats. If specifying a UID or GID, you must specify it as a positive integer.
	//
	// - `user`
	// - `user:group`
	// - `uid`
	// - `uid:gid`
	// - `user:gid`
	// - `uid:group`
	//
	// > This parameter is not supported for Windows containers.
	User *string `field:"optional" json:"user" yaml:"user"`
	// Data volumes to mount from another container.
	//
	// This parameter maps to `VolumesFrom` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--volumes-from` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	VolumesFrom interface{} `field:"optional" json:"volumesFrom" yaml:"volumesFrom"`
	// The working directory to run commands inside the container in.
	//
	// This parameter maps to `WorkingDir` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--workdir` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
}

The `ContainerDefinition` property specifies a container definition.

Container definitions are used in task definitions to describe the different containers that are launched as part of a task.

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"

containerDefinitionProperty := &containerDefinitionProperty{
	command: []*string{
		jsii.String("command"),
	},
	cpu: jsii.Number(123),
	dependsOn: []interface{}{
		&containerDependencyProperty{
			condition: jsii.String("condition"),
			containerName: jsii.String("containerName"),
		},
	},
	disableNetworking: jsii.Boolean(false),
	dnsSearchDomains: []*string{
		jsii.String("dnsSearchDomains"),
	},
	dnsServers: []*string{
		jsii.String("dnsServers"),
	},
	dockerLabels: map[string]*string{
		"dockerLabelsKey": jsii.String("dockerLabels"),
	},
	dockerSecurityOptions: []*string{
		jsii.String("dockerSecurityOptions"),
	},
	entryPoint: []*string{
		jsii.String("entryPoint"),
	},
	environment: []interface{}{
		&keyValuePairProperty{
			name: jsii.String("name"),
			value: jsii.String("value"),
		},
	},
	environmentFiles: []interface{}{
		&environmentFileProperty{
			type: jsii.String("type"),
			value: jsii.String("value"),
		},
	},
	essential: jsii.Boolean(false),
	extraHosts: []interface{}{
		&hostEntryProperty{
			hostname: jsii.String("hostname"),
			ipAddress: jsii.String("ipAddress"),
		},
	},
	firelensConfiguration: &firelensConfigurationProperty{
		options: map[string]*string{
			"optionsKey": jsii.String("options"),
		},
		type: jsii.String("type"),
	},
	healthCheck: &healthCheckProperty{
		command: []*string{
			jsii.String("command"),
		},
		interval: jsii.Number(123),
		retries: jsii.Number(123),
		startPeriod: jsii.Number(123),
		timeout: jsii.Number(123),
	},
	hostname: jsii.String("hostname"),
	image: jsii.String("image"),
	interactive: jsii.Boolean(false),
	links: []*string{
		jsii.String("links"),
	},
	linuxParameters: &linuxParametersProperty{
		capabilities: &kernelCapabilitiesProperty{
			add: []*string{
				jsii.String("add"),
			},
			drop: []*string{
				jsii.String("drop"),
			},
		},
		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{
				size: jsii.Number(123),

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

		// the properties below are optional
		options: map[string]*string{
			"optionsKey": jsii.String("options"),
		},
		secretOptions: []interface{}{
			&secretProperty{
				name: jsii.String("name"),
				valueFrom: jsii.String("valueFrom"),
			},
		},
	},
	memory: jsii.Number(123),
	memoryReservation: jsii.Number(123),
	mountPoints: []interface{}{
		&mountPointProperty{
			containerPath: jsii.String("containerPath"),
			readOnly: jsii.Boolean(false),
			sourceVolume: jsii.String("sourceVolume"),
		},
	},
	name: jsii.String("name"),
	portMappings: []interface{}{
		&portMappingProperty{
			containerPort: jsii.Number(123),
			hostPort: jsii.Number(123),
			protocol: jsii.String("protocol"),
		},
	},
	privileged: jsii.Boolean(false),
	pseudoTerminal: jsii.Boolean(false),
	readonlyRootFilesystem: jsii.Boolean(false),
	repositoryCredentials: &repositoryCredentialsProperty{
		credentialsParameter: jsii.String("credentialsParameter"),
	},
	resourceRequirements: []interface{}{
		&resourceRequirementProperty{
			type: jsii.String("type"),
			value: jsii.String("value"),
		},
	},
	secrets: []interface{}{
		&secretProperty{
			name: jsii.String("name"),
			valueFrom: jsii.String("valueFrom"),
		},
	},
	startTimeout: jsii.Number(123),
	stopTimeout: jsii.Number(123),
	systemControls: []interface{}{
		&systemControlProperty{
			namespace: jsii.String("namespace"),
			value: jsii.String("value"),
		},
	},
	ulimits: []interface{}{
		&ulimitProperty{
			hardLimit: jsii.Number(123),
			name: jsii.String("name"),
			softLimit: jsii.Number(123),
		},
	},
	user: jsii.String("user"),
	volumesFrom: []interface{}{
		&volumeFromProperty{
			readOnly: jsii.Boolean(false),
			sourceContainer: jsii.String("sourceContainer"),
		},
	},
	workingDirectory: jsii.String("workingDirectory"),
}

type CfnTaskDefinition_ContainerDependencyProperty

type CfnTaskDefinition_ContainerDependencyProperty struct {
	// The dependency condition of the container. The following are the available conditions and their behavior:.
	//
	// - `START` - This condition emulates the behavior of links and volumes today. It validates that a dependent container is started before permitting other containers to start.
	// - `COMPLETE` - This condition validates that a dependent container runs to completion (exits) before permitting other containers to start. This can be useful for nonessential containers that run a script and then exit. This condition can't be set on an essential container.
	// - `SUCCESS` - This condition is the same as `COMPLETE` , but it also requires that the container exits with a `zero` status. This condition can't be set on an essential container.
	// - `HEALTHY` - This condition validates that the dependent container passes its Docker health check before permitting other containers to start. This requires that the dependent container has health checks configured. This condition is confirmed only at task startup.
	Condition *string `field:"optional" json:"condition" yaml:"condition"`
	// The name of a container.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
}

The `ContainerDependency` property specifies the dependencies defined for container startup and shutdown.

A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.

Your Amazon ECS container instances require at least version 1.26.0 of the container agent to enable container dependencies. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide* . If you are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the `ecs-init` package. If your container instances are launched from version `20190301` or later, then they contain the required versions of the container agent and `ecs-init` . For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide* .

> For tasks using the Fargate launch type, this parameter requires that the task or service uses platform version 1.3.0 or later.

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"

containerDependencyProperty := &containerDependencyProperty{
	condition: jsii.String("condition"),
	containerName: jsii.String("containerName"),
}

type CfnTaskDefinition_DeviceProperty

type CfnTaskDefinition_DeviceProperty struct {
	// The path inside the container at which to expose the host device.
	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"`
}

The `Device` property specifies an object representing a container instance host device.

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 CfnTaskDefinition_DockerVolumeConfigurationProperty

type CfnTaskDefinition_DockerVolumeConfigurationProperty struct {
	// If this value is `true` , the Docker volume is created if it doesn't already exist.
	//
	// > This field is only used if the `scope` is `shared` .
	Autoprovision interface{} `field:"optional" json:"autoprovision" yaml:"autoprovision"`
	// The Docker volume driver to use.
	//
	// The driver value must match the driver name provided by Docker because it is used for task placement. If the driver was installed using the Docker plugin CLI, use `docker plugin ls` to retrieve the driver name from your container instance. If the driver was installed using another method, use Docker plugin discovery to retrieve the driver name. For more information, see [Docker plugin discovery](https://docs.aws.amazon.com/https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery) . This parameter maps to `Driver` in the [Create a volume](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `xxdriver` option to [docker volume create](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/commandline/volume_create/) .
	Driver *string `field:"optional" json:"driver" yaml:"driver"`
	// A map of Docker driver-specific options passed through.
	//
	// This parameter maps to `DriverOpts` in the [Create a volume](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `xxopt` option to [docker volume create](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/commandline/volume_create/) .
	DriverOpts interface{} `field:"optional" json:"driverOpts" yaml:"driverOpts"`
	// Custom metadata to add to your Docker volume.
	//
	// This parameter maps to `Labels` in the [Create a volume](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `xxlabel` option to [docker volume create](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/commandline/volume_create/) .
	Labels interface{} `field:"optional" json:"labels" yaml:"labels"`
	// The scope for the Docker volume that determines its lifecycle.
	//
	// Docker volumes that are scoped to a `task` are automatically provisioned when the task starts and destroyed when the task stops. Docker volumes that are scoped as `shared` persist after the task stops.
	Scope *string `field:"optional" json:"scope" yaml:"scope"`
}

The `DockerVolumeConfiguration` property specifies a Docker volume configuration and is used when you use Docker volumes.

Docker volumes are only supported when you are using the EC2 launch type. Windows containers only support the use of the `local` driver. To use bind mounts, specify a `host` instead.

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"

dockerVolumeConfigurationProperty := &dockerVolumeConfigurationProperty{
	autoprovision: jsii.Boolean(false),
	driver: jsii.String("driver"),
	driverOpts: map[string]*string{
		"driverOptsKey": jsii.String("driverOpts"),
	},
	labels: map[string]*string{
		"labelsKey": jsii.String("labels"),
	},
	scope: jsii.String("scope"),
}

type CfnTaskDefinition_EFSVolumeConfigurationProperty

type CfnTaskDefinition_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 will be used. Specifying `/` will have the same effect as omitting this parameter.
	//
	// > If an EFS access point is specified in the `authorizationConfig` , the root directory parameter must either be omitted or set to `/` which will enforce the path set on the EFS access point.
	RootDirectory *string `field:"optional" json:"rootDirectory" yaml:"rootDirectory"`
	// Determines whether to use 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 do not specify a transit encryption port, it will use the port selection strategy that the Amazon EFS mount helper uses. 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 parameter is specified when you're using an Amazon Elastic File System file system for task storage.

For more information, see [Amazon EFS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html) in the *Amazon Elastic Container Service Developer 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 CfnTaskDefinition_EnvironmentFileProperty

type CfnTaskDefinition_EnvironmentFileProperty struct {
	// The file type to use.
	//
	// The only supported value is `s3` .
	Type *string `field:"optional" json:"type" yaml:"type"`
	// The Amazon Resource Name (ARN) of the Amazon S3 object containing the environment variable file.
	Value *string `field:"optional" json:"value" yaml:"value"`
}

A list of files containing the environment variables to pass to a container.

You can specify up to ten environment files. The file must have a `.env` file extension. Each line in an environment file should contain an environment variable in `VARIABLE=VALUE` format. Lines beginning with `#` are treated as comments and are ignored. For more information about the environment variable file syntax, see [Declare default environment variables in file](https://docs.aws.amazon.com/https://docs.docker.com/compose/env-file/) .

If there are environment variables specified using the `environment` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend that you use unique variable names. For more information, see [Specifying environment variables](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) in the *Amazon Elastic Container Service Developer Guide* .

This parameter is only supported for tasks hosted on Fargate using the following platform versions:

- Linux platform version `1.4.0` or later. - Windows platform version `1.0.0` or later.

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"

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

type CfnTaskDefinition_EphemeralStorageProperty

type CfnTaskDefinition_EphemeralStorageProperty struct {
	// The total amount, in GiB, of ephemeral storage to set for the task.
	//
	// The minimum supported value is `21` GiB and the maximum supported value is `200` GiB.
	SizeInGiB *float64 `field:"optional" json:"sizeInGiB" yaml:"sizeInGiB"`
}

The amount of ephemeral storage to allocate for the task.

This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate . For more information, see [Fargate task storage](https://docs.aws.amazon.com/AmazonECS/latest/userguide/using_data_volumes.html) in the *Amazon ECS User Guide for AWS Fargate* .

> This parameter is only supported for tasks hosted on Fargate using Linux platform version `1.4.0` or later. This parameter is not supported for Windows containers on Fargate.

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"

ephemeralStorageProperty := &ephemeralStorageProperty{
	sizeInGiB: jsii.Number(123),
}

type CfnTaskDefinition_FirelensConfigurationProperty

type CfnTaskDefinition_FirelensConfigurationProperty struct {
	// The options to use when configuring the log router.
	//
	// This field is optional and can be used to add additional metadata, such as the task, task definition, cluster, and container instance details to the log event.
	//
	// If specified, valid option keys are:
	//
	// - `enable-ecs-log-metadata` , which can be `true` or `false`
	// - `config-file-type` , which can be `s3` or `file`
	// - `config-file-value` , which is either an S3 ARN or a file path.
	Options interface{} `field:"optional" json:"options" yaml:"options"`
	// The log router to use.
	//
	// The valid values are `fluentd` or `fluentbit` .
	Type *string `field:"optional" json:"type" yaml:"type"`
}

The FireLens configuration for the container.

This is used to specify and configure a log router for container logs. For more information, see [Custom log routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer 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"

firelensConfigurationProperty := &firelensConfigurationProperty{
	options: map[string]*string{
		"optionsKey": jsii.String("options"),
	},
	type: jsii.String("type"),
}

type CfnTaskDefinition_HealthCheckProperty

type CfnTaskDefinition_HealthCheckProperty struct {
	// A string array representing the command that the container runs to determine if it is healthy.
	//
	// The string array must start with `CMD` to execute the command arguments directly, or `CMD-SHELL` to run the command with the container's default shell.
	//
	// When you use the AWS Management Console JSON panel, the AWS Command Line Interface , or the APIs, enclose the list of commands in brackets.
	//
	// `[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]`
	//
	// You don't need to include the brackets when you use the AWS Management Console.
	//
	// `"CMD-SHELL", "curl -f http://localhost/ || exit 1"`
	//
	// An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see `HealthCheck` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) .
	Command *[]*string `field:"optional" json:"command" yaml:"command"`
	// The time period in seconds between each health check execution.
	//
	// You may specify between 5 and 300 seconds. The default value is 30 seconds.
	Interval *float64 `field:"optional" json:"interval" yaml:"interval"`
	// The number of times to retry a failed health check before the container is considered unhealthy.
	//
	// You may specify between 1 and 10 retries. The default value is 3.
	Retries *float64 `field:"optional" json:"retries" yaml:"retries"`
	// The optional grace period to provide containers time to bootstrap before failed health checks count towards the maximum number of retries.
	//
	// You can specify between 0 and 300 seconds. By default, the `startPeriod` is disabled.
	//
	// > If a health check succeeds within the `startPeriod` , then the container is considered healthy and any subsequent failures count toward the maximum number of retries.
	StartPeriod *float64 `field:"optional" json:"startPeriod" yaml:"startPeriod"`
	// The time period in seconds to wait for a health check to succeed before it is considered a failure.
	//
	// You may specify between 2 and 60 seconds. The default value is 5.
	Timeout *float64 `field:"optional" json:"timeout" yaml:"timeout"`
}

The `HealthCheck` property specifies an object representing a container health check.

Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image (such as those specified in a parent image or from the image's Dockerfile).

The following are notes about container health check support:

- Container health checks require version 1.17.0 or greater of the Amazon ECS container agent. For more information, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) . - Container health checks are supported for Fargate tasks if you are using platform version 1.1.0 or greater. For more information, see [AWS Fargate Platform Versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) . - Container health checks are not supported for tasks that are part of a service that is configured to use a Classic Load Balancer.

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"

healthCheckProperty := &healthCheckProperty{
	command: []*string{
		jsii.String("command"),
	},
	interval: jsii.Number(123),
	retries: jsii.Number(123),
	startPeriod: jsii.Number(123),
	timeout: jsii.Number(123),
}

type CfnTaskDefinition_HostEntryProperty

type CfnTaskDefinition_HostEntryProperty struct {
	// The hostname to use in the `/etc/hosts` entry.
	Hostname *string `field:"optional" json:"hostname" yaml:"hostname"`
	// The IP address to use in the `/etc/hosts` entry.
	IpAddress *string `field:"optional" json:"ipAddress" yaml:"ipAddress"`
}

The `HostEntry` property specifies a hostname and an IP address that are added to the `/etc/hosts` file of a container through the `extraHosts` parameter of its `ContainerDefinition` resource.

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"

hostEntryProperty := &hostEntryProperty{
	hostname: jsii.String("hostname"),
	ipAddress: jsii.String("ipAddress"),
}

type CfnTaskDefinition_HostVolumePropertiesProperty

type CfnTaskDefinition_HostVolumePropertiesProperty struct {
	// When the `host` parameter is used, specify a `sourcePath` to declare 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 the `host` parameter contains a `sourcePath` file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the `sourcePath` value 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.
	//
	// If you're using the Fargate launch type, the `sourcePath` parameter is not supported.
	SourcePath *string `field:"optional" json:"sourcePath" yaml:"sourcePath"`
}

The `HostVolumeProperties` property specifies details on a container instance bind mount host volume.

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"

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

type CfnTaskDefinition_InferenceAcceleratorProperty

type CfnTaskDefinition_InferenceAcceleratorProperty struct {
	// The Elastic Inference accelerator device name.
	//
	// The `deviceName` must also be referenced in a container definition as a [ResourceRequirement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-resourcerequirement.html) .
	DeviceName *string `field:"optional" json:"deviceName" yaml:"deviceName"`
	// The Elastic Inference accelerator type to use.
	DeviceType *string `field:"optional" json:"deviceType" yaml:"deviceType"`
}

Details on an Elastic Inference accelerator.

For more information, see [Working with Amazon Elastic Inference on Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-eia.html) in the *Amazon Elastic Container Service Developer 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"

inferenceAcceleratorProperty := &inferenceAcceleratorProperty{
	deviceName: jsii.String("deviceName"),
	deviceType: jsii.String("deviceType"),
}

type CfnTaskDefinition_KernelCapabilitiesProperty

type CfnTaskDefinition_KernelCapabilitiesProperty struct {
	// The Linux capabilities for the container that have been added to the default configuration provided by Docker.
	//
	// This parameter maps to `CapAdd` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--cap-add` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > Tasks launched on AWS Fargate only support adding the `SYS_PTRACE` kernel capability.
	//
	// Valid values: `"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"`.
	Add *[]*string `field:"optional" json:"add" yaml:"add"`
	// The Linux capabilities for the container that have been removed from the default configuration provided by Docker.
	//
	// This parameter maps to `CapDrop` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--cap-drop` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// Valid values: `"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"`.
	Drop *[]*string `field:"optional" json:"drop" yaml:"drop"`
}

The `KernelCapabilities` property specifies the Linux capabilities for the container that are added to or dropped from the default configuration that is provided by Docker.

For more information on the default capabilities and the non-default available capabilities, see [Runtime privilege and Linux capabilities](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) in the *Docker run reference* . For more detailed information on these Linux capabilities, see the [capabilities(7)](https://docs.aws.amazon.com/http://man7.org/linux/man-pages/man7/capabilities.7.html) Linux manual page.

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"

kernelCapabilitiesProperty := &kernelCapabilitiesProperty{
	add: []*string{
		jsii.String("add"),
	},
	drop: []*string{
		jsii.String("drop"),
	},
}

type CfnTaskDefinition_KeyValuePairProperty

type CfnTaskDefinition_KeyValuePairProperty struct {
	// The name of the key-value pair.
	//
	// For environment variables, this is the name of the environment variable.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The value of the key-value pair.
	//
	// For environment variables, this is the value of the environment variable.
	Value *string `field:"optional" json:"value" yaml:"value"`
}

The `KeyValuePair` property specifies a key-value pair object.

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"

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

type CfnTaskDefinition_LinuxParametersProperty

type CfnTaskDefinition_LinuxParametersProperty struct {
	// The Linux capabilities for the container that are added to or dropped from the default configuration provided by Docker.
	//
	// > For tasks that use the Fargate launch type, `capabilities` is supported for all platform versions but the `add` parameter is only supported if using platform version 1.4.0 or later.
	Capabilities interface{} `field:"optional" json:"capabilities" yaml:"capabilities"`
	// 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.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--device` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > If you're using tasks that use the Fargate launch type, the `devices` parameter isn't supported.
	Devices interface{} `field:"optional" json:"devices" yaml:"devices"`
	// 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/#security-configuration) . 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 in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`
	InitProcessEnabled interface{} `field:"optional" json:"initProcessEnabled" yaml:"initProcessEnabled"`
	// The total amount of swap memory (in MiB) a container can use.
	//
	// This parameter will be translated to the `--memory-swap` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) where the value would be the sum of the container memory plus the `maxSwap` value.
	//
	// If a `maxSwap` value of `0` is specified, the container will not use swap. Accepted values are `0` or any positive integer. If the `maxSwap` parameter is omitted, the container will 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.
	//
	// > If you're using tasks that use the Fargate launch type, the `maxSwap` parameter isn't supported.
	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/#security-configuration) .
	//
	// > If you are using tasks that use the Fargate launch type, the `sharedMemorySize` parameter is not supported.
	SharedMemorySize *float64 `field:"optional" json:"sharedMemorySize" yaml:"sharedMemorySize"`
	// This allows you to tune a container's memory swappiness behavior.
	//
	// A `swappiness` value of `0` will cause swapping to not happen unless absolutely necessary. A `swappiness` value of `100` will cause pages to be swapped very aggressively. Accepted values are whole numbers between `0` and `100` . If the `swappiness` parameter is not specified, a default value of `60` is used. If a value is not specified for `maxSwap` then this parameter is ignored. This parameter maps to the `--memory-swappiness` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .
	//
	// > If you're using tasks that use the Fargate launch type, the `swappiness` parameter isn't supported.
	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/#security-configuration) .
	//
	// > If you're using tasks that use the Fargate launch type, the `tmpfs` parameter isn't supported.
	Tmpfs interface{} `field:"optional" json:"tmpfs" yaml:"tmpfs"`
}

The `LinuxParameters` property specifies Linux-specific options that are applied to the container, such as Linux [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html) .

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{
	capabilities: &kernelCapabilitiesProperty{
		add: []*string{
			jsii.String("add"),
		},
		drop: []*string{
			jsii.String("drop"),
		},
	},
	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{
			size: jsii.Number(123),

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

type CfnTaskDefinition_LogConfigurationProperty

type CfnTaskDefinition_LogConfigurationProperty struct {
	// The log driver to use for the container.
	//
	// For tasks on AWS Fargate , the supported log drivers are `awslogs` , `splunk` , and `awsfirelens` .
	//
	// For tasks hosted on Amazon EC2 instances, the supported log drivers are `awslogs` , `fluentd` , `gelf` , `json-file` , `journald` , `logentries` , `syslog` , `splunk` , and `awsfirelens` .
	//
	// For more information about using the `awslogs` log driver, see [Using the awslogs log driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// For more information about using the `awsfirelens` log driver, see [Custom log routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// > If you have a custom driver that isn't listed, 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 would like to have included. However, we don't currently provide support for running modified copies of this software.
	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 in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`
	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/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide* .
	SecretOptions interface{} `field:"optional" json:"secretOptions" yaml:"secretOptions"`
}

The `LogConfiguration` property specifies 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"

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

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

type CfnTaskDefinition_MountPointProperty

type CfnTaskDefinition_MountPointProperty struct {
	// The path on the container to mount the host volume at.
	ContainerPath *string `field:"optional" json:"containerPath" yaml:"containerPath"`
	// If this value is `true` , the container has read-only access to the volume.
	//
	// If this value is `false` , then 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.
	//
	// Must be a volume name referenced in the `name` parameter of task definition `volume` .
	SourceVolume *string `field:"optional" json:"sourceVolume" yaml:"sourceVolume"`
}

The `MountPoint` property specifies details on a volume mount point that is used in a container 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"

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

type CfnTaskDefinition_PortMappingProperty

type CfnTaskDefinition_PortMappingProperty struct {
	// The port number on the container that's bound to the user-specified or automatically assigned host port.
	//
	// If you use containers in a task with the `awsvpc` or `host` network mode, specify the exposed ports using `containerPort` .
	//
	// If you use containers in a task with the `bridge` network mode and you specify a container port and not a host port, your container automatically receives a host port in the ephemeral port range. For more information, see `hostPort` . Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.
	ContainerPort *float64 `field:"optional" json:"containerPort" yaml:"containerPort"`
	// The port number on the container instance to reserve for your container.
	//
	// If you are using containers in a task with the `awsvpc` or `host` network mode, the `hostPort` can either be left blank or set to the same value as the `containerPort` .
	//
	// If you are using containers in a task with the `bridge` network mode, you can specify a non-reserved host port for your container port mapping, or you can omit the `hostPort` (or set it to `0` ) while specifying a `containerPort` and your container automatically receives a port in the ephemeral port range for your container instance operating system and Docker version.
	//
	// The default ephemeral port range for Docker version 1.6.0 and later is listed on the instance under `/proc/sys/net/ipv4/ip_local_port_range` . If this kernel parameter is unavailable, the default ephemeral port range from 49153 through 65535 is used. Do not attempt to specify a host port in the ephemeral port range as these are reserved for automatic assignment. In general, ports below 32768 are outside of the ephemeral port range.
	//
	// > The default ephemeral port range from 49153 through 65535 is always used for Docker versions before 1.6.0.
	//
	// The default reserved ports are 22 for SSH, the Docker ports 2375 and 2376, and the Amazon ECS container agent ports 51678-51680. Any host port that was previously specified in a running task is also reserved while the task is running (after a task stops, the host port is released). The current reserved ports are displayed in the `remainingResources` of [DescribeContainerInstances](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeContainerInstances.html) output. A container instance can have up to 100 reserved ports at a time, including the default reserved ports. Automatically assigned ports don't count toward the 100 reserved ports limit.
	HostPort *float64 `field:"optional" json:"hostPort" yaml:"hostPort"`
	// The protocol used for the port mapping.
	//
	// Valid values are `tcp` and `udp` . The default is `tcp` .
	Protocol *string `field:"optional" json:"protocol" yaml:"protocol"`
}

The `PortMapping` property specifies a port mapping.

Port mappings allow containers to access ports on the host container instance to send or receive traffic. Port mappings are specified as part of the container definition.

If you are using containers in a task with the `awsvpc` or `host` network mode, exposed ports should be specified using `containerPort` . The `hostPort` can be left blank or it must be the same value as the `containerPort` .

After a task reaches the `RUNNING` status, manual and automatic host and container port assignments are visible in the `networkBindings` section of [DescribeTasks](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) API responses.

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"

portMappingProperty := &portMappingProperty{
	containerPort: jsii.Number(123),
	hostPort: jsii.Number(123),
	protocol: jsii.String("protocol"),
}

type CfnTaskDefinition_ProxyConfigurationProperty

type CfnTaskDefinition_ProxyConfigurationProperty struct {
	// The name of the container that will serve as the App Mesh proxy.
	ContainerName *string `field:"required" json:"containerName" yaml:"containerName"`
	// The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as key-value pairs.
	//
	// - `IgnoredUID` - (Required) The user ID (UID) of the proxy container as defined by the `user` parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If `IgnoredGID` is specified, this field can be empty.
	// - `IgnoredGID` - (Required) The group ID (GID) of the proxy container as defined by the `user` parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If `IgnoredUID` is specified, this field can be empty.
	// - `AppPorts` - (Required) The list of ports that the application uses. Network traffic to these ports is forwarded to the `ProxyIngressPort` and `ProxyEgressPort` .
	// - `ProxyIngressPort` - (Required) Specifies the port that incoming traffic to the `AppPorts` is directed to.
	// - `ProxyEgressPort` - (Required) Specifies the port that outgoing traffic from the `AppPorts` is directed to.
	// - `EgressIgnoredPorts` - (Required) The egress traffic going to the specified ports is ignored and not redirected to the `ProxyEgressPort` . It can be an empty list.
	// - `EgressIgnoredIPs` - (Required) The egress traffic going to the specified IP addresses is ignored and not redirected to the `ProxyEgressPort` . It can be an empty list.
	ProxyConfigurationProperties interface{} `field:"optional" json:"proxyConfigurationProperties" yaml:"proxyConfigurationProperties"`
	// The proxy type.
	//
	// The only supported value is `APPMESH` .
	Type *string `field:"optional" json:"type" yaml:"type"`
}

The `ProxyConfiguration` property specifies the details for the App Mesh proxy.

For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the `ecs-init` package to enable a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version `20190301` or later, then they contain the required versions of the container agent and `ecs-init` . For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide* .

For tasks using the Fargate launch type, the task or service requires platform version 1.3.0 or later.

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"

proxyConfigurationProperty := &proxyConfigurationProperty{
	containerName: jsii.String("containerName"),

	// the properties below are optional
	proxyConfigurationProperties: []interface{}{
		&keyValuePairProperty{
			name: jsii.String("name"),
			value: jsii.String("value"),
		},
	},
	type: jsii.String("type"),
}

type CfnTaskDefinition_RepositoryCredentialsProperty

type CfnTaskDefinition_RepositoryCredentialsProperty struct {
	// The Amazon Resource Name (ARN) of the secret containing the private repository credentials.
	//
	// > When you use the Amazon ECS API, AWS CLI , or AWS SDK, if the secret exists in the same Region as the task that you're launching then you can use either the full ARN or the name of the secret. When you use the AWS Management Console, you must specify the full ARN of the secret.
	CredentialsParameter *string `field:"optional" json:"credentialsParameter" yaml:"credentialsParameter"`
}

The `RepositoryCredentials` property specifies the repository credentials for private registry authentication.

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"

repositoryCredentialsProperty := &repositoryCredentialsProperty{
	credentialsParameter: jsii.String("credentialsParameter"),
}

type CfnTaskDefinition_ResourceRequirementProperty

type CfnTaskDefinition_ResourceRequirementProperty struct {
	// The type of resource to assign to a container.
	//
	// The supported values are `GPU` or `InferenceAccelerator` .
	Type *string `field:"required" json:"type" yaml:"type"`
	// The value for the specified resource type.
	//
	// If the `GPU` type is used, the value is the number of physical `GPUs` the Amazon ECS container agent will reserve for the container. The number of GPUs reserved for all containers in a task should not exceed the number of available GPUs on the container instance the task is launched on.
	//
	// If the `InferenceAccelerator` type is used, the `value` should match the `DeviceName` for an [InferenceAccelerator](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-inferenceaccelerator.html) specified in a task definition.
	Value *string `field:"required" json:"value" yaml:"value"`
}

The `ResourceRequirement` property specifies the type and amount of a resource to assign to a container.

The only supported resource is a GPU. For more information, see [Working with GPUs on Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-gpu.html) in the *Amazon Elastic Container Service Developer 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"

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

type CfnTaskDefinition_RuntimePlatformProperty

type CfnTaskDefinition_RuntimePlatformProperty struct {
	// The CPU architecture.
	//
	// You can run your Linux tasks on an ARM-based platform by setting the value to `ARM64` . This option is avaiable for tasks that run on Linux Amazon EC2 instance or Linux containers on Fargate.
	CpuArchitecture *string `field:"optional" json:"cpuArchitecture" yaml:"cpuArchitecture"`
	// The operating system.
	OperatingSystemFamily *string `field:"optional" json:"operatingSystemFamily" yaml:"operatingSystemFamily"`
}

Information about the platform for the Amazon ECS service or task.

For more informataion about `RuntimePlatform` , see RuntimePlatform(https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#runtime-platform) in the *Amazon Elastic Container Service Developer 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"

runtimePlatformProperty := &runtimePlatformProperty{
	cpuArchitecture: jsii.String("cpuArchitecture"),
	operatingSystemFamily: jsii.String("operatingSystemFamily"),
}

type CfnTaskDefinition_SecretProperty

type CfnTaskDefinition_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 SSM Parameter Store.
	//
	// For information about the require AWS Identity and Access Management permissions, see [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-secrets.html#secrets-iam) (for Secrets Manager) or [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-parameters.html) (for Systems Manager Parameter store) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// > If the SSM Parameter Store parameter exists in the same Region as the task 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"`
}

The `Secret` property specifies an object representing the secret to expose to your container.

For more information, see [Specifying Sensitive Data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer 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 CfnTaskDefinition_SystemControlProperty

type CfnTaskDefinition_SystemControlProperty struct {
	// The namespaced kernel parameter to set a `value` for.
	Namespace *string `field:"optional" json:"namespace" yaml:"namespace"`
	// The value for the namespaced kernel parameter that's specified in `namespace` .
	Value *string `field:"optional" json:"value" yaml:"value"`
}

A list of namespaced kernel parameters to set in the container.

This parameter maps to `Sysctls` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the `--sysctl` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) .

We don't recommend that you specify network-related `systemControls` parameters for multiple containers in a single task. This task also uses either the `awsvpc` or `host` network mode. It does it for the following reasons.

- For tasks that use the `awsvpc` network mode, if you set `systemControls` for any container, it applies to all containers in the task. If you set different `systemControls` for multiple containers in a single task, the container that's started last determines which `systemControls` take effect. - For tasks that use the `host` network mode, the `systemControls` parameter applies to the container instance's kernel parameter and that of all containers of any tasks running on that container instance.

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"

systemControlProperty := &systemControlProperty{
	namespace: jsii.String("namespace"),
	value: jsii.String("value"),
}

type CfnTaskDefinition_TaskDefinitionPlacementConstraintProperty

type CfnTaskDefinition_TaskDefinitionPlacementConstraintProperty struct {
	// The type of constraint.
	//
	// The `MemberOf` constraint restricts selection to be from a group of valid candidates.
	Type *string `field:"required" json:"type" yaml:"type"`
	// A cluster query language expression to apply to the constraint.
	//
	// For more information, see [Cluster query language](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) in the *Amazon Elastic Container Service Developer Guide* .
	Expression *string `field:"optional" json:"expression" yaml:"expression"`
}

The `TaskDefinitionPlacementConstraint` property specifies an object representing a constraint on task placement in the task definition.

If you are using the Fargate launch type, task placement constraints are not supported.

For more information, see [Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) in the *Amazon Elastic Container Service Developer 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"

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

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

type CfnTaskDefinition_TmpfsProperty

type CfnTaskDefinition_TmpfsProperty struct {
	// The maximum size (in MiB) of the tmpfs volume.
	Size *float64 `field:"required" json:"size" yaml:"size"`
	// The absolute file path where the tmpfs volume is to be mounted.
	ContainerPath *string `field:"optional" json:"containerPath" yaml:"containerPath"`
	// 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 `Tmpfs` property specifies the container path, mount options, and size of the tmpfs mount.

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{
	size: jsii.Number(123),

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

type CfnTaskDefinition_UlimitProperty

type CfnTaskDefinition_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` property specifies the `ulimit` settings to pass to 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"

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

type CfnTaskDefinition_VolumeFromProperty

type CfnTaskDefinition_VolumeFromProperty struct {
	// If this value is `true` , the container has read-only access to the volume.
	//
	// If this value is `false` , then the container can write to the volume. The default value is `false` .
	ReadOnly interface{} `field:"optional" json:"readOnly" yaml:"readOnly"`
	// The name of another container within the same task definition to mount volumes from.
	SourceContainer *string `field:"optional" json:"sourceContainer" yaml:"sourceContainer"`
}

The `VolumeFrom` property specifies details on a data volume from another container in the same task 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"

volumeFromProperty := &volumeFromProperty{
	readOnly: jsii.Boolean(false),
	sourceContainer: jsii.String("sourceContainer"),
}

type CfnTaskDefinition_VolumeProperty

type CfnTaskDefinition_VolumeProperty struct {
	// This parameter is specified when you use Docker volumes.
	//
	// Windows containers only support the use of the `local` driver. To use bind mounts, specify the `host` parameter instead.
	//
	// > Docker volumes aren't supported by tasks run on AWS Fargate .
	DockerVolumeConfiguration interface{} `field:"optional" json:"dockerVolumeConfiguration" yaml:"dockerVolumeConfiguration"`
	// This parameter is specified when you use an Amazon Elastic File System file system for task storage.
	EfsVolumeConfiguration interface{} `field:"optional" json:"efsVolumeConfiguration" yaml:"efsVolumeConfiguration"`
	// This parameter is specified when you use bind mount host volumes.
	//
	// The contents of the `host` parameter determine whether your bind mount host volume persists on the host container instance and where it's 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 that are associated with it stop running.
	//
	// Windows containers can mount whole directories on the same drive as `$env:ProgramData` . Windows containers can't mount directories on a different drive, and mount point can't be across drives. For example, you can mount `C:\my\path:C:\my\path` and `D:\:D:\` , but not `D:\my\path:C:\my\path` or `D:\:C:\my\path` .
	Host interface{} `field:"optional" json:"host" yaml:"host"`
	// The name of the volume.
	//
	// Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. This name is referenced in the `sourceVolume` parameter of container definition `mountPoints` .
	Name *string `field:"optional" json:"name" yaml:"name"`
}

The `Volume` property specifies a data volume used in a task definition.

For tasks that use a Docker volume, specify a `DockerVolumeConfiguration` . For tasks that use a bind mount host volume, specify a `host` and optional `sourcePath` . For more information, see [Using Data Volumes in Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html) .

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"

volumeProperty := &volumeProperty{
	dockerVolumeConfiguration: &dockerVolumeConfigurationProperty{
		autoprovision: jsii.Boolean(false),
		driver: jsii.String("driver"),
		driverOpts: map[string]*string{
			"driverOptsKey": jsii.String("driverOpts"),
		},
		labels: map[string]*string{
			"labelsKey": jsii.String("labels"),
		},
		scope: jsii.String("scope"),
	},
	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: &hostVolumePropertiesProperty{
		sourcePath: jsii.String("sourcePath"),
	},
	name: jsii.String("name"),
}

type CfnTaskSet

type CfnTaskSet interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The ID of the task set.
	AttrId() *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 short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.
	Cluster() *string
	SetCluster(val *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
	// An optional non-unique tag that identifies this task set in external systems.
	//
	// If the task set is associated with a service discovery registry, the tasks in this task set will have the `ECS_TASK_SET_EXTERNAL_ID` AWS Cloud Map attribute set to the provided value.
	ExternalId() *string
	SetExternalId(val *string)
	// The launch type that new tasks in the task set uses.
	//
	// For more information, see [Amazon ECS launch types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// If a `launchType` is specified, the `capacityProviderStrategy` parameter must be omitted.
	LaunchType() *string
	SetLaunchType(val *string)
	// A load balancer object representing the load balancer to use with the task set.
	//
	// The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
	LoadBalancers() interface{}
	SetLoadBalancers(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 network configuration for the task set.
	NetworkConfiguration() interface{}
	SetNetworkConfiguration(val interface{})
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The platform version that the tasks in the task set uses.
	//
	// A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the `LATEST` platform version is used.
	PlatformVersion() *string
	SetPlatformVersion(val *string)
	// 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
	// A floating-point percentage of your desired number of tasks to place and keep running in the task set.
	Scale() interface{}
	SetScale(val interface{})
	// The short name or full Amazon Resource Name (ARN) of the service to create the task set in.
	Service() *string
	SetService(val *string)
	// The details of the service discovery registries to assign to this task set.
	//
	// For more information, see [Service discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) .
	ServiceRegistries() interface{}
	SetServiceRegistries(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	// Experimental.
	Stack() awscdk.Stack
	// The task definition for the tasks in the task set to use.
	TaskDefinition() *string
	SetTaskDefinition(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::ECS::TaskSet`.

Create a task set in the specified cluster and service. This is used when a service uses the `EXTERNAL` deployment controller type. For more information, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the *Amazon Elastic Container Service Developer 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"

cfnTaskSet := awscdk.Aws_ecs.NewCfnTaskSet(this, jsii.String("MyCfnTaskSet"), &cfnTaskSetProps{
	cluster: jsii.String("cluster"),
	service: jsii.String("service"),
	taskDefinition: jsii.String("taskDefinition"),

	// the properties below are optional
	externalId: jsii.String("externalId"),
	launchType: jsii.String("launchType"),
	loadBalancers: []interface{}{
		&loadBalancerProperty{
			containerName: jsii.String("containerName"),
			containerPort: jsii.Number(123),
			loadBalancerName: jsii.String("loadBalancerName"),
			targetGroupArn: jsii.String("targetGroupArn"),
		},
	},
	networkConfiguration: &networkConfigurationProperty{
		awsVpcConfiguration: &awsVpcConfigurationProperty{
			subnets: []*string{
				jsii.String("subnets"),
			},

			// the properties below are optional
			assignPublicIp: jsii.String("assignPublicIp"),
			securityGroups: []*string{
				jsii.String("securityGroups"),
			},
		},
	},
	platformVersion: jsii.String("platformVersion"),
	scale: &scaleProperty{
		unit: jsii.String("unit"),
		value: jsii.Number(123),
	},
	serviceRegistries: []interface{}{
		&serviceRegistryProperty{
			containerName: jsii.String("containerName"),
			containerPort: jsii.Number(123),
			port: jsii.Number(123),
			registryArn: jsii.String("registryArn"),
		},
	},
})

func NewCfnTaskSet

func NewCfnTaskSet(scope awscdk.Construct, id *string, props *CfnTaskSetProps) CfnTaskSet

Create a new `AWS::ECS::TaskSet`.

type CfnTaskSetProps

type CfnTaskSetProps struct {
	// The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.
	Cluster *string `field:"required" json:"cluster" yaml:"cluster"`
	// The short name or full Amazon Resource Name (ARN) of the service to create the task set in.
	Service *string `field:"required" json:"service" yaml:"service"`
	// The task definition for the tasks in the task set to use.
	TaskDefinition *string `field:"required" json:"taskDefinition" yaml:"taskDefinition"`
	// An optional non-unique tag that identifies this task set in external systems.
	//
	// If the task set is associated with a service discovery registry, the tasks in this task set will have the `ECS_TASK_SET_EXTERNAL_ID` AWS Cloud Map attribute set to the provided value.
	ExternalId *string `field:"optional" json:"externalId" yaml:"externalId"`
	// The launch type that new tasks in the task set uses.
	//
	// For more information, see [Amazon ECS launch types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// If a `launchType` is specified, the `capacityProviderStrategy` parameter must be omitted.
	LaunchType *string `field:"optional" json:"launchType" yaml:"launchType"`
	// A load balancer object representing the load balancer to use with the task set.
	//
	// The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.
	LoadBalancers interface{} `field:"optional" json:"loadBalancers" yaml:"loadBalancers"`
	// The network configuration for the task set.
	NetworkConfiguration interface{} `field:"optional" json:"networkConfiguration" yaml:"networkConfiguration"`
	// The platform version that the tasks in the task set uses.
	//
	// A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the `LATEST` platform version is used.
	PlatformVersion *string `field:"optional" json:"platformVersion" yaml:"platformVersion"`
	// A floating-point percentage of your desired number of tasks to place and keep running in the task set.
	Scale interface{} `field:"optional" json:"scale" yaml:"scale"`
	// The details of the service discovery registries to assign to this task set.
	//
	// For more information, see [Service discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) .
	ServiceRegistries interface{} `field:"optional" json:"serviceRegistries" yaml:"serviceRegistries"`
}

Properties for defining a `CfnTaskSet`.

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"

cfnTaskSetProps := &cfnTaskSetProps{
	cluster: jsii.String("cluster"),
	service: jsii.String("service"),
	taskDefinition: jsii.String("taskDefinition"),

	// the properties below are optional
	externalId: jsii.String("externalId"),
	launchType: jsii.String("launchType"),
	loadBalancers: []interface{}{
		&loadBalancerProperty{
			containerName: jsii.String("containerName"),
			containerPort: jsii.Number(123),
			loadBalancerName: jsii.String("loadBalancerName"),
			targetGroupArn: jsii.String("targetGroupArn"),
		},
	},
	networkConfiguration: &networkConfigurationProperty{
		awsVpcConfiguration: &awsVpcConfigurationProperty{
			subnets: []*string{
				jsii.String("subnets"),
			},

			// the properties below are optional
			assignPublicIp: jsii.String("assignPublicIp"),
			securityGroups: []*string{
				jsii.String("securityGroups"),
			},
		},
	},
	platformVersion: jsii.String("platformVersion"),
	scale: &scaleProperty{
		unit: jsii.String("unit"),
		value: jsii.Number(123),
	},
	serviceRegistries: []interface{}{
		&serviceRegistryProperty{
			containerName: jsii.String("containerName"),
			containerPort: jsii.Number(123),
			port: jsii.Number(123),
			registryArn: jsii.String("registryArn"),
		},
	},
}

type CfnTaskSet_AwsVpcConfigurationProperty

type CfnTaskSet_AwsVpcConfigurationProperty struct {
	// The IDs of the subnets associated with the task or service.
	//
	// There's a limit of 16 subnets that can be specified per `AwsVpcConfiguration` .
	//
	// > All specified subnets must be from the same VPC.
	Subnets *[]*string `field:"required" json:"subnets" yaml:"subnets"`
	// Whether the task's elastic network interface receives a public IP address.
	//
	// The default value is `DISABLED` .
	AssignPublicIp *string `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"`
	// The IDs of the security groups associated with the task or service.
	//
	// If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified per `AwsVpcConfiguration` .
	//
	// > All specified security groups must be from the same VPC.
	SecurityGroups *[]*string `field:"optional" json:"securityGroups" yaml:"securityGroups"`
}

The networking details for a task.

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"

awsVpcConfigurationProperty := &awsVpcConfigurationProperty{
	subnets: []*string{
		jsii.String("subnets"),
	},

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

type CfnTaskSet_LoadBalancerProperty

type CfnTaskSet_LoadBalancerProperty struct {
	// The name of the container (as it appears in a container definition) to associate with the load balancer.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
	// The port on the container to associate with the load balancer.
	//
	// This port must correspond to a `containerPort` in the task definition the tasks in the service are using. For tasks that use the EC2 launch type, the container instance they're launched on must allow ingress traffic on the `hostPort` of the port mapping.
	ContainerPort *float64 `field:"optional" json:"containerPort" yaml:"containerPort"`
	// The name of the load balancer to associate with the Amazon ECS service or task set.
	//
	// A load balancer name is only specified when using a Classic Load Balancer. If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be omitted.
	LoadBalancerName *string `field:"optional" json:"loadBalancerName" yaml:"loadBalancerName"`
	// The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set.
	//
	// A target group ARN is only specified when using an Application Load Balancer or Network Load Balancer. If you're using a Classic Load Balancer, omit the target group ARN.
	//
	// For services using the `ECS` deployment controller, you can specify one or multiple target groups. For more information, see [Registering multiple target groups with a service](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// For services using the `CODE_DEPLOY` deployment controller, you're required to define two target groups for the load balancer. For more information, see [Blue/green deployment with CodeDeploy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-bluegreen.html) in the *Amazon Elastic Container Service Developer Guide* .
	//
	// > If your service's task definition uses the `awsvpc` network mode, you must choose `ip` as the target type, not `instance` . Do this when creating your target groups because tasks that use the `awsvpc` network mode are associated with an elastic network interface, not an Amazon EC2 instance. This network mode is required for the Fargate launch type.
	TargetGroupArn *string `field:"optional" json:"targetGroupArn" yaml:"targetGroupArn"`
}

Details on the load balancer or load balancers to use with a task set.

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"

loadBalancerProperty := &loadBalancerProperty{
	containerName: jsii.String("containerName"),
	containerPort: jsii.Number(123),
	loadBalancerName: jsii.String("loadBalancerName"),
	targetGroupArn: jsii.String("targetGroupArn"),
}

type CfnTaskSet_NetworkConfigurationProperty

type CfnTaskSet_NetworkConfigurationProperty struct {
	// The VPC subnets and security groups that are associated with a task.
	//
	// > All specified subnets and security groups must be from the same VPC.
	AwsVpcConfiguration interface{} `field:"optional" json:"awsVpcConfiguration" yaml:"awsVpcConfiguration"`
}

The network configuration for a task.

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{
	awsVpcConfiguration: &awsVpcConfigurationProperty{
		subnets: []*string{
			jsii.String("subnets"),
		},

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

type CfnTaskSet_ScaleProperty

type CfnTaskSet_ScaleProperty struct {
	// The unit of measure for the scale value.
	Unit *string `field:"optional" json:"unit" yaml:"unit"`
	// The value, specified as a percent total of a service's `desiredCount` , to scale the task set.
	//
	// Accepted values are numbers between 0 and 100.
	Value *float64 `field:"optional" json:"value" yaml:"value"`
}

A floating-point percentage of the desired number of tasks to place and keep running in the task set.

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"

scaleProperty := &scaleProperty{
	unit: jsii.String("unit"),
	value: jsii.Number(123),
}

type CfnTaskSet_ServiceRegistryProperty

type CfnTaskSet_ServiceRegistryProperty struct {
	// The container name value to be used for your service discovery service.
	//
	// It's already specified in the task definition. If the task definition that your service task specifies uses the `bridge` or `host` network mode, you must specify a `containerName` and `containerPort` combination from the task definition. If the task definition that your service task specifies uses the `awsvpc` network mode and a type SRV DNS record is used, you must specify either a `containerName` and `containerPort` combination or a `port` value. However, you can't specify both.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
	// The port value to be used for your service discovery service.
	//
	// It's already specified in the task definition. If the task definition your service task specifies uses the `bridge` or `host` network mode, you must specify a `containerName` and `containerPort` combination from the task definition. If the task definition your service task specifies uses the `awsvpc` network mode and a type SRV DNS record is used, you must specify either a `containerName` and `containerPort` combination or a `port` value. However, you can't specify both.
	ContainerPort *float64 `field:"optional" json:"containerPort" yaml:"containerPort"`
	// The port value used if your service discovery service specified an SRV record.
	//
	// This field might be used if both the `awsvpc` network mode and SRV records are used.
	Port *float64 `field:"optional" json:"port" yaml:"port"`
	// The Amazon Resource Name (ARN) of the service registry.
	//
	// The currently supported service registry is AWS Cloud Map . For more information, see [CreateService](https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html) .
	RegistryArn *string `field:"optional" json:"registryArn" yaml:"registryArn"`
}

The details for the service registry.

Each service may be associated with one service registry. Multiple service registries for each service are not supported.

When you add, update, or remove the service registries configuration, Amazon ECS starts a new deployment. New tasks are registered and deregistered to the updated service registry 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"

serviceRegistryProperty := &serviceRegistryProperty{
	containerName: jsii.String("containerName"),
	containerPort: jsii.Number(123),
	port: jsii.Number(123),
	registryArn: jsii.String("registryArn"),
}

type CloudMapNamespaceOptions

type CloudMapNamespaceOptions struct {
	// The name of the namespace, such as example.com.
	// Experimental.
	Name *string `field:"required" json:"name" yaml:"name"`
	// The type of CloudMap Namespace to create.
	// Experimental.
	Type awsservicediscovery.NamespaceType `field:"optional" json:"type" yaml:"type"`
	// The VPC to associate the namespace with.
	//
	// This property is required for private DNS namespaces.
	// Experimental.
	Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"`
}

The options for creating an AWS Cloud Map namespace.

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"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var vpc vpc

cloudMapNamespaceOptions := &cloudMapNamespaceOptions{
	name: jsii.String("name"),

	// the properties below are optional
	type: awscdk.Aws_servicediscovery.namespaceType_HTTP,
	vpc: vpc,
}

Experimental.

type CloudMapOptions

type CloudMapOptions struct {
	// The service discovery namespace for the Cloud Map service to attach to the ECS service.
	// Experimental.
	CloudMapNamespace awsservicediscovery.INamespace `field:"optional" json:"cloudMapNamespace" yaml:"cloudMapNamespace"`
	// The container to point to for a SRV record.
	// Experimental.
	Container ContainerDefinition `field:"optional" json:"container" yaml:"container"`
	// The port to point to for a SRV record.
	// Experimental.
	ContainerPort *float64 `field:"optional" json:"containerPort" yaml:"containerPort"`
	// The DNS record type that you want AWS Cloud Map to create.
	//
	// The supported record types are A or SRV.
	// Experimental.
	DnsRecordType awsservicediscovery.DnsRecordType `field:"optional" json:"dnsRecordType" yaml:"dnsRecordType"`
	// The amount of time that you want DNS resolvers to cache the settings for this record.
	// Experimental.
	DnsTtl awscdk.Duration `field:"optional" json:"dnsTtl" yaml:"dnsTtl"`
	// The number of 30-second intervals that you want Cloud Map to wait after receiving an UpdateInstanceCustomHealthStatus request before it changes the health status of a service instance.
	//
	// NOTE: This is used for HealthCheckCustomConfig.
	// Experimental.
	FailureThreshold *float64 `field:"optional" json:"failureThreshold" yaml:"failureThreshold"`
	// The name of the Cloud Map service to attach to the ECS service.
	// Experimental.
	Name *string `field:"optional" json:"name" yaml:"name"`
}

The options to enabling AWS Cloud Map for an Amazon ECS service.

Example:

var taskDefinition taskDefinition
var cluster cluster

service := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	cloudMapOptions: &cloudMapOptions{
		// Create A records - useful for AWSVPC network mode.
		dnsRecordType: cloudmap.dnsRecordType_A,
	},
})

Experimental.

type Cluster

type Cluster interface {
	awscdk.Resource
	ICluster
	// Getter for autoscaling group added to cluster.
	// Experimental.
	AutoscalingGroup() awsautoscaling.IAutoScalingGroup
	// The Amazon Resource Name (ARN) that identifies the cluster.
	// Experimental.
	ClusterArn() *string
	// The name of the cluster.
	// Experimental.
	ClusterName() *string
	// Manage the allowed network connections for the cluster with Security Groups.
	// Experimental.
	Connections() awsec2.Connections
	// Getter for namespace added to cluster.
	// Experimental.
	DefaultCloudMapNamespace() awsservicediscovery.INamespace
	// 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
	// Getter for execute command configuration associated with the cluster.
	// Experimental.
	ExecuteCommandConfiguration() *ExecuteCommandConfiguration
	// Whether the cluster has EC2 capacity associated with it.
	// Experimental.
	HasEc2Capacity() *bool
	// 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
	// The VPC associated with the cluster.
	// Experimental.
	Vpc() awsec2.IVpc
	// This method adds an Auto Scaling Group Capacity Provider to a cluster.
	// Experimental.
	AddAsgCapacityProvider(provider AsgCapacityProvider, options *AddAutoScalingGroupCapacityOptions)
	// This method adds compute capacity to a cluster using the specified AutoScalingGroup.
	// Deprecated: Use {@link Cluster.addAsgCapacityProvider} instead.
	AddAutoScalingGroup(autoScalingGroup awsautoscaling.AutoScalingGroup, options *AddAutoScalingGroupCapacityOptions)
	// It is highly recommended to use {@link Cluster.addAsgCapacityProvider} instead of this method.
	//
	// This method adds compute capacity to a cluster by creating an AutoScalingGroup with the specified options.
	//
	// Returns the AutoScalingGroup so you can add autoscaling settings to it.
	// Experimental.
	AddCapacity(id *string, options *AddCapacityOptions) awsautoscaling.AutoScalingGroup
	// This method enables the Fargate or Fargate Spot capacity providers on the cluster.
	// See: {@link addAsgCapacityProvider} to add an Auto Scaling Group capacity provider to the cluster.
	//
	// Deprecated: Use {@link enableFargateCapacityProviders} instead.
	AddCapacityProvider(provider *string)
	// Add an AWS Cloud Map DNS namespace for this cluster.
	//
	// NOTE: HttpNamespaces are not supported, as ECS always requires a DNSConfig when registering an instance to a Cloud
	// Map service.
	// Experimental.
	AddDefaultCloudMapNamespace(options *CloudMapNamespaceOptions) awsservicediscovery.INamespace
	// 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)
	// Enable the Fargate capacity providers for this cluster.
	// Experimental.
	EnableFargateCapacityProviders()
	// 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
	// This method returns the specifed CloudWatch metric for this cluster.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this clusters CPU reservation.
	// Experimental.
	MetricCpuReservation(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this clusters CPU utilization.
	// Experimental.
	MetricCpuUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this clusters memory reservation.
	// Experimental.
	MetricMemoryReservation(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this clusters memory utilization.
	// Experimental.
	MetricMemoryUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// 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
}

A regional grouping of one or more container instances on which you can run tasks and services.

Example:

var vpc vpc

cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
})

autoScalingGroup := autoscaling.NewAutoScalingGroup(this, jsii.String("ASG"), &autoScalingGroupProps{
	vpc: vpc,
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
	machineImage: ecs.ecsOptimizedImage.amazonLinux2(),
	minCapacity: jsii.Number(0),
	maxCapacity: jsii.Number(100),
})

capacityProvider := ecs.NewAsgCapacityProvider(this, jsii.String("AsgCapacityProvider"), &asgCapacityProviderProps{
	autoScalingGroup: autoScalingGroup,
})
cluster.addAsgCapacityProvider(capacityProvider)

taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))

taskDefinition.addContainer(jsii.String("web"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryReservationMiB: jsii.Number(256),
})

ecs.NewEc2Service(this, jsii.String("EC2Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	capacityProviderStrategies: []capacityProviderStrategy{
		&capacityProviderStrategy{
			capacityProvider: capacityProvider.capacityProviderName,
			weight: jsii.Number(1),
		},
	},
})

Experimental.

func NewCluster

func NewCluster(scope constructs.Construct, id *string, props *ClusterProps) Cluster

Constructs a new instance of the Cluster class. Experimental.

type ClusterAttributes

type ClusterAttributes struct {
	// The name of the cluster.
	// Experimental.
	ClusterName *string `field:"required" json:"clusterName" yaml:"clusterName"`
	// The security groups associated with the container instances registered to the cluster.
	// Experimental.
	SecurityGroups *[]awsec2.ISecurityGroup `field:"required" json:"securityGroups" yaml:"securityGroups"`
	// The VPC associated with the cluster.
	// Experimental.
	Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"`
	// Autoscaling group added to the cluster if capacity is added.
	// Experimental.
	AutoscalingGroup awsautoscaling.IAutoScalingGroup `field:"optional" json:"autoscalingGroup" yaml:"autoscalingGroup"`
	// The Amazon Resource Name (ARN) that identifies the cluster.
	// Experimental.
	ClusterArn *string `field:"optional" json:"clusterArn" yaml:"clusterArn"`
	// The AWS Cloud Map namespace to associate with the cluster.
	// Experimental.
	DefaultCloudMapNamespace awsservicediscovery.INamespace `field:"optional" json:"defaultCloudMapNamespace" yaml:"defaultCloudMapNamespace"`
	// The execute command configuration for the cluster.
	// Experimental.
	ExecuteCommandConfiguration *ExecuteCommandConfiguration `field:"optional" json:"executeCommandConfiguration" yaml:"executeCommandConfiguration"`
	// Specifies whether the cluster has EC2 instance capacity.
	// Experimental.
	HasEc2Capacity *bool `field:"optional" json:"hasEc2Capacity" yaml:"hasEc2Capacity"`
}

The properties to import from the ECS cluster.

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"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var autoScalingGroup autoScalingGroup
var bucket bucket
var key key
var logGroup logGroup
var namespace iNamespace
var securityGroup securityGroup
var vpc vpc

clusterAttributes := &clusterAttributes{
	clusterName: jsii.String("clusterName"),
	securityGroups: []iSecurityGroup{
		securityGroup,
	},
	vpc: vpc,

	// the properties below are optional
	autoscalingGroup: autoScalingGroup,
	clusterArn: jsii.String("clusterArn"),
	defaultCloudMapNamespace: namespace,
	executeCommandConfiguration: &executeCommandConfiguration{
		kmsKey: key,
		logConfiguration: &executeCommandLogConfiguration{
			cloudWatchEncryptionEnabled: jsii.Boolean(false),
			cloudWatchLogGroup: logGroup,
			s3Bucket: bucket,
			s3EncryptionEnabled: jsii.Boolean(false),
			s3KeyPrefix: jsii.String("s3KeyPrefix"),
		},
		logging: awscdk.Aws_ecs.executeCommandLogging_NONE,
	},
	hasEc2Capacity: jsii.Boolean(false),
}

Experimental.

type ClusterProps

type ClusterProps struct {
	// The ec2 capacity to add to the cluster.
	// Experimental.
	Capacity *AddCapacityOptions `field:"optional" json:"capacity" yaml:"capacity"`
	// The capacity providers to add to the cluster.
	// Deprecated: Use {@link ClusterProps.enableFargateCapacityProviders} instead.
	CapacityProviders *[]*string `field:"optional" json:"capacityProviders" yaml:"capacityProviders"`
	// The name for the cluster.
	// Experimental.
	ClusterName *string `field:"optional" json:"clusterName" yaml:"clusterName"`
	// If true CloudWatch Container Insights will be enabled for the cluster.
	// Experimental.
	ContainerInsights *bool `field:"optional" json:"containerInsights" yaml:"containerInsights"`
	// The service discovery namespace created in this cluster.
	// Experimental.
	DefaultCloudMapNamespace *CloudMapNamespaceOptions `field:"optional" json:"defaultCloudMapNamespace" yaml:"defaultCloudMapNamespace"`
	// Whether to enable Fargate Capacity Providers.
	// Experimental.
	EnableFargateCapacityProviders *bool `field:"optional" json:"enableFargateCapacityProviders" yaml:"enableFargateCapacityProviders"`
	// The execute command configuration for the cluster.
	// Experimental.
	ExecuteCommandConfiguration *ExecuteCommandConfiguration `field:"optional" json:"executeCommandConfiguration" yaml:"executeCommandConfiguration"`
	// The VPC where your ECS instances will be running or your ENIs will be deployed.
	// Experimental.
	Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"`
}

The properties used to define an ECS cluster.

Example:

vpc := ec2.vpc.fromLookup(this, jsii.String("Vpc"), &vpcLookupOptions{
	isDefault: jsii.Boolean(true),
})

cluster := ecs.NewCluster(this, jsii.String("FargateCluster"), &clusterProps{
	vpc: vpc,
})

taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &taskDefinitionProps{
	memoryMiB: jsii.String("512"),
	cpu: jsii.String("256"),
	compatibility: ecs.compatibility_FARGATE,
})

containerDefinition := taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("foo/bar")),
	memoryLimitMiB: jsii.Number(256),
})

runTask := tasks.NewEcsRunTask(this, jsii.String("RunFargate"), &ecsRunTaskProps{
	integrationPattern: sfn.integrationPattern_RUN_JOB,
	cluster: cluster,
	taskDefinition: taskDefinition,
	assignPublicIp: jsii.Boolean(true),
	containerOverrides: []containerOverride{
		&containerOverride{
			containerDefinition: containerDefinition,
			environment: []taskEnvironmentVariable{
				&taskEnvironmentVariable{
					name: jsii.String("SOME_KEY"),
					value: sfn.jsonPath.stringAt(jsii.String("$.SomeKey")),
				},
			},
		},
	},
	launchTarget: tasks.NewEcsFargateLaunchTarget(),
})

Experimental.

type CommonTaskDefinitionAttributes

type CommonTaskDefinitionAttributes struct {
	// The arn of the task definition.
	// Experimental.
	TaskDefinitionArn *string `field:"required" json:"taskDefinitionArn" yaml:"taskDefinitionArn"`
	// The networking mode to use for the containers in the task.
	// Experimental.
	NetworkMode NetworkMode `field:"optional" json:"networkMode" yaml:"networkMode"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
}

The common task definition attributes used across all types of task definitions.

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"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

commonTaskDefinitionAttributes := &commonTaskDefinitionAttributes{
	taskDefinitionArn: jsii.String("taskDefinitionArn"),

	// the properties below are optional
	networkMode: awscdk.Aws_ecs.networkMode_NONE,
	taskRole: role,
}

Experimental.

type CommonTaskDefinitionProps

type CommonTaskDefinitionProps struct {
	// The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf.
	//
	// The role will be used to retrieve container images from ECR and create CloudWatch log groups.
	// Experimental.
	ExecutionRole awsiam.IRole `field:"optional" json:"executionRole" yaml:"executionRole"`
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	// Experimental.
	Family *string `field:"optional" json:"family" yaml:"family"`
	// The configuration details for the App Mesh proxy.
	// Experimental.
	ProxyConfiguration ProxyConfiguration `field:"optional" json:"proxyConfiguration" yaml:"proxyConfiguration"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
	// The list of volume definitions for the task.
	//
	// For more information, see
	// [Task Definition Parameter Volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide//task_definition_parameters.html#volumes).
	// Experimental.
	Volumes *[]*Volume `field:"optional" json:"volumes" yaml:"volumes"`
}

The common properties for all task definitions.

For more information, see [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html).

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"
import "github.com/aws/aws-cdk-go/awscdk"

var proxyConfiguration proxyConfiguration
var role role

commonTaskDefinitionProps := &commonTaskDefinitionProps{
	executionRole: role,
	family: jsii.String("family"),
	proxyConfiguration: proxyConfiguration,
	taskRole: role,
	volumes: []volume{
		&volume{
			name: jsii.String("name"),

			// the properties below are optional
			dockerVolumeConfiguration: &dockerVolumeConfiguration{
				driver: jsii.String("driver"),
				scope: awscdk.Aws_ecs.scope_TASK,

				// the properties below are optional
				autoprovision: jsii.Boolean(false),
				driverOpts: map[string]*string{
					"driverOptsKey": jsii.String("driverOpts"),
				},
				labels: map[string]*string{
					"labelsKey": jsii.String("labels"),
				},
			},
			efsVolumeConfiguration: &efsVolumeConfiguration{
				fileSystemId: jsii.String("fileSystemId"),

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

Experimental.

type Compatibility

type Compatibility string

The task launch type compatibility requirement.

Example:

vpc := ec2.vpc.fromLookup(this, jsii.String("Vpc"), &vpcLookupOptions{
	isDefault: jsii.Boolean(true),
})

cluster := ecs.NewCluster(this, jsii.String("Ec2Cluster"), &clusterProps{
	vpc: vpc,
})
cluster.addCapacity(jsii.String("DefaultAutoScalingGroup"), &addCapacityOptions{
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
	vpcSubnets: &subnetSelection{
		subnetType: ec2.subnetType_PUBLIC,
	},
})

taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &taskDefinitionProps{
	compatibility: ecs.compatibility_EC2,
})

taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("foo/bar")),
	memoryLimitMiB: jsii.Number(256),
})

runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &ecsRunTaskProps{
	integrationPattern: sfn.integrationPattern_RUN_JOB,
	cluster: cluster,
	taskDefinition: taskDefinition,
	launchTarget: tasks.NewEcsEc2LaunchTarget(&ecsEc2LaunchTargetOptions{
		placementStrategies: []placementStrategy{
			ecs.*placementStrategy.spreadAcrossInstances(),
			ecs.*placementStrategy.packedByCpu(),
			ecs.*placementStrategy.randomly(),
		},
		placementConstraints: []placementConstraint{
			ecs.*placementConstraint.memberOf(jsii.String("blieptuut")),
		},
	}),
})

Experimental.

const (
	// The task should specify the EC2 launch type.
	// Experimental.
	Compatibility_EC2 Compatibility = "EC2"
	// The task should specify the Fargate launch type.
	// Experimental.
	Compatibility_FARGATE Compatibility = "FARGATE"
	// The task can specify either the EC2 or Fargate launch types.
	// Experimental.
	Compatibility_EC2_AND_FARGATE Compatibility = "EC2_AND_FARGATE"
	// The task should specify the External launch type.
	// Experimental.
	Compatibility_EXTERNAL Compatibility = "EXTERNAL"
)

type ContainerDefinition

type ContainerDefinition interface {
	awscdk.Construct
	// An array dependencies defined for container startup and shutdown.
	// Experimental.
	ContainerDependencies() *[]*ContainerDependency
	// The name of this container.
	// Experimental.
	ContainerName() *string
	// The port the container will listen on.
	// Experimental.
	ContainerPort() *float64
	// The environment files for this container.
	// Experimental.
	EnvironmentFiles() *[]*EnvironmentFileConfig
	// Specifies whether the container will be marked essential.
	//
	// If the essential parameter of a container is marked as true, and that container
	// fails or stops for any reason, all other containers that are part of the task are
	// stopped. If the essential parameter of a container is marked as false, then its
	// failure does not affect the rest of the containers in a task.
	//
	// If this parameter is omitted, a container is assumed to be essential.
	// Experimental.
	Essential() *bool
	// The name of the image referenced by this container.
	// Experimental.
	ImageName() *string
	// The inbound rules associated with the security group the task or service will use.
	//
	// This property is only used for tasks that use the awsvpc network mode.
	// Experimental.
	IngressPort() *float64
	// The Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
	// Experimental.
	LinuxParameters() LinuxParameters
	// The log configuration specification for the container.
	// Experimental.
	LogDriverConfig() *LogDriverConfig
	// Whether there was at least one memory limit specified in this definition.
	// Experimental.
	MemoryLimitSpecified() *bool
	// The mount points for data volumes in your container.
	// Experimental.
	MountPoints() *[]*MountPoint
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The list of port mappings for the container.
	//
	// Port mappings allow containers to access ports
	// on the host container instance to send or receive traffic.
	// Experimental.
	PortMappings() *[]*PortMapping
	// Whether this container definition references a specific JSON field of a secret stored in Secrets Manager.
	// Experimental.
	ReferencesSecretJsonField() *bool
	// The name of the task definition that includes this container definition.
	// Experimental.
	TaskDefinition() TaskDefinition
	// An array of ulimits to set in the container.
	// Experimental.
	Ulimits() *[]*Ulimit
	// The data volumes to mount from another container in the same task definition.
	// Experimental.
	VolumesFrom() *[]*VolumeFrom
	// This method adds one or more container dependencies to the container.
	// Experimental.
	AddContainerDependencies(containerDependencies ...*ContainerDependency)
	// This method adds an environment variable to the container.
	// Experimental.
	AddEnvironment(name *string, value *string)
	// This method adds one or more resources to the container.
	// Experimental.
	AddInferenceAcceleratorResource(inferenceAcceleratorResources ...*string)
	// This method adds a link which allows containers to communicate with each other without the need for port mappings.
	//
	// This parameter is only supported if the task definition is using the bridge network mode.
	// Warning: The --link flag is a legacy feature of Docker. It may eventually be removed.
	// Experimental.
	AddLink(container ContainerDefinition, alias *string)
	// This method adds one or more mount points for data volumes to the container.
	// Experimental.
	AddMountPoints(mountPoints ...*MountPoint)
	// This method adds one or more port mappings to the container.
	// Experimental.
	AddPortMappings(portMappings ...*PortMapping)
	// This method mounts temporary disk space to the container.
	//
	// This adds the correct container mountPoint and task definition volume.
	// Experimental.
	AddScratch(scratch *ScratchSpace)
	// This method adds the specified statement to the IAM task execution policy in the task definition.
	// Experimental.
	AddToExecutionPolicy(statement awsiam.PolicyStatement)
	// This method adds one or more ulimits to the container.
	// Experimental.
	AddUlimits(ulimits ...*Ulimit)
	// This method adds one or more volumes to the container.
	// Experimental.
	AddVolumesFrom(volumesFrom ...*VolumeFrom)
	// Returns the host port for the requested container port if it exists.
	// Experimental.
	FindPortMapping(containerPort *float64, protocol Protocol) *PortMapping
	// 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()
	// Render this container definition to a CloudFormation object.
	// Experimental.
	RenderContainerDefinition(_taskDefinition TaskDefinition) *CfnTaskDefinition_ContainerDefinitionProperty
	// 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
}

A container definition is used in a task definition to describe the containers that are launched as part of a task.

Example:

var taskDefinition taskDefinition
var cluster cluster

// Add a container to the task definition
specificContainer := taskDefinition.addContainer(jsii.String("Container"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("/aws/aws-example-app")),
	memoryLimitMiB: jsii.Number(2048),
})

// Add a port mapping
specificContainer.addPortMappings(&portMapping{
	containerPort: jsii.Number(7600),
	protocol: ecs.protocol_TCP,
})

ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	cloudMapOptions: &cloudMapOptions{
		// Create SRV records - useful for bridge networking
		dnsRecordType: cloudmap.dnsRecordType_SRV,
		// Targets port TCP port 7600 `specificContainer`
		container: specificContainer,
		containerPort: jsii.Number(7600),
	},
})

Experimental.

func NewContainerDefinition

func NewContainerDefinition(scope constructs.Construct, id *string, props *ContainerDefinitionProps) ContainerDefinition

Constructs a new instance of the ContainerDefinition class. Experimental.

type ContainerDefinitionOptions

type ContainerDefinitionOptions 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 either repository-url/image:tag or repository-url/image@digest.
	// TODO: Update these to specify using classes of IContainerImage.
	// Experimental.
	Image ContainerImage `field:"required" json:"image" yaml:"image"`
	// 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 name of the container.
	// Experimental.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
	// The minimum number of CPU units to reserve for the container.
	// Experimental.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// Specifies whether networking is disabled within the container.
	//
	// When this parameter is true, networking is disabled within the container.
	// Experimental.
	DisableNetworking *bool `field:"optional" json:"disableNetworking" yaml:"disableNetworking"`
	// A list of DNS search domains that are presented to the container.
	// Experimental.
	DnsSearchDomains *[]*string `field:"optional" json:"dnsSearchDomains" yaml:"dnsSearchDomains"`
	// A list of DNS servers that are presented to the container.
	// Experimental.
	DnsServers *[]*string `field:"optional" json:"dnsServers" yaml:"dnsServers"`
	// A key/value map of labels to add to the container.
	// Experimental.
	DockerLabels *map[string]*string `field:"optional" json:"dockerLabels" yaml:"dockerLabels"`
	// A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems.
	// Experimental.
	DockerSecurityOptions *[]*string `field:"optional" json:"dockerSecurityOptions" yaml:"dockerSecurityOptions"`
	// The ENTRYPOINT value to pass to the container.
	// See: https://docs.docker.com/engine/reference/builder/#entrypoint
	//
	// Experimental.
	EntryPoint *[]*string `field:"optional" json:"entryPoint" yaml:"entryPoint"`
	// The environment variables to pass to the container.
	// Experimental.
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// The environment files to pass to the container.
	// See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html
	//
	// Experimental.
	EnvironmentFiles *[]EnvironmentFile `field:"optional" json:"environmentFiles" yaml:"environmentFiles"`
	// Specifies whether the container is marked essential.
	//
	// If the essential parameter of a container is marked as true, and that container fails
	// or stops for any reason, all other containers that are part of the task are stopped.
	// If the essential parameter of a container is marked as false, then its failure does not
	// affect the rest of the containers in a task. All tasks must have at least one essential container.
	//
	// If this parameter is omitted, a container is assumed to be essential.
	// Experimental.
	Essential *bool `field:"optional" json:"essential" yaml:"essential"`
	// A list of hostnames and IP address mappings to append to the /etc/hosts file on the container.
	// Experimental.
	ExtraHosts *map[string]*string `field:"optional" json:"extraHosts" yaml:"extraHosts"`
	// The number of GPUs assigned to the container.
	// Experimental.
	GpuCount *float64 `field:"optional" json:"gpuCount" yaml:"gpuCount"`
	// The health check command and associated configuration parameters for the container.
	// Experimental.
	HealthCheck *HealthCheck `field:"optional" json:"healthCheck" yaml:"healthCheck"`
	// The hostname to use for your container.
	// Experimental.
	Hostname *string `field:"optional" json:"hostname" yaml:"hostname"`
	// The inference accelerators referenced by the container.
	// Experimental.
	InferenceAcceleratorResources *[]*string `field:"optional" json:"inferenceAcceleratorResources" yaml:"inferenceAcceleratorResources"`
	// Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
	//
	// For more information see [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html).
	// Experimental.
	LinuxParameters LinuxParameters `field:"optional" json:"linuxParameters" yaml:"linuxParameters"`
	// The log configuration specification for the container.
	// Experimental.
	Logging LogDriver `field:"optional" json:"logging" yaml:"logging"`
	// The amount (in MiB) of memory to present to the container.
	//
	// If your container attempts to exceed the allocated memory, the container
	// is terminated.
	//
	// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
	// Experimental.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
	// The soft limit (in MiB) of memory to reserve for the container.
	//
	// When system memory is under heavy contention, Docker attempts to keep the
	// container memory to this soft limit. However, your container can consume more
	// memory when it needs to, up to either the hard limit specified with the memory
	// parameter (if applicable), or all of the available memory on the container
	// instance, whichever comes first.
	//
	// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
	// Experimental.
	MemoryReservationMiB *float64 `field:"optional" json:"memoryReservationMiB" yaml:"memoryReservationMiB"`
	// The port mappings to add to the container definition.
	// Experimental.
	PortMappings *[]*PortMapping `field:"optional" json:"portMappings" yaml:"portMappings"`
	// Specifies whether the container is marked as privileged.
	//
	// 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.
	ReadonlyRootFilesystem *bool `field:"optional" json:"readonlyRootFilesystem" yaml:"readonlyRootFilesystem"`
	// The secret environment variables to pass to the container.
	// Experimental.
	Secrets *map[string]Secret `field:"optional" json:"secrets" yaml:"secrets"`
	// Time duration (in seconds) to wait before giving up on resolving dependencies for a container.
	// Experimental.
	StartTimeout awscdk.Duration `field:"optional" json:"startTimeout" yaml:"startTimeout"`
	// Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.
	// Experimental.
	StopTimeout awscdk.Duration `field:"optional" json:"stopTimeout" yaml:"stopTimeout"`
	// A list of namespaced kernel parameters to set in the container.
	// See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_systemcontrols
	//
	// Experimental.
	SystemControls *[]*SystemControl `field:"optional" json:"systemControls" yaml:"systemControls"`
	// The user name to use inside the container.
	// Experimental.
	User *string `field:"optional" json:"user" yaml:"user"`
	// The working directory in which to run commands inside the container.
	// Experimental.
	WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
}

Example:

var taskDefinition taskDefinition
var cluster cluster

// Add a container to the task definition
specificContainer := taskDefinition.addContainer(jsii.String("Container"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("/aws/aws-example-app")),
	memoryLimitMiB: jsii.Number(2048),
})

// Add a port mapping
specificContainer.addPortMappings(&portMapping{
	containerPort: jsii.Number(7600),
	protocol: ecs.protocol_TCP,
})

ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	cloudMapOptions: &cloudMapOptions{
		// Create SRV records - useful for bridge networking
		dnsRecordType: cloudmap.dnsRecordType_SRV,
		// Targets port TCP port 7600 `specificContainer`
		container: specificContainer,
		containerPort: jsii.Number(7600),
	},
})

Experimental.

type ContainerDefinitionProps

type ContainerDefinitionProps 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 either repository-url/image:tag or repository-url/image@digest.
	// TODO: Update these to specify using classes of IContainerImage.
	// Experimental.
	Image ContainerImage `field:"required" json:"image" yaml:"image"`
	// 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 name of the container.
	// Experimental.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
	// The minimum number of CPU units to reserve for the container.
	// Experimental.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// Specifies whether networking is disabled within the container.
	//
	// When this parameter is true, networking is disabled within the container.
	// Experimental.
	DisableNetworking *bool `field:"optional" json:"disableNetworking" yaml:"disableNetworking"`
	// A list of DNS search domains that are presented to the container.
	// Experimental.
	DnsSearchDomains *[]*string `field:"optional" json:"dnsSearchDomains" yaml:"dnsSearchDomains"`
	// A list of DNS servers that are presented to the container.
	// Experimental.
	DnsServers *[]*string `field:"optional" json:"dnsServers" yaml:"dnsServers"`
	// A key/value map of labels to add to the container.
	// Experimental.
	DockerLabels *map[string]*string `field:"optional" json:"dockerLabels" yaml:"dockerLabels"`
	// A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems.
	// Experimental.
	DockerSecurityOptions *[]*string `field:"optional" json:"dockerSecurityOptions" yaml:"dockerSecurityOptions"`
	// The ENTRYPOINT value to pass to the container.
	// See: https://docs.docker.com/engine/reference/builder/#entrypoint
	//
	// Experimental.
	EntryPoint *[]*string `field:"optional" json:"entryPoint" yaml:"entryPoint"`
	// The environment variables to pass to the container.
	// Experimental.
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// The environment files to pass to the container.
	// See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html
	//
	// Experimental.
	EnvironmentFiles *[]EnvironmentFile `field:"optional" json:"environmentFiles" yaml:"environmentFiles"`
	// Specifies whether the container is marked essential.
	//
	// If the essential parameter of a container is marked as true, and that container fails
	// or stops for any reason, all other containers that are part of the task are stopped.
	// If the essential parameter of a container is marked as false, then its failure does not
	// affect the rest of the containers in a task. All tasks must have at least one essential container.
	//
	// If this parameter is omitted, a container is assumed to be essential.
	// Experimental.
	Essential *bool `field:"optional" json:"essential" yaml:"essential"`
	// A list of hostnames and IP address mappings to append to the /etc/hosts file on the container.
	// Experimental.
	ExtraHosts *map[string]*string `field:"optional" json:"extraHosts" yaml:"extraHosts"`
	// The number of GPUs assigned to the container.
	// Experimental.
	GpuCount *float64 `field:"optional" json:"gpuCount" yaml:"gpuCount"`
	// The health check command and associated configuration parameters for the container.
	// Experimental.
	HealthCheck *HealthCheck `field:"optional" json:"healthCheck" yaml:"healthCheck"`
	// The hostname to use for your container.
	// Experimental.
	Hostname *string `field:"optional" json:"hostname" yaml:"hostname"`
	// The inference accelerators referenced by the container.
	// Experimental.
	InferenceAcceleratorResources *[]*string `field:"optional" json:"inferenceAcceleratorResources" yaml:"inferenceAcceleratorResources"`
	// Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
	//
	// For more information see [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html).
	// Experimental.
	LinuxParameters LinuxParameters `field:"optional" json:"linuxParameters" yaml:"linuxParameters"`
	// The log configuration specification for the container.
	// Experimental.
	Logging LogDriver `field:"optional" json:"logging" yaml:"logging"`
	// The amount (in MiB) of memory to present to the container.
	//
	// If your container attempts to exceed the allocated memory, the container
	// is terminated.
	//
	// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
	// Experimental.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
	// The soft limit (in MiB) of memory to reserve for the container.
	//
	// When system memory is under heavy contention, Docker attempts to keep the
	// container memory to this soft limit. However, your container can consume more
	// memory when it needs to, up to either the hard limit specified with the memory
	// parameter (if applicable), or all of the available memory on the container
	// instance, whichever comes first.
	//
	// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
	// Experimental.
	MemoryReservationMiB *float64 `field:"optional" json:"memoryReservationMiB" yaml:"memoryReservationMiB"`
	// The port mappings to add to the container definition.
	// Experimental.
	PortMappings *[]*PortMapping `field:"optional" json:"portMappings" yaml:"portMappings"`
	// Specifies whether the container is marked as privileged.
	//
	// 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.
	ReadonlyRootFilesystem *bool `field:"optional" json:"readonlyRootFilesystem" yaml:"readonlyRootFilesystem"`
	// The secret environment variables to pass to the container.
	// Experimental.
	Secrets *map[string]Secret `field:"optional" json:"secrets" yaml:"secrets"`
	// Time duration (in seconds) to wait before giving up on resolving dependencies for a container.
	// Experimental.
	StartTimeout awscdk.Duration `field:"optional" json:"startTimeout" yaml:"startTimeout"`
	// Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.
	// Experimental.
	StopTimeout awscdk.Duration `field:"optional" json:"stopTimeout" yaml:"stopTimeout"`
	// A list of namespaced kernel parameters to set in the container.
	// See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_systemcontrols
	//
	// Experimental.
	SystemControls *[]*SystemControl `field:"optional" json:"systemControls" yaml:"systemControls"`
	// The user name to use inside the container.
	// Experimental.
	User *string `field:"optional" json:"user" yaml:"user"`
	// The working directory in which to run commands inside the container.
	// Experimental.
	WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
	// The name of the task definition that includes this container definition.
	//
	// [disable-awslint:ref-via-interface].
	// Experimental.
	TaskDefinition TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"`
}

The properties in a container definition.

Example:

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

var containerImage containerImage
var duration duration
var environmentFile environmentFile
var linuxParameters linuxParameters
var logDriver logDriver
var secret secret
var taskDefinition taskDefinition

containerDefinitionProps := &containerDefinitionProps{
	image: containerImage,
	taskDefinition: taskDefinition,

	// the properties below are optional
	command: []*string{
		jsii.String("command"),
	},
	containerName: jsii.String("containerName"),
	cpu: jsii.Number(123),
	disableNetworking: jsii.Boolean(false),
	dnsSearchDomains: []*string{
		jsii.String("dnsSearchDomains"),
	},
	dnsServers: []*string{
		jsii.String("dnsServers"),
	},
	dockerLabels: map[string]*string{
		"dockerLabelsKey": jsii.String("dockerLabels"),
	},
	dockerSecurityOptions: []*string{
		jsii.String("dockerSecurityOptions"),
	},
	entryPoint: []*string{
		jsii.String("entryPoint"),
	},
	environment: map[string]*string{
		"environmentKey": jsii.String("environment"),
	},
	environmentFiles: []*environmentFile{
		environmentFile,
	},
	essential: jsii.Boolean(false),
	extraHosts: map[string]*string{
		"extraHostsKey": jsii.String("extraHosts"),
	},
	gpuCount: jsii.Number(123),
	healthCheck: &healthCheck{
		command: []*string{
			jsii.String("command"),
		},

		// the properties below are optional
		interval: duration,
		retries: jsii.Number(123),
		startPeriod: duration,
		timeout: duration,
	},
	hostname: jsii.String("hostname"),
	inferenceAcceleratorResources: []*string{
		jsii.String("inferenceAcceleratorResources"),
	},
	linuxParameters: linuxParameters,
	logging: logDriver,
	memoryLimitMiB: jsii.Number(123),
	memoryReservationMiB: jsii.Number(123),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(123),

			// the properties below are optional
			hostPort: jsii.Number(123),
			protocol: awscdk.Aws_ecs.protocol_TCP,
		},
	},
	privileged: jsii.Boolean(false),
	readonlyRootFilesystem: jsii.Boolean(false),
	secrets: map[string]*secret{
		"secretsKey": secret,
	},
	startTimeout: duration,
	stopTimeout: duration,
	systemControls: []systemControl{
		&systemControl{
			namespace: jsii.String("namespace"),
			value: jsii.String("value"),
		},
	},
	user: jsii.String("user"),
	workingDirectory: jsii.String("workingDirectory"),
}

Experimental.

type ContainerDependency

type ContainerDependency struct {
	// The container to depend on.
	// Experimental.
	Container ContainerDefinition `field:"required" json:"container" yaml:"container"`
	// The state the container needs to be in to satisfy the dependency and proceed with startup.
	//
	// Valid values are ContainerDependencyCondition.START, ContainerDependencyCondition.COMPLETE,
	// ContainerDependencyCondition.SUCCESS and ContainerDependencyCondition.HEALTHY.
	// Experimental.
	Condition ContainerDependencyCondition `field:"optional" json:"condition" yaml:"condition"`
}

The details of a dependency on another container in the task 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"

var containerDefinition containerDefinition

containerDependency := &containerDependency{
	container: containerDefinition,

	// the properties below are optional
	condition: awscdk.Aws_ecs.containerDependencyCondition_START,
}

See: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDependency.html

Experimental.

type ContainerDependencyCondition

type ContainerDependencyCondition string

Experimental.

const (
	// This condition emulates the behavior of links and volumes today.
	//
	// It validates that a dependent container is started before permitting other containers to start.
	// Experimental.
	ContainerDependencyCondition_START ContainerDependencyCondition = "START"
	// This condition validates that a dependent container runs to completion (exits) before permitting other containers to start.
	//
	// This can be useful for nonessential containers that run a script and then exit.
	// Experimental.
	ContainerDependencyCondition_COMPLETE ContainerDependencyCondition = "COMPLETE"
	// This condition is the same as COMPLETE, but it also requires that the container exits with a zero status.
	// Experimental.
	ContainerDependencyCondition_SUCCESS ContainerDependencyCondition = "SUCCESS"
	// This condition validates that the dependent container passes its Docker health check before permitting other containers to start.
	//
	// This requires that the dependent container has health checks configured. This condition is confirmed only at task startup.
	// Experimental.
	ContainerDependencyCondition_HEALTHY ContainerDependencyCondition = "HEALTHY"
)

type ContainerImage

type ContainerImage interface {
	// Called when the image is used by a ContainerDefinition.
	// Experimental.
	Bind(scope awscdk.Construct, containerDefinition ContainerDefinition) *ContainerImageConfig
}

Constructs for types of container images.

Example:

var vpc vpc

cluster := ecs.NewCluster(this, jsii.String("FargateCPCluster"), &clusterProps{
	vpc: vpc,
	enableFargateCapacityProviders: jsii.Boolean(true),
})

taskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"))

taskDefinition.addContainer(jsii.String("web"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
})

ecs.NewFargateService(this, jsii.String("FargateService"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	capacityProviderStrategies: []capacityProviderStrategy{
		&capacityProviderStrategy{
			capacityProvider: jsii.String("FARGATE_SPOT"),
			weight: jsii.Number(2),
		},
		&capacityProviderStrategy{
			capacityProvider: jsii.String("FARGATE"),
			weight: jsii.Number(1),
		},
	},
})

Experimental.

func AssetImage_FromDockerImageAsset

func AssetImage_FromDockerImageAsset(asset awsecrassets.DockerImageAsset) ContainerImage

Use an existing `DockerImageAsset` for this container image. Experimental.

func AssetImage_FromTarball

func AssetImage_FromTarball(tarballFile *string) ContainerImage

Use an existing tarball for this container image.

Use this method if the container image has already been created by another process (e.g. jib) and you want to add it as a container image asset. Experimental.

func ContainerImage_FromDockerImageAsset

func ContainerImage_FromDockerImageAsset(asset awsecrassets.DockerImageAsset) ContainerImage

Use an existing `DockerImageAsset` for this container image. Experimental.

func ContainerImage_FromTarball

func ContainerImage_FromTarball(tarballFile *string) ContainerImage

Use an existing tarball for this container image.

Use this method if the container image has already been created by another process (e.g. jib) and you want to add it as a container image asset. Experimental.

func EcrImage_FromDockerImageAsset

func EcrImage_FromDockerImageAsset(asset awsecrassets.DockerImageAsset) ContainerImage

Use an existing `DockerImageAsset` for this container image. Experimental.

func EcrImage_FromTarball

func EcrImage_FromTarball(tarballFile *string) ContainerImage

Use an existing tarball for this container image.

Use this method if the container image has already been created by another process (e.g. jib) and you want to add it as a container image asset. Experimental.

func RepositoryImage_FromDockerImageAsset

func RepositoryImage_FromDockerImageAsset(asset awsecrassets.DockerImageAsset) ContainerImage

Use an existing `DockerImageAsset` for this container image. Experimental.

func RepositoryImage_FromTarball

func RepositoryImage_FromTarball(tarballFile *string) ContainerImage

Use an existing tarball for this container image.

Use this method if the container image has already been created by another process (e.g. jib) and you want to add it as a container image asset. Experimental.

func TagParameterContainerImage_FromDockerImageAsset

func TagParameterContainerImage_FromDockerImageAsset(asset awsecrassets.DockerImageAsset) ContainerImage

Use an existing `DockerImageAsset` for this container image. Experimental.

func TagParameterContainerImage_FromTarball

func TagParameterContainerImage_FromTarball(tarballFile *string) ContainerImage

Use an existing tarball for this container image.

Use this method if the container image has already been created by another process (e.g. jib) and you want to add it as a container image asset. Experimental.

type ContainerImageConfig

type ContainerImageConfig struct {
	// Specifies the name of the container image.
	// Experimental.
	ImageName *string `field:"required" json:"imageName" yaml:"imageName"`
	// Specifies the credentials used to access the image repository.
	// Experimental.
	RepositoryCredentials *CfnTaskDefinition_RepositoryCredentialsProperty `field:"optional" json:"repositoryCredentials" yaml:"repositoryCredentials"`
}

The configuration for creating a container image.

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"

containerImageConfig := &containerImageConfig{
	imageName: jsii.String("imageName"),

	// the properties below are optional
	repositoryCredentials: &repositoryCredentialsProperty{
		credentialsParameter: jsii.String("credentialsParameter"),
	},
}

Experimental.

type CpuArchitecture

type CpuArchitecture interface {
}

The CpuArchitecture for Fargate Runtime Platform.

Example:

// Create a Task Definition for the Windows container to start
taskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	runtimePlatform: &runtimePlatform{
		operatingSystemFamily: ecs.operatingSystemFamily_WINDOWS_SERVER_2019_CORE(),
		cpuArchitecture: ecs.cpuArchitecture_X86_64(),
	},
	cpu: jsii.Number(1024),
	memoryLimitMiB: jsii.Number(2048),
})

taskDefinition.addContainer(jsii.String("windowsservercore"), &containerDefinitionOptions{
	logging: ecs.logDriver.awsLogs(&awsLogDriverProps{
		streamPrefix: jsii.String("win-iis-on-fargate"),
	}),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(80),
		},
	},
	image: ecs.containerImage.fromRegistry(jsii.String("mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019")),
})

Experimental.

func CpuArchitecture_ARM64

func CpuArchitecture_ARM64() CpuArchitecture

func CpuArchitecture_X86_64

func CpuArchitecture_X86_64() CpuArchitecture

type CpuUtilizationScalingProps

type CpuUtilizationScalingProps struct {
	// Indicates whether scale in by the target tracking policy is disabled.
	//
	// If the value is true, scale in is disabled and the target tracking policy
	// won't remove capacity from the scalable resource. Otherwise, scale in is
	// enabled and the target tracking policy can remove capacity from the
	// scalable resource.
	// Experimental.
	DisableScaleIn *bool `field:"optional" json:"disableScaleIn" yaml:"disableScaleIn"`
	// A name for the scaling policy.
	// Experimental.
	PolicyName *string `field:"optional" json:"policyName" yaml:"policyName"`
	// Period after a scale in activity completes before another scale in activity can start.
	// Experimental.
	ScaleInCooldown awscdk.Duration `field:"optional" json:"scaleInCooldown" yaml:"scaleInCooldown"`
	// Period after a scale out activity completes before another scale out activity can start.
	// Experimental.
	ScaleOutCooldown awscdk.Duration `field:"optional" json:"scaleOutCooldown" yaml:"scaleOutCooldown"`
	// The target value for CPU utilization across all tasks in the service.
	// Experimental.
	TargetUtilizationPercent *float64 `field:"required" json:"targetUtilizationPercent" yaml:"targetUtilizationPercent"`
}

The properties for enabling scaling based on CPU utilization.

Example:

var target applicationTargetGroup
var service baseService

scaling := service.autoScaleTaskCount(&enableScalingProps{
	maxCapacity: jsii.Number(10),
})
scaling.scaleOnCpuUtilization(jsii.String("CpuScaling"), &cpuUtilizationScalingProps{
	targetUtilizationPercent: jsii.Number(50),
})

scaling.scaleOnRequestCount(jsii.String("RequestScaling"), &requestCountScalingProps{
	requestsPerTarget: jsii.Number(10000),
	targetGroup: target,
})

Experimental.

type DeploymentCircuitBreaker

type DeploymentCircuitBreaker struct {
	// Whether to enable rollback on deployment failure.
	// Experimental.
	Rollback *bool `field:"optional" json:"rollback" yaml:"rollback"`
}

The deployment circuit breaker to use for the service.

Example:

var cluster cluster
var taskDefinition taskDefinition

service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	circuitBreaker: &deploymentCircuitBreaker{
		rollback: jsii.Boolean(true),
	},
})

Experimental.

type DeploymentController

type DeploymentController struct {
	// The deployment controller type to use.
	// Experimental.
	Type DeploymentControllerType `field:"optional" json:"type" yaml:"type"`
}

The deployment controller to use for the service.

Example:

var cluster cluster

loadBalancedFargateService := ecsPatterns.NewApplicationLoadBalancedFargateService(this, jsii.String("Service"), &applicationLoadBalancedFargateServiceProps{
	cluster: cluster,
	memoryLimitMiB: jsii.Number(1024),
	desiredCount: jsii.Number(1),
	cpu: jsii.Number(512),
	taskImageOptions: &applicationLoadBalancedTaskImageOptions{
		image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	},
	deploymentController: &deploymentController{
		type: ecs.deploymentControllerType_CODE_DEPLOY,
	},
})

Experimental.

type DeploymentControllerType

type DeploymentControllerType string

The deployment controller type to use for the service.

Example:

var cluster cluster

loadBalancedFargateService := ecsPatterns.NewApplicationLoadBalancedFargateService(this, jsii.String("Service"), &applicationLoadBalancedFargateServiceProps{
	cluster: cluster,
	memoryLimitMiB: jsii.Number(1024),
	desiredCount: jsii.Number(1),
	cpu: jsii.Number(512),
	taskImageOptions: &applicationLoadBalancedTaskImageOptions{
		image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	},
	deploymentController: &deploymentController{
		type: ecs.deploymentControllerType_CODE_DEPLOY,
	},
})

Experimental.

const (
	// The rolling update (ECS) deployment type involves replacing the current running version of the container with the latest version.
	// Experimental.
	DeploymentControllerType_ECS DeploymentControllerType = "ECS"
	// The blue/green (CODE_DEPLOY) deployment type uses the blue/green deployment model powered by AWS CodeDeploy.
	// Experimental.
	DeploymentControllerType_CODE_DEPLOY DeploymentControllerType = "CODE_DEPLOY"
	// The external (EXTERNAL) deployment type enables you to use any third-party deployment controller.
	// Experimental.
	DeploymentControllerType_EXTERNAL DeploymentControllerType = "EXTERNAL"
)

type Device

type Device struct {
	// The path for the device on the host container instance.
	// Experimental.
	HostPath *string `field:"required" json:"hostPath" yaml:"hostPath"`
	// The path inside the container at which to expose the host device.
	// Experimental.
	ContainerPath *string `field:"optional" json:"containerPath" yaml:"containerPath"`
	// 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.
	// Experimental.
	Permissions *[]DevicePermission `field:"optional" json:"permissions" yaml:"permissions"`
}

A container instance host device.

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"

device := &device{
	hostPath: jsii.String("hostPath"),

	// the properties below are optional
	containerPath: jsii.String("containerPath"),
	permissions: []devicePermission{
		awscdk.Aws_ecs.*devicePermission_READ,
	},
}

Experimental.

type DevicePermission

type DevicePermission string

Permissions for device access. Experimental.

const (
	// Read.
	// Experimental.
	DevicePermission_READ DevicePermission = "READ"
	// Write.
	// Experimental.
	DevicePermission_WRITE DevicePermission = "WRITE"
	// Make a node.
	// Experimental.
	DevicePermission_MKNOD DevicePermission = "MKNOD"
)

type DockerVolumeConfiguration

type DockerVolumeConfiguration struct {
	// The Docker volume driver to use.
	// Experimental.
	Driver *string `field:"required" json:"driver" yaml:"driver"`
	// The scope for the Docker volume that determines its lifecycle.
	// Experimental.
	Scope Scope `field:"required" json:"scope" yaml:"scope"`
	// Specifies whether the Docker volume should be created if it does not already exist.
	//
	// If true is specified, the Docker volume will be created for you.
	// Experimental.
	Autoprovision *bool `field:"optional" json:"autoprovision" yaml:"autoprovision"`
	// A map of Docker driver-specific options passed through.
	// Experimental.
	DriverOpts *map[string]*string `field:"optional" json:"driverOpts" yaml:"driverOpts"`
	// Custom metadata to add to your Docker volume.
	// Experimental.
	Labels *map[string]*string `field:"optional" json:"labels" yaml:"labels"`
}

The configuration for a Docker volume.

Docker volumes are only supported when you are using the EC2 launch type.

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"

dockerVolumeConfiguration := &dockerVolumeConfiguration{
	driver: jsii.String("driver"),
	scope: awscdk.Aws_ecs.scope_TASK,

	// the properties below are optional
	autoprovision: jsii.Boolean(false),
	driverOpts: map[string]*string{
		"driverOptsKey": jsii.String("driverOpts"),
	},
	labels: map[string]*string{
		"labelsKey": jsii.String("labels"),
	},
}

Experimental.

type Ec2Service

type Ec2Service interface {
	BaseService
	IEc2Service
	// The details of the AWS Cloud Map service.
	// Experimental.
	CloudmapService() awsservicediscovery.Service
	// Experimental.
	SetCloudmapService(val awsservicediscovery.Service)
	// The CloudMap service created for this service, if any.
	// Experimental.
	CloudMapService() awsservicediscovery.IService
	// The cluster that hosts the service.
	// Experimental.
	Cluster() ICluster
	// The security groups which manage the allowed network traffic for the service.
	// Experimental.
	Connections() awsec2.Connections
	// 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
	// A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
	// Experimental.
	LoadBalancers() *[]*CfnService_LoadBalancerProperty
	// Experimental.
	SetLoadBalancers(val *[]*CfnService_LoadBalancerProperty)
	// A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
	// Experimental.
	NetworkConfiguration() *CfnService_NetworkConfigurationProperty
	// Experimental.
	SetNetworkConfiguration(val *CfnService_NetworkConfigurationProperty)
	// 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 Amazon Resource Name (ARN) of the service.
	// Experimental.
	ServiceArn() *string
	// The name of the service.
	// Experimental.
	ServiceName() *string
	// The details of the service discovery registries to assign to this service.
	//
	// For more information, see Service Discovery.
	// Experimental.
	ServiceRegistries() *[]*CfnService_ServiceRegistryProperty
	// Experimental.
	SetServiceRegistries(val *[]*CfnService_ServiceRegistryProperty)
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The task definition to use for tasks in the service.
	// Experimental.
	TaskDefinition() TaskDefinition
	// Adds one or more placement constraints to use for tasks in the service.
	//
	// For more information, see
	// [Amazon ECS Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html).
	// Experimental.
	AddPlacementConstraints(constraints ...PlacementConstraint)
	// Adds one or more placement strategies to use for tasks in the service.
	//
	// For more information, see
	// [Amazon ECS Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html).
	// Experimental.
	AddPlacementStrategies(strategies ...PlacementStrategy)
	// 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)
	// Associates this service with a CloudMap service.
	// Experimental.
	AssociateCloudMapService(options *AssociateCloudMapServiceOptions)
	// This method is called to attach this service to an Application Load Balancer.
	//
	// Don't call this function directly. Instead, call `listener.addTargets()`
	// to add this service to a load balancer.
	// Experimental.
	AttachToApplicationTargetGroup(targetGroup awselasticloadbalancingv2.IApplicationTargetGroup) *awselasticloadbalancingv2.LoadBalancerTargetProps
	// Registers the service as a target of a Classic Load Balancer (CLB).
	//
	// Don't call this. Call `loadBalancer.addTarget()` instead.
	// Experimental.
	AttachToClassicLB(loadBalancer awselasticloadbalancing.LoadBalancer)
	// This method is called to attach this service to a Network Load Balancer.
	//
	// Don't call this function directly. Instead, call `listener.addTargets()`
	// to add this service to a load balancer.
	// Experimental.
	AttachToNetworkTargetGroup(targetGroup awselasticloadbalancingv2.INetworkTargetGroup) *awselasticloadbalancingv2.LoadBalancerTargetProps
	// An attribute representing the minimum and maximum task count for an AutoScalingGroup.
	// Experimental.
	AutoScaleTaskCount(props *awsapplicationautoscaling.EnableScalingProps) ScalableTaskCount
	// This method is called to create a networkConfiguration.
	// Deprecated: use configureAwsVpcNetworkingWithSecurityGroups instead.
	ConfigureAwsVpcNetworking(vpc awsec2.IVpc, assignPublicIp *bool, vpcSubnets *awsec2.SubnetSelection, securityGroup awsec2.ISecurityGroup)
	// This method is called to create a networkConfiguration.
	// Experimental.
	ConfigureAwsVpcNetworkingWithSecurityGroups(vpc awsec2.IVpc, assignPublicIp *bool, vpcSubnets *awsec2.SubnetSelection, securityGroups *[]awsec2.ISecurityGroup)
	// Enable CloudMap service discovery for the service.
	//
	// Returns: The created CloudMap service.
	// Experimental.
	EnableCloudMap(options *CloudMapOptions) awsservicediscovery.Service
	// 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
	// Return a load balancing target for a specific container and port.
	//
	// Use this function to create a load balancer target if you want to load balance to
	// another container than the first essential container or the first mapped port on
	// the container.
	//
	// Use the return value of this function where you would normally use a load balancer
	// target, instead of the `Service` object itself.
	//
	// Example:
	//   declare const listener: elbv2.ApplicationListener;
	//   declare const service: ecs.BaseService;
	//   listener.addTargets('ECS', {
	//     port: 80,
	//     targets: [service.loadBalancerTarget({
	//       containerName: 'MyContainer',
	//       containerPort: 1234,
	//     })],
	//   });
	//
	// Experimental.
	LoadBalancerTarget(options *LoadBalancerTargetOptions) IEcsLoadBalancerTarget
	// This method returns the specified CloudWatch metric name for this service.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this service's CPU utilization.
	// Experimental.
	MetricCpuUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this service's memory utilization.
	// Experimental.
	MetricMemoryUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// 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()
	// Use this function to create all load balancer targets to be registered in this service, add them to target groups, and attach target groups to listeners accordingly.
	//
	// Alternatively, you can use `listener.addTargets()` to create targets and add them to target groups.
	//
	// Example:
	//   declare const listener: elbv2.ApplicationListener;
	//   declare const service: ecs.BaseService;
	//   service.registerLoadBalancerTargets(
	//     {
	//       containerName: 'web',
	//       containerPort: 80,
	//       newTargetGroupId: 'ECS',
	//       listener: ecs.ListenerConfig.applicationListener(listener, {
	//         protocol: elbv2.ApplicationProtocol.HTTPS
	//       }),
	//     },
	//   )
	//
	// Experimental.
	RegisterLoadBalancerTargets(targets ...*EcsTarget)
	// 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
	// Validates this Ec2Service.
	// Experimental.
	Validate() *[]*string
}

This creates a service using the EC2 launch type on an ECS cluster.

Example:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elb.NewLoadBalancer(this, jsii.String("LB"), &loadBalancerProps{
	vpc: vpc,
})
lb.addListener(&loadBalancerListener{
	externalPort: jsii.Number(80),
})
lb.addTarget(service.loadBalancerTarget(&loadBalancerTargetOptions{
	containerName: jsii.String("MyContainer"),
	containerPort: jsii.Number(80),
}))

Experimental.

func NewEc2Service

func NewEc2Service(scope constructs.Construct, id *string, props *Ec2ServiceProps) Ec2Service

Constructs a new instance of the Ec2Service class. Experimental.

type Ec2ServiceAttributes

type Ec2ServiceAttributes struct {
	// The cluster that hosts the service.
	// Experimental.
	Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"`
	// The service ARN.
	// Experimental.
	ServiceArn *string `field:"optional" json:"serviceArn" yaml:"serviceArn"`
	// The name of the service.
	// Experimental.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
}

The properties to import from the service using the EC2 launch type.

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 cluster cluster

ec2ServiceAttributes := &ec2ServiceAttributes{
	cluster: cluster,

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

Experimental.

type Ec2ServiceProps

type Ec2ServiceProps struct {
	// The name of the cluster that hosts the service.
	// Experimental.
	Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"`
	// A list of Capacity Provider strategies used to place a service.
	// Experimental.
	CapacityProviderStrategies *[]*CapacityProviderStrategy `field:"optional" json:"capacityProviderStrategies" yaml:"capacityProviderStrategies"`
	// Whether to enable the deployment circuit breaker.
	//
	// If this property is defined, circuit breaker will be implicitly
	// enabled.
	// Experimental.
	CircuitBreaker *DeploymentCircuitBreaker `field:"optional" json:"circuitBreaker" yaml:"circuitBreaker"`
	// The options for configuring an Amazon ECS service to use service discovery.
	// Experimental.
	CloudMapOptions *CloudMapOptions `field:"optional" json:"cloudMapOptions" yaml:"cloudMapOptions"`
	// Specifies which deployment controller to use for the service.
	//
	// For more information, see
	// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
	// Experimental.
	DeploymentController *DeploymentController `field:"optional" json:"deploymentController" yaml:"deploymentController"`
	// The desired number of instantiations of the task definition to keep running on the service.
	// Experimental.
	DesiredCount *float64 `field:"optional" json:"desiredCount" yaml:"desiredCount"`
	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
	//
	// For more information, see
	// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
	// Experimental.
	EnableECSManagedTags *bool `field:"optional" json:"enableECSManagedTags" yaml:"enableECSManagedTags"`
	// Whether to enable the ability to execute into a container.
	// Experimental.
	EnableExecuteCommand *bool `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"`
	// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
	// Experimental.
	HealthCheckGracePeriod awscdk.Duration `field:"optional" json:"healthCheckGracePeriod" yaml:"healthCheckGracePeriod"`
	// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
	// Experimental.
	MaxHealthyPercent *float64 `field:"optional" json:"maxHealthyPercent" yaml:"maxHealthyPercent"`
	// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
	// Experimental.
	MinHealthyPercent *float64 `field:"optional" json:"minHealthyPercent" yaml:"minHealthyPercent"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE
	// Experimental.
	PropagateTags PropagatedTagSource `field:"optional" json:"propagateTags" yaml:"propagateTags"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Tags can only be propagated to the tasks within the service during service creation.
	// Deprecated: Use `propagateTags` instead.
	PropagateTaskTagsFrom PropagatedTagSource `field:"optional" json:"propagateTaskTagsFrom" yaml:"propagateTaskTagsFrom"`
	// The name of the service.
	// Experimental.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
	// The task definition to use for tasks in the service.
	//
	// [disable-awslint:ref-via-interface].
	// Experimental.
	TaskDefinition TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"`
	// Specifies whether the task's elastic network interface receives a public IP address.
	//
	// If true, each task will receive a public IP address.
	//
	// This property is only used for tasks that use the awsvpc network mode.
	// Experimental.
	AssignPublicIp *bool `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"`
	// Specifies whether the service will use the daemon scheduling strategy.
	//
	// If true, the service scheduler deploys exactly one task on each container instance in your cluster.
	//
	// When you are using this strategy, do not specify a desired number of tasks orany task placement strategies.
	// Experimental.
	Daemon *bool `field:"optional" json:"daemon" yaml:"daemon"`
	// The placement constraints to use for tasks in the service.
	//
	// For more information, see
	// [Amazon ECS Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html).
	// Experimental.
	PlacementConstraints *[]PlacementConstraint `field:"optional" json:"placementConstraints" yaml:"placementConstraints"`
	// The placement strategies to use for tasks in the service.
	//
	// For more information, see
	// [Amazon ECS Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html).
	// Experimental.
	PlacementStrategies *[]PlacementStrategy `field:"optional" json:"placementStrategies" yaml:"placementStrategies"`
	// The security groups to associate with the service.
	//
	// If you do not specify a security group, a new security group is created.
	//
	// This property is only used for tasks that use the awsvpc network mode.
	// Deprecated: use securityGroups instead.
	SecurityGroup awsec2.ISecurityGroup `field:"optional" json:"securityGroup" yaml:"securityGroup"`
	// The security groups to associate with the service.
	//
	// If you do not specify a security group, a new security group is created.
	//
	// This property is only used for tasks that use the awsvpc network mode.
	// Experimental.
	SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"`
	// The subnets to associate with the service.
	//
	// This property is only used for tasks that use the awsvpc network mode.
	// Experimental.
	VpcSubnets *awsec2.SubnetSelection `field:"optional" json:"vpcSubnets" yaml:"vpcSubnets"`
}

The properties for defining a service using the EC2 launch type.

Example:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elb.NewLoadBalancer(this, jsii.String("LB"), &loadBalancerProps{
	vpc: vpc,
})
lb.addListener(&loadBalancerListener{
	externalPort: jsii.Number(80),
})
lb.addTarget(service.loadBalancerTarget(&loadBalancerTargetOptions{
	containerName: jsii.String("MyContainer"),
	containerPort: jsii.Number(80),
}))

Experimental.

type Ec2TaskDefinition

type Ec2TaskDefinition interface {
	TaskDefinition
	IEc2TaskDefinition
	// The task launch type compatibility requirement.
	// Experimental.
	Compatibility() Compatibility
	// The container definitions.
	// Experimental.
	Containers() *[]ContainerDefinition
	// Default container for this task.
	//
	// Load balancers will send traffic to this container. The first
	// essential container that is added to this task will become the default
	// container.
	// Experimental.
	DefaultContainer() ContainerDefinition
	// Experimental.
	SetDefaultContainer(val ContainerDefinition)
	// 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 amount (in GiB) of ephemeral storage to be allocated to the task.
	//
	// Only supported in Fargate platform version 1.4.0 or later.
	// Experimental.
	EphemeralStorageGiB() *float64
	// Execution role for this task definition.
	// Experimental.
	ExecutionRole() awsiam.IRole
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	// Experimental.
	Family() *string
	// Public getter method to access list of inference accelerators attached to the instance.
	// Experimental.
	InferenceAccelerators() *[]*InferenceAccelerator
	// Return true if the task definition can be run on an EC2 cluster.
	// Experimental.
	IsEc2Compatible() *bool
	// Return true if the task definition can be run on a ECS anywhere cluster.
	// Experimental.
	IsExternalCompatible() *bool
	// Return true if the task definition can be run on a Fargate cluster.
	// Experimental.
	IsFargateCompatible() *bool
	// The networking mode to use for the containers in the task.
	// Experimental.
	NetworkMode() NetworkMode
	// 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
	// Whether this task definition has at least a container that references a specific JSON field of a secret stored in Secrets Manager.
	// Experimental.
	ReferencesSecretJsonField() *bool
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The full Amazon Resource Name (ARN) of the task definition.
	// Experimental.
	TaskDefinitionArn() *string
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole() awsiam.IRole
	// Adds a new container to the task definition.
	// Experimental.
	AddContainer(id *string, props *ContainerDefinitionOptions) ContainerDefinition
	// Adds the specified extension to the task definition.
	//
	// Extension can be used to apply a packaged modification to
	// a task definition.
	// Experimental.
	AddExtension(extension ITaskDefinitionExtension)
	// Adds a firelens log router to the task definition.
	// Experimental.
	AddFirelensLogRouter(id *string, props *FirelensLogRouterDefinitionOptions) FirelensLogRouter
	// Adds an inference accelerator to the task definition.
	// Experimental.
	AddInferenceAccelerator(inferenceAccelerator *InferenceAccelerator)
	// Adds the specified placement constraint to the task definition.
	// Experimental.
	AddPlacementConstraint(constraint PlacementConstraint)
	// Adds a policy statement to the task execution IAM role.
	// Experimental.
	AddToExecutionRolePolicy(statement awsiam.PolicyStatement)
	// Adds a policy statement to the task IAM role.
	// Experimental.
	AddToTaskRolePolicy(statement awsiam.PolicyStatement)
	// Adds a volume to the task definition.
	// Experimental.
	AddVolume(volume *Volume)
	// 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)
	// Returns the container that match the provided containerName.
	// Experimental.
	FindContainer(containerName *string) ContainerDefinition
	// 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
	// Creates the task execution IAM role if it doesn't already exist.
	// Experimental.
	ObtainExecutionRole() awsiam.IRole
	// 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
	// Validates the task definition.
	// Experimental.
	Validate() *[]*string
}

The details of a task definition run on an EC2 cluster.

Example:

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.splunk(&splunkLogDriverProps{
		token: awscdk.SecretValue.secretsManager(jsii.String("my-splunk-token")),
		url: jsii.String("my-splunk-url"),
	}),
})

Experimental.

func NewEc2TaskDefinition

func NewEc2TaskDefinition(scope constructs.Construct, id *string, props *Ec2TaskDefinitionProps) Ec2TaskDefinition

Constructs a new instance of the Ec2TaskDefinition class. Experimental.

type Ec2TaskDefinitionAttributes

type Ec2TaskDefinitionAttributes struct {
	// The arn of the task definition.
	// Experimental.
	TaskDefinitionArn *string `field:"required" json:"taskDefinitionArn" yaml:"taskDefinitionArn"`
	// The networking mode to use for the containers in the task.
	// Experimental.
	NetworkMode NetworkMode `field:"optional" json:"networkMode" yaml:"networkMode"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
}

Attributes used to import an existing EC2 task 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"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

ec2TaskDefinitionAttributes := &ec2TaskDefinitionAttributes{
	taskDefinitionArn: jsii.String("taskDefinitionArn"),

	// the properties below are optional
	networkMode: awscdk.Aws_ecs.networkMode_NONE,
	taskRole: role,
}

Experimental.

type Ec2TaskDefinitionProps

type Ec2TaskDefinitionProps struct {
	// The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf.
	//
	// The role will be used to retrieve container images from ECR and create CloudWatch log groups.
	// Experimental.
	ExecutionRole awsiam.IRole `field:"optional" json:"executionRole" yaml:"executionRole"`
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	// Experimental.
	Family *string `field:"optional" json:"family" yaml:"family"`
	// The configuration details for the App Mesh proxy.
	// Experimental.
	ProxyConfiguration ProxyConfiguration `field:"optional" json:"proxyConfiguration" yaml:"proxyConfiguration"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
	// The list of volume definitions for the task.
	//
	// For more information, see
	// [Task Definition Parameter Volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide//task_definition_parameters.html#volumes).
	// Experimental.
	Volumes *[]*Volume `field:"optional" json:"volumes" yaml:"volumes"`
	// The inference accelerators to use for the containers in the task.
	//
	// Not supported in Fargate.
	// Experimental.
	InferenceAccelerators *[]*InferenceAccelerator `field:"optional" json:"inferenceAccelerators" yaml:"inferenceAccelerators"`
	// The IPC resource namespace to use for the containers in the task.
	//
	// Not supported in Fargate and Windows containers.
	// Experimental.
	IpcMode IpcMode `field:"optional" json:"ipcMode" yaml:"ipcMode"`
	// The Docker networking mode to use for the containers in the task.
	//
	// The valid values are NONE, BRIDGE, AWS_VPC, and HOST.
	// Experimental.
	NetworkMode NetworkMode `field:"optional" json:"networkMode" yaml:"networkMode"`
	// The process namespace to use for the containers in the task.
	//
	// Not supported in Fargate and Windows containers.
	// Experimental.
	PidMode PidMode `field:"optional" json:"pidMode" yaml:"pidMode"`
	// An array of placement constraint objects to use for the task.
	//
	// You can
	// specify a maximum of 10 constraints per task (this limit includes
	// constraints in the task definition and those specified at run time).
	// Experimental.
	PlacementConstraints *[]PlacementConstraint `field:"optional" json:"placementConstraints" yaml:"placementConstraints"`
}

The properties for a task definition run on an EC2 cluster.

Example:

ec2TaskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"), &ec2TaskDefinitionProps{
	networkMode: ecs.networkMode_BRIDGE,
})

container := ec2TaskDefinition.addContainer(jsii.String("WebContainer"), &containerDefinitionOptions{
	// Use an image from DockerHub
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
})

Experimental.

type EcrImage

type EcrImage interface {
	ContainerImage
	// The image name. Images in Amazon ECR repositories can be specified by either using the full registry/repository:tag or registry/repository@digest.
	//
	// For example, 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest or
	// 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE.
	// Experimental.
	ImageName() *string
	// Called when the image is used by a ContainerDefinition.
	// Experimental.
	Bind(_scope awscdk.Construct, containerDefinition ContainerDefinition) *ContainerImageConfig
}

An image from an Amazon ECR repository.

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 AssetImage_FromEcrRepository

func AssetImage_FromEcrRepository(repository awsecr.IRepository, tag *string) EcrImage

Reference an image in an ECR repository. Experimental.

func ContainerImage_FromEcrRepository

func ContainerImage_FromEcrRepository(repository awsecr.IRepository, tag *string) EcrImage

Reference an image in an ECR repository. Experimental.

func EcrImage_FromEcrRepository

func EcrImage_FromEcrRepository(repository awsecr.IRepository, tag *string) EcrImage

Reference an image in an ECR repository. Experimental.

func NewEcrImage

func NewEcrImage(repository awsecr.IRepository, tagOrDigest *string) EcrImage

Constructs a new instance of the EcrImage class. Experimental.

func RepositoryImage_FromEcrRepository

func RepositoryImage_FromEcrRepository(repository awsecr.IRepository, tag *string) EcrImage

Reference an image in an ECR repository. Experimental.

func TagParameterContainerImage_FromEcrRepository

func TagParameterContainerImage_FromEcrRepository(repository awsecr.IRepository, tag *string) EcrImage

Reference an image in an ECR repository. Experimental.

type EcsOptimizedAmi deprecated

type EcsOptimizedAmi interface {
	awsec2.IMachineImage
	// Return the correct image.
	// Deprecated: see {@link EcsOptimizedImage#amazonLinux}, {@link EcsOptimizedImage#amazonLinux} and {@link EcsOptimizedImage#windows}.
	GetImage(scope awscdk.Construct) *awsec2.MachineImageConfig
}

Construct a Linux or Windows machine image from the latest ECS Optimized AMI published in SSM.

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,
	},
})

Deprecated: see {@link EcsOptimizedImage#amazonLinux}, {@link EcsOptimizedImage#amazonLinux} and {@link EcsOptimizedImage#windows}.

func NewEcsOptimizedAmi

func NewEcsOptimizedAmi(props *EcsOptimizedAmiProps) EcsOptimizedAmi

Constructs a new instance of the EcsOptimizedAmi class. Deprecated: see {@link EcsOptimizedImage#amazonLinux}, {@link EcsOptimizedImage#amazonLinux} and {@link EcsOptimizedImage#windows}.

type EcsOptimizedAmiProps deprecated

type EcsOptimizedAmiProps struct {
	// Whether the AMI ID is cached to be stable between deployments.
	//
	// By default, the newest image is used on each deployment. This will cause
	// instances to be replaced whenever a new version is released, and may cause
	// downtime if there aren't enough running instances in the AutoScalingGroup
	// to reschedule the tasks on.
	//
	// If set to true, the AMI ID will be cached in `cdk.context.json` and the
	// same value will be used on future runs. Your instances will not be replaced
	// but your AMI version will grow old over time. To refresh the AMI lookup,
	// you will have to evict the value from the cache using the `cdk context`
	// command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for
	// more information.
	//
	// Can not be set to `true` in environment-agnostic stacks.
	// Deprecated: see {@link EcsOptimizedImage}.
	CachedInContext *bool `field:"optional" json:"cachedInContext" yaml:"cachedInContext"`
	// The Amazon Linux generation to use.
	// Deprecated: see {@link EcsOptimizedImage}.
	Generation awsec2.AmazonLinuxGeneration `field:"optional" json:"generation" yaml:"generation"`
	// The ECS-optimized AMI variant to use.
	// Deprecated: see {@link EcsOptimizedImage}.
	HardwareType AmiHardwareType `field:"optional" json:"hardwareType" yaml:"hardwareType"`
	// The Windows Server version to use.
	// Deprecated: see {@link EcsOptimizedImage}.
	WindowsVersion WindowsOptimizedVersion `field:"optional" json:"windowsVersion" yaml:"windowsVersion"`
}

The properties that define which ECS-optimized AMI is used.

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,
	},
})

Deprecated: see {@link EcsOptimizedImage}.

type EcsOptimizedImage

type EcsOptimizedImage interface {
	awsec2.IMachineImage
	// Return the correct image.
	// Experimental.
	GetImage(scope awscdk.Construct) *awsec2.MachineImageConfig
}

Construct a Linux or Windows machine image from the latest ECS Optimized AMI published in SSM.

Example:

var vpc vpc

cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
})

// Either add default capacity
cluster.addCapacity(jsii.String("DefaultAutoScalingGroupCapacity"), &addCapacityOptions{
	instanceType: ec2.NewInstanceType(jsii.String("t2.xlarge")),
	desiredCapacity: jsii.Number(3),
})

// Or add customized capacity. Be sure to start the Amazon ECS-optimized AMI.
autoScalingGroup := autoscaling.NewAutoScalingGroup(this, jsii.String("ASG"), &autoScalingGroupProps{
	vpc: vpc,
	instanceType: ec2.NewInstanceType(jsii.String("t2.xlarge")),
	machineImage: ecs.ecsOptimizedImage.amazonLinux(),
	// Or use Amazon ECS-Optimized Amazon Linux 2 AMI
	// machineImage: EcsOptimizedImage.amazonLinux2(),
	desiredCapacity: jsii.Number(3),
})

capacityProvider := ecs.NewAsgCapacityProvider(this, jsii.String("AsgCapacityProvider"), &asgCapacityProviderProps{
	autoScalingGroup: autoScalingGroup,
})
cluster.addAsgCapacityProvider(capacityProvider)

Experimental.

func EcsOptimizedImage_AmazonLinux

func EcsOptimizedImage_AmazonLinux(options *EcsOptimizedImageOptions) EcsOptimizedImage

Construct an Amazon Linux AMI image from the latest ECS Optimized AMI published in SSM. Experimental.

func EcsOptimizedImage_AmazonLinux2

func EcsOptimizedImage_AmazonLinux2(hardwareType AmiHardwareType, options *EcsOptimizedImageOptions) EcsOptimizedImage

Construct an Amazon Linux 2 image from the latest ECS Optimized AMI published in SSM. Experimental.

func EcsOptimizedImage_Windows

func EcsOptimizedImage_Windows(windowsVersion WindowsOptimizedVersion, options *EcsOptimizedImageOptions) EcsOptimizedImage

Construct a Windows image from the latest ECS Optimized AMI published in SSM. Experimental.

type EcsOptimizedImageOptions

type EcsOptimizedImageOptions struct {
	// Whether the AMI ID is cached to be stable between deployments.
	//
	// By default, the newest image is used on each deployment. This will cause
	// instances to be replaced whenever a new version is released, and may cause
	// downtime if there aren't enough running instances in the AutoScalingGroup
	// to reschedule the tasks on.
	//
	// If set to true, the AMI ID will be cached in `cdk.context.json` and the
	// same value will be used on future runs. Your instances will not be replaced
	// but your AMI version will grow old over time. To refresh the AMI lookup,
	// you will have to evict the value from the cache using the `cdk context`
	// command. See https://docs.aws.amazon.com/cdk/latest/guide/context.html for
	// more information.
	//
	// Can not be set to `true` in environment-agnostic stacks.
	// Experimental.
	CachedInContext *bool `field:"optional" json:"cachedInContext" yaml:"cachedInContext"`
}

Additional configuration properties for EcsOptimizedImage factory functions.

Example:

var vpc vpc

autoScalingGroup := autoscaling.NewAutoScalingGroup(this, jsii.String("ASG"), &autoScalingGroupProps{
	machineImage: ecs.ecsOptimizedImage.amazonLinux(&ecsOptimizedImageOptions{
		cachedInContext: jsii.Boolean(true),
	}),
	vpc: vpc,
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
})

Experimental.

type EcsTarget

type EcsTarget struct {
	// The name of the container.
	// Experimental.
	ContainerName *string `field:"required" json:"containerName" yaml:"containerName"`
	// Listener and properties for adding target group to the listener.
	// Experimental.
	Listener ListenerConfig `field:"required" json:"listener" yaml:"listener"`
	// ID for a target group to be created.
	// Experimental.
	NewTargetGroupId *string `field:"required" json:"newTargetGroupId" yaml:"newTargetGroupId"`
	// The port number of the container.
	//
	// Only applicable when using application/network load balancers.
	// Experimental.
	ContainerPort *float64 `field:"optional" json:"containerPort" yaml:"containerPort"`
	// The protocol used for the port mapping.
	//
	// Only applicable when using application load balancers.
	// Experimental.
	Protocol Protocol `field:"optional" json:"protocol" yaml:"protocol"`
}

Example:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elbv2.NewApplicationLoadBalancer(this, jsii.String("LB"), &applicationLoadBalancerProps{
	vpc: vpc,
	internetFacing: jsii.Boolean(true),
})
listener := lb.addListener(jsii.String("Listener"), &baseApplicationListenerProps{
	port: jsii.Number(80),
})
service.registerLoadBalancerTargets(&ecsTarget{
	containerName: jsii.String("web"),
	containerPort: jsii.Number(80),
	newTargetGroupId: jsii.String("ECS"),
	listener: ecs.listenerConfig.applicationListener(listener, &addApplicationTargetsProps{
		protocol: elbv2.applicationProtocol_HTTPS,
	}),
})

Experimental.

type EfsVolumeConfiguration

type EfsVolumeConfiguration struct {
	// The Amazon EFS file system ID to use.
	// Experimental.
	FileSystemId *string `field:"required" json:"fileSystemId" yaml:"fileSystemId"`
	// The authorization configuration details for the Amazon EFS file system.
	// Experimental.
	AuthorizationConfig *AuthorizationConfig `field:"optional" json:"authorizationConfig" yaml:"authorizationConfig"`
	// The directory within the Amazon EFS file system to mount as the root directory inside the host.
	//
	// Specifying / will have the same effect as omitting this parameter.
	// Experimental.
	RootDirectory *string `field:"optional" json:"rootDirectory" yaml:"rootDirectory"`
	// Whether or not 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.
	//
	// Valid values: ENABLED | DISABLED.
	// Experimental.
	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.
	//
	// EFS mount helper uses.
	// Experimental.
	TransitEncryptionPort *float64 `field:"optional" json:"transitEncryptionPort" yaml:"transitEncryptionPort"`
}

The configuration for an Elastic FileSystem volume.

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"

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

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

Experimental.

type EnvironmentFile

type EnvironmentFile interface {
	// Called when the container is initialized to allow this object to bind to the stack.
	// Experimental.
	Bind(scope awscdk.Construct) *EnvironmentFileConfig
}

Constructs for types of environment files.

Example:

var secret secret
var dbSecret secret
var parameter stringParameter
var taskDefinition taskDefinition
var s3Bucket bucket

newContainer := taskDefinition.addContainer(jsii.String("container"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
	environment: map[string]*string{
		 // clear text, not for sensitive data
		"STAGE": jsii.String("prod"),
	},
	environmentFiles: []environmentFile{
		ecs.*environmentFile.fromAsset(jsii.String("./demo-env-file.env")),
		ecs.*environmentFile.fromBucket(s3Bucket, jsii.String("assets/demo-env-file.env")),
	},
	secrets: map[string]secret{
		 // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store at container start-up.
		"SECRET": ecs.*secret.fromSecretsManager(secret),
		"DB_PASSWORD": ecs.*secret.fromSecretsManager(dbSecret, jsii.String("password")),
		 // Reference a specific JSON field, (requires platform version 1.4.0 or later for Fargate tasks)
		"API_KEY": ecs.*secret.fromSecretsManagerVersion(secret, &SecretVersionInfo{
			"versionId": jsii.String("12345"),
		}, jsii.String("apiKey")),
		 // Reference a specific version of the secret by its version id or version stage (requires platform version 1.4.0 or later for Fargate tasks)
		"PARAMETER": ecs.*secret.fromSsmParameter(parameter),
	},
})
newContainer.addEnvironment(jsii.String("QUEUE_NAME"), jsii.String("MyQueue"))

Experimental.

type EnvironmentFileConfig

type EnvironmentFileConfig struct {
	// The type of environment file.
	// Experimental.
	FileType EnvironmentFileType `field:"required" json:"fileType" yaml:"fileType"`
	// The location of the environment file in S3.
	// Experimental.
	S3Location *awss3.Location `field:"required" json:"s3Location" yaml:"s3Location"`
}

Configuration for the environment file.

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"

environmentFileConfig := &environmentFileConfig{
	fileType: awscdk.Aws_ecs.environmentFileType_S3,
	s3Location: &location{
		bucketName: jsii.String("bucketName"),
		objectKey: jsii.String("objectKey"),

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

Experimental.

type EnvironmentFileType

type EnvironmentFileType string

Type of environment file to be included in the container definition. Experimental.

const (
	// Environment file hosted on S3, referenced by object ARN.
	// Experimental.
	EnvironmentFileType_S3 EnvironmentFileType = "S3"
)

type ExecuteCommandConfiguration

type ExecuteCommandConfiguration struct {
	// The AWS Key Management Service key ID to encrypt the data between the local client and the container.
	// Experimental.
	KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"`
	// The log configuration for the results of the execute command actions.
	//
	// The logs can be sent to CloudWatch Logs or an Amazon S3 bucket.
	// Experimental.
	LogConfiguration *ExecuteCommandLogConfiguration `field:"optional" json:"logConfiguration" yaml:"logConfiguration"`
	// The log settings to use for logging the execute command session.
	// Experimental.
	Logging ExecuteCommandLogging `field:"optional" json:"logging" yaml:"logging"`
}

The details of the execute command configuration.

For more information, see ExecuteCommandConfiguration https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html

Example:

var vpc vpc

kmsKey := kms.NewKey(this, jsii.String("KmsKey"))

// Pass the KMS key in the `encryptionKey` field to associate the key to the log group
logGroup := logs.NewLogGroup(this, jsii.String("LogGroup"), &logGroupProps{
	encryptionKey: kmsKey,
})

// Pass the KMS key in the `encryptionKey` field to associate the key to the S3 bucket
execBucket := s3.NewBucket(this, jsii.String("EcsExecBucket"), &bucketProps{
	encryptionKey: kmsKey,
})

cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
	executeCommandConfiguration: &executeCommandConfiguration{
		kmsKey: kmsKey,
		logConfiguration: &executeCommandLogConfiguration{
			cloudWatchLogGroup: logGroup,
			cloudWatchEncryptionEnabled: jsii.Boolean(true),
			s3Bucket: execBucket,
			s3EncryptionEnabled: jsii.Boolean(true),
			s3KeyPrefix: jsii.String("exec-command-output"),
		},
		logging: ecs.executeCommandLogging_OVERRIDE,
	},
})

Experimental.

type ExecuteCommandLogConfiguration

type ExecuteCommandLogConfiguration struct {
	// Whether or not to enable encryption on the CloudWatch logs.
	// Experimental.
	CloudWatchEncryptionEnabled *bool `field:"optional" json:"cloudWatchEncryptionEnabled" yaml:"cloudWatchEncryptionEnabled"`
	// The name of the CloudWatch log group to send logs to.
	//
	// The CloudWatch log group must already be created.
	// Experimental.
	CloudWatchLogGroup awslogs.ILogGroup `field:"optional" json:"cloudWatchLogGroup" yaml:"cloudWatchLogGroup"`
	// The name of the S3 bucket to send logs to.
	//
	// The S3 bucket must already be created.
	// Experimental.
	S3Bucket awss3.IBucket `field:"optional" json:"s3Bucket" yaml:"s3Bucket"`
	// Whether or not to enable encryption on the CloudWatch logs.
	// Experimental.
	S3EncryptionEnabled *bool `field:"optional" json:"s3EncryptionEnabled" yaml:"s3EncryptionEnabled"`
	// An optional folder in the S3 bucket to place logs in.
	// Experimental.
	S3KeyPrefix *string `field:"optional" json:"s3KeyPrefix" yaml:"s3KeyPrefix"`
}

The log configuration for the results of the execute command actions.

The logs can be sent to CloudWatch Logs and/ or an Amazon S3 bucket. For more information, see ExecuteCommandLogConfiguration https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandlogconfiguration.html

Example:

var vpc vpc

kmsKey := kms.NewKey(this, jsii.String("KmsKey"))

// Pass the KMS key in the `encryptionKey` field to associate the key to the log group
logGroup := logs.NewLogGroup(this, jsii.String("LogGroup"), &logGroupProps{
	encryptionKey: kmsKey,
})

// Pass the KMS key in the `encryptionKey` field to associate the key to the S3 bucket
execBucket := s3.NewBucket(this, jsii.String("EcsExecBucket"), &bucketProps{
	encryptionKey: kmsKey,
})

cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
	executeCommandConfiguration: &executeCommandConfiguration{
		kmsKey: kmsKey,
		logConfiguration: &executeCommandLogConfiguration{
			cloudWatchLogGroup: logGroup,
			cloudWatchEncryptionEnabled: jsii.Boolean(true),
			s3Bucket: execBucket,
			s3EncryptionEnabled: jsii.Boolean(true),
			s3KeyPrefix: jsii.String("exec-command-output"),
		},
		logging: ecs.executeCommandLogging_OVERRIDE,
	},
})

Experimental.

type ExecuteCommandLogging

type ExecuteCommandLogging string

The log settings to use to for logging the execute command session.

For more information, see [Logging] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html#cfn-ecs-cluster-executecommandconfiguration-logging

Example:

var vpc vpc

kmsKey := kms.NewKey(this, jsii.String("KmsKey"))

// Pass the KMS key in the `encryptionKey` field to associate the key to the log group
logGroup := logs.NewLogGroup(this, jsii.String("LogGroup"), &logGroupProps{
	encryptionKey: kmsKey,
})

// Pass the KMS key in the `encryptionKey` field to associate the key to the S3 bucket
execBucket := s3.NewBucket(this, jsii.String("EcsExecBucket"), &bucketProps{
	encryptionKey: kmsKey,
})

cluster := ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
	vpc: vpc,
	executeCommandConfiguration: &executeCommandConfiguration{
		kmsKey: kmsKey,
		logConfiguration: &executeCommandLogConfiguration{
			cloudWatchLogGroup: logGroup,
			cloudWatchEncryptionEnabled: jsii.Boolean(true),
			s3Bucket: execBucket,
			s3EncryptionEnabled: jsii.Boolean(true),
			s3KeyPrefix: jsii.String("exec-command-output"),
		},
		logging: ecs.executeCommandLogging_OVERRIDE,
	},
})

Experimental.

const (
	// The execute command session is not logged.
	// Experimental.
	ExecuteCommandLogging_NONE ExecuteCommandLogging = "NONE"
	// The awslogs configuration in the task definition is used.
	//
	// If no logging parameter is specified, it defaults to this value. If no awslogs log driver is configured in the task definition, the output won't be logged.
	// Experimental.
	ExecuteCommandLogging_DEFAULT ExecuteCommandLogging = "DEFAULT"
	// Specify the logging details as a part of logConfiguration.
	// Experimental.
	ExecuteCommandLogging_OVERRIDE ExecuteCommandLogging = "OVERRIDE"
)

type ExternalService

type ExternalService interface {
	BaseService
	IExternalService
	// The details of the AWS Cloud Map service.
	// Experimental.
	CloudmapService() awsservicediscovery.Service
	// Experimental.
	SetCloudmapService(val awsservicediscovery.Service)
	// The CloudMap service created for this service, if any.
	// Experimental.
	CloudMapService() awsservicediscovery.IService
	// The cluster that hosts the service.
	// Experimental.
	Cluster() ICluster
	// The security groups which manage the allowed network traffic for the service.
	// Experimental.
	Connections() awsec2.Connections
	// 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
	// A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
	// Experimental.
	LoadBalancers() *[]*CfnService_LoadBalancerProperty
	// Experimental.
	SetLoadBalancers(val *[]*CfnService_LoadBalancerProperty)
	// A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
	// Experimental.
	NetworkConfiguration() *CfnService_NetworkConfigurationProperty
	// Experimental.
	SetNetworkConfiguration(val *CfnService_NetworkConfigurationProperty)
	// 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 Amazon Resource Name (ARN) of the service.
	// Experimental.
	ServiceArn() *string
	// The name of the service.
	// Experimental.
	ServiceName() *string
	// The details of the service discovery registries to assign to this service.
	//
	// For more information, see Service Discovery.
	// Experimental.
	ServiceRegistries() *[]*CfnService_ServiceRegistryProperty
	// Experimental.
	SetServiceRegistries(val *[]*CfnService_ServiceRegistryProperty)
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The task definition to use for tasks in the service.
	// Experimental.
	TaskDefinition() TaskDefinition
	// 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)
	// Overriden method to throw error as `associateCloudMapService` is not supported for external service.
	// Experimental.
	AssociateCloudMapService(_options *AssociateCloudMapServiceOptions)
	// Overriden method to throw error as `attachToApplicationTargetGroup` is not supported for external service.
	// Experimental.
	AttachToApplicationTargetGroup(_targetGroup awselasticloadbalancingv2.IApplicationTargetGroup) *awselasticloadbalancingv2.LoadBalancerTargetProps
	// Registers the service as a target of a Classic Load Balancer (CLB).
	//
	// Don't call this. Call `loadBalancer.addTarget()` instead.
	// Experimental.
	AttachToClassicLB(loadBalancer awselasticloadbalancing.LoadBalancer)
	// This method is called to attach this service to a Network Load Balancer.
	//
	// Don't call this function directly. Instead, call `listener.addTargets()`
	// to add this service to a load balancer.
	// Experimental.
	AttachToNetworkTargetGroup(targetGroup awselasticloadbalancingv2.INetworkTargetGroup) *awselasticloadbalancingv2.LoadBalancerTargetProps
	// Overriden method to throw error as `autoScaleTaskCount` is not supported for external service.
	// Experimental.
	AutoScaleTaskCount(_props *awsapplicationautoscaling.EnableScalingProps) ScalableTaskCount
	// This method is called to create a networkConfiguration.
	// Deprecated: use configureAwsVpcNetworkingWithSecurityGroups instead.
	ConfigureAwsVpcNetworking(vpc awsec2.IVpc, assignPublicIp *bool, vpcSubnets *awsec2.SubnetSelection, securityGroup awsec2.ISecurityGroup)
	// Overriden method to throw error as `configureAwsVpcNetworkingWithSecurityGroups` is not supported for external service.
	// Experimental.
	ConfigureAwsVpcNetworkingWithSecurityGroups(_vpc awsec2.IVpc, _assignPublicIp *bool, _vpcSubnets *awsec2.SubnetSelection, _securityGroups *[]awsec2.ISecurityGroup)
	// Overriden method to throw error as `enableCloudMap` is not supported for external service.
	// Experimental.
	EnableCloudMap(_options *CloudMapOptions) awsservicediscovery.Service
	// 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
	// Overriden method to throw error as `loadBalancerTarget` is not supported for external service.
	// Experimental.
	LoadBalancerTarget(_options *LoadBalancerTargetOptions) IEcsLoadBalancerTarget
	// This method returns the specified CloudWatch metric name for this service.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this service's CPU utilization.
	// Experimental.
	MetricCpuUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this service's memory utilization.
	// Experimental.
	MetricMemoryUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// 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()
	// Overriden method to throw error as `registerLoadBalancerTargets` is not supported for external service.
	// Experimental.
	RegisterLoadBalancerTargets(_targets ...*EcsTarget)
	// 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
}

This creates a service using the External launch type on an ECS cluster.

Example:

var cluster cluster
var taskDefinition taskDefinition

service := ecs.NewExternalService(this, jsii.String("Service"), &externalServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	desiredCount: jsii.Number(5),
})

Experimental.

func NewExternalService

func NewExternalService(scope constructs.Construct, id *string, props *ExternalServiceProps) ExternalService

Constructs a new instance of the ExternalService class. Experimental.

type ExternalServiceAttributes

type ExternalServiceAttributes struct {
	// The cluster that hosts the service.
	// Experimental.
	Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"`
	// The service ARN.
	// Experimental.
	ServiceArn *string `field:"optional" json:"serviceArn" yaml:"serviceArn"`
	// The name of the service.
	// Experimental.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
}

The properties to import from the service using the External launch type.

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 cluster cluster

externalServiceAttributes := &externalServiceAttributes{
	cluster: cluster,

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

Experimental.

type ExternalServiceProps

type ExternalServiceProps struct {
	// The name of the cluster that hosts the service.
	// Experimental.
	Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"`
	// A list of Capacity Provider strategies used to place a service.
	// Experimental.
	CapacityProviderStrategies *[]*CapacityProviderStrategy `field:"optional" json:"capacityProviderStrategies" yaml:"capacityProviderStrategies"`
	// Whether to enable the deployment circuit breaker.
	//
	// If this property is defined, circuit breaker will be implicitly
	// enabled.
	// Experimental.
	CircuitBreaker *DeploymentCircuitBreaker `field:"optional" json:"circuitBreaker" yaml:"circuitBreaker"`
	// The options for configuring an Amazon ECS service to use service discovery.
	// Experimental.
	CloudMapOptions *CloudMapOptions `field:"optional" json:"cloudMapOptions" yaml:"cloudMapOptions"`
	// Specifies which deployment controller to use for the service.
	//
	// For more information, see
	// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
	// Experimental.
	DeploymentController *DeploymentController `field:"optional" json:"deploymentController" yaml:"deploymentController"`
	// The desired number of instantiations of the task definition to keep running on the service.
	// Experimental.
	DesiredCount *float64 `field:"optional" json:"desiredCount" yaml:"desiredCount"`
	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
	//
	// For more information, see
	// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
	// Experimental.
	EnableECSManagedTags *bool `field:"optional" json:"enableECSManagedTags" yaml:"enableECSManagedTags"`
	// Whether to enable the ability to execute into a container.
	// Experimental.
	EnableExecuteCommand *bool `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"`
	// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
	// Experimental.
	HealthCheckGracePeriod awscdk.Duration `field:"optional" json:"healthCheckGracePeriod" yaml:"healthCheckGracePeriod"`
	// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
	// Experimental.
	MaxHealthyPercent *float64 `field:"optional" json:"maxHealthyPercent" yaml:"maxHealthyPercent"`
	// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
	// Experimental.
	MinHealthyPercent *float64 `field:"optional" json:"minHealthyPercent" yaml:"minHealthyPercent"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE
	// Experimental.
	PropagateTags PropagatedTagSource `field:"optional" json:"propagateTags" yaml:"propagateTags"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Tags can only be propagated to the tasks within the service during service creation.
	// Deprecated: Use `propagateTags` instead.
	PropagateTaskTagsFrom PropagatedTagSource `field:"optional" json:"propagateTaskTagsFrom" yaml:"propagateTaskTagsFrom"`
	// The name of the service.
	// Experimental.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
	// The task definition to use for tasks in the service.
	//
	// [disable-awslint:ref-via-interface].
	// Experimental.
	TaskDefinition TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"`
	// The security groups to associate with the service.
	//
	// If you do not specify a security group, a new security group is created.
	// Experimental.
	SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"`
}

The properties for defining a service using the External launch type.

Example:

var cluster cluster
var taskDefinition taskDefinition

service := ecs.NewExternalService(this, jsii.String("Service"), &externalServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	desiredCount: jsii.Number(5),
})

Experimental.

type ExternalTaskDefinition

type ExternalTaskDefinition interface {
	TaskDefinition
	IExternalTaskDefinition
	// The task launch type compatibility requirement.
	// Experimental.
	Compatibility() Compatibility
	// The container definitions.
	// Experimental.
	Containers() *[]ContainerDefinition
	// Default container for this task.
	//
	// Load balancers will send traffic to this container. The first
	// essential container that is added to this task will become the default
	// container.
	// Experimental.
	DefaultContainer() ContainerDefinition
	// Experimental.
	SetDefaultContainer(val ContainerDefinition)
	// 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 amount (in GiB) of ephemeral storage to be allocated to the task.
	//
	// Only supported in Fargate platform version 1.4.0 or later.
	// Experimental.
	EphemeralStorageGiB() *float64
	// Execution role for this task definition.
	// Experimental.
	ExecutionRole() awsiam.IRole
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	// Experimental.
	Family() *string
	// Public getter method to access list of inference accelerators attached to the instance.
	// Experimental.
	InferenceAccelerators() *[]*InferenceAccelerator
	// Return true if the task definition can be run on an EC2 cluster.
	// Experimental.
	IsEc2Compatible() *bool
	// Return true if the task definition can be run on a ECS anywhere cluster.
	// Experimental.
	IsExternalCompatible() *bool
	// Return true if the task definition can be run on a Fargate cluster.
	// Experimental.
	IsFargateCompatible() *bool
	// The networking mode to use for the containers in the task.
	// Experimental.
	NetworkMode() NetworkMode
	// 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
	// Whether this task definition has at least a container that references a specific JSON field of a secret stored in Secrets Manager.
	// Experimental.
	ReferencesSecretJsonField() *bool
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The full Amazon Resource Name (ARN) of the task definition.
	// Experimental.
	TaskDefinitionArn() *string
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole() awsiam.IRole
	// Adds a new container to the task definition.
	// Experimental.
	AddContainer(id *string, props *ContainerDefinitionOptions) ContainerDefinition
	// Adds the specified extension to the task definition.
	//
	// Extension can be used to apply a packaged modification to
	// a task definition.
	// Experimental.
	AddExtension(extension ITaskDefinitionExtension)
	// Adds a firelens log router to the task definition.
	// Experimental.
	AddFirelensLogRouter(id *string, props *FirelensLogRouterDefinitionOptions) FirelensLogRouter
	// Overriden method to throw error as interface accelerators are not supported for external tasks.
	// Experimental.
	AddInferenceAccelerator(_inferenceAccelerator *InferenceAccelerator)
	// Adds the specified placement constraint to the task definition.
	// Experimental.
	AddPlacementConstraint(constraint PlacementConstraint)
	// Adds a policy statement to the task execution IAM role.
	// Experimental.
	AddToExecutionRolePolicy(statement awsiam.PolicyStatement)
	// Adds a policy statement to the task IAM role.
	// Experimental.
	AddToTaskRolePolicy(statement awsiam.PolicyStatement)
	// Adds a volume to the task definition.
	// Experimental.
	AddVolume(volume *Volume)
	// 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)
	// Returns the container that match the provided containerName.
	// Experimental.
	FindContainer(containerName *string) ContainerDefinition
	// 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
	// Creates the task execution IAM role if it doesn't already exist.
	// Experimental.
	ObtainExecutionRole() awsiam.IRole
	// 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
	// Validates the task definition.
	// Experimental.
	Validate() *[]*string
}

The details of a task definition run on an External cluster.

Example:

externalTaskDefinition := ecs.NewExternalTaskDefinition(this, jsii.String("TaskDef"))

container := externalTaskDefinition.addContainer(jsii.String("WebContainer"), &containerDefinitionOptions{
	// Use an image from DockerHub
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
})

Experimental.

func NewExternalTaskDefinition

func NewExternalTaskDefinition(scope constructs.Construct, id *string, props *ExternalTaskDefinitionProps) ExternalTaskDefinition

Constructs a new instance of the ExternalTaskDefinition class. Experimental.

type ExternalTaskDefinitionAttributes

type ExternalTaskDefinitionAttributes struct {
	// The arn of the task definition.
	// Experimental.
	TaskDefinitionArn *string `field:"required" json:"taskDefinitionArn" yaml:"taskDefinitionArn"`
	// The networking mode to use for the containers in the task.
	// Experimental.
	NetworkMode NetworkMode `field:"optional" json:"networkMode" yaml:"networkMode"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
}

Attributes used to import an existing External task 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"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

externalTaskDefinitionAttributes := &externalTaskDefinitionAttributes{
	taskDefinitionArn: jsii.String("taskDefinitionArn"),

	// the properties below are optional
	networkMode: awscdk.Aws_ecs.networkMode_NONE,
	taskRole: role,
}

Experimental.

type ExternalTaskDefinitionProps

type ExternalTaskDefinitionProps struct {
	// The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf.
	//
	// The role will be used to retrieve container images from ECR and create CloudWatch log groups.
	// Experimental.
	ExecutionRole awsiam.IRole `field:"optional" json:"executionRole" yaml:"executionRole"`
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	// Experimental.
	Family *string `field:"optional" json:"family" yaml:"family"`
	// The configuration details for the App Mesh proxy.
	// Experimental.
	ProxyConfiguration ProxyConfiguration `field:"optional" json:"proxyConfiguration" yaml:"proxyConfiguration"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
	// The list of volume definitions for the task.
	//
	// For more information, see
	// [Task Definition Parameter Volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide//task_definition_parameters.html#volumes).
	// Experimental.
	Volumes *[]*Volume `field:"optional" json:"volumes" yaml:"volumes"`
}

The properties for a task definition run on an External cluster.

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"
import "github.com/aws/aws-cdk-go/awscdk"

var proxyConfiguration proxyConfiguration
var role role

externalTaskDefinitionProps := &externalTaskDefinitionProps{
	executionRole: role,
	family: jsii.String("family"),
	proxyConfiguration: proxyConfiguration,
	taskRole: role,
	volumes: []volume{
		&volume{
			name: jsii.String("name"),

			// the properties below are optional
			dockerVolumeConfiguration: &dockerVolumeConfiguration{
				driver: jsii.String("driver"),
				scope: awscdk.Aws_ecs.scope_TASK,

				// the properties below are optional
				autoprovision: jsii.Boolean(false),
				driverOpts: map[string]*string{
					"driverOptsKey": jsii.String("driverOpts"),
				},
				labels: map[string]*string{
					"labelsKey": jsii.String("labels"),
				},
			},
			efsVolumeConfiguration: &efsVolumeConfiguration{
				fileSystemId: jsii.String("fileSystemId"),

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

Experimental.

type FargatePlatformVersion

type FargatePlatformVersion string

The platform version on which to run your service.

Example:

var cluster cluster

scheduledFargateTask := ecsPatterns.NewScheduledFargateTask(this, jsii.String("ScheduledFargateTask"), &scheduledFargateTaskProps{
	cluster: cluster,
	scheduledFargateTaskImageOptions: &scheduledFargateTaskImageOptions{
		image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
		memoryLimitMiB: jsii.Number(512),
	},
	schedule: appscaling.schedule.expression(jsii.String("rate(1 minute)")),
	platformVersion: ecs.fargatePlatformVersion_LATEST,
})

See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html

Experimental.

const (
	// The latest, recommended platform version.
	// Experimental.
	FargatePlatformVersion_LATEST FargatePlatformVersion = "LATEST"
	// Version 1.4.0.
	//
	// Supports EFS endpoints, CAP_SYS_PTRACE Linux capability,
	// network performance metrics in CloudWatch Container Insights,
	// consolidated 20 GB ephemeral volume.
	// Experimental.
	FargatePlatformVersion_VERSION1_4 FargatePlatformVersion = "VERSION1_4"
	// Version 1.3.0.
	//
	// Supports secrets, task recycling.
	// Experimental.
	FargatePlatformVersion_VERSION1_3 FargatePlatformVersion = "VERSION1_3"
	// Version 1.2.0.
	//
	// Supports private registries.
	// Experimental.
	FargatePlatformVersion_VERSION1_2 FargatePlatformVersion = "VERSION1_2"
	// Version 1.1.0.
	//
	// Supports task metadata, health checks, service discovery.
	// Experimental.
	FargatePlatformVersion_VERSION1_1 FargatePlatformVersion = "VERSION1_1"
	// Initial release.
	//
	// Based on Amazon Linux 2017.09.
	// Experimental.
	FargatePlatformVersion_VERSION1_0 FargatePlatformVersion = "VERSION1_0"
)

type FargateService

type FargateService interface {
	BaseService
	IFargateService
	// The details of the AWS Cloud Map service.
	// Experimental.
	CloudmapService() awsservicediscovery.Service
	// Experimental.
	SetCloudmapService(val awsservicediscovery.Service)
	// The CloudMap service created for this service, if any.
	// Experimental.
	CloudMapService() awsservicediscovery.IService
	// The cluster that hosts the service.
	// Experimental.
	Cluster() ICluster
	// The security groups which manage the allowed network traffic for the service.
	// Experimental.
	Connections() awsec2.Connections
	// 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
	// A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
	// Experimental.
	LoadBalancers() *[]*CfnService_LoadBalancerProperty
	// Experimental.
	SetLoadBalancers(val *[]*CfnService_LoadBalancerProperty)
	// A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
	// Experimental.
	NetworkConfiguration() *CfnService_NetworkConfigurationProperty
	// Experimental.
	SetNetworkConfiguration(val *CfnService_NetworkConfigurationProperty)
	// 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 Amazon Resource Name (ARN) of the service.
	// Experimental.
	ServiceArn() *string
	// The name of the service.
	// Experimental.
	ServiceName() *string
	// The details of the service discovery registries to assign to this service.
	//
	// For more information, see Service Discovery.
	// Experimental.
	ServiceRegistries() *[]*CfnService_ServiceRegistryProperty
	// Experimental.
	SetServiceRegistries(val *[]*CfnService_ServiceRegistryProperty)
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The task definition to use for tasks in the service.
	// Experimental.
	TaskDefinition() TaskDefinition
	// 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)
	// Associates this service with a CloudMap service.
	// Experimental.
	AssociateCloudMapService(options *AssociateCloudMapServiceOptions)
	// This method is called to attach this service to an Application Load Balancer.
	//
	// Don't call this function directly. Instead, call `listener.addTargets()`
	// to add this service to a load balancer.
	// Experimental.
	AttachToApplicationTargetGroup(targetGroup awselasticloadbalancingv2.IApplicationTargetGroup) *awselasticloadbalancingv2.LoadBalancerTargetProps
	// Registers the service as a target of a Classic Load Balancer (CLB).
	//
	// Don't call this. Call `loadBalancer.addTarget()` instead.
	// Experimental.
	AttachToClassicLB(loadBalancer awselasticloadbalancing.LoadBalancer)
	// This method is called to attach this service to a Network Load Balancer.
	//
	// Don't call this function directly. Instead, call `listener.addTargets()`
	// to add this service to a load balancer.
	// Experimental.
	AttachToNetworkTargetGroup(targetGroup awselasticloadbalancingv2.INetworkTargetGroup) *awselasticloadbalancingv2.LoadBalancerTargetProps
	// An attribute representing the minimum and maximum task count for an AutoScalingGroup.
	// Experimental.
	AutoScaleTaskCount(props *awsapplicationautoscaling.EnableScalingProps) ScalableTaskCount
	// This method is called to create a networkConfiguration.
	// Deprecated: use configureAwsVpcNetworkingWithSecurityGroups instead.
	ConfigureAwsVpcNetworking(vpc awsec2.IVpc, assignPublicIp *bool, vpcSubnets *awsec2.SubnetSelection, securityGroup awsec2.ISecurityGroup)
	// This method is called to create a networkConfiguration.
	// Experimental.
	ConfigureAwsVpcNetworkingWithSecurityGroups(vpc awsec2.IVpc, assignPublicIp *bool, vpcSubnets *awsec2.SubnetSelection, securityGroups *[]awsec2.ISecurityGroup)
	// Enable CloudMap service discovery for the service.
	//
	// Returns: The created CloudMap service.
	// Experimental.
	EnableCloudMap(options *CloudMapOptions) awsservicediscovery.Service
	// 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
	// Return a load balancing target for a specific container and port.
	//
	// Use this function to create a load balancer target if you want to load balance to
	// another container than the first essential container or the first mapped port on
	// the container.
	//
	// Use the return value of this function where you would normally use a load balancer
	// target, instead of the `Service` object itself.
	//
	// Example:
	//   declare const listener: elbv2.ApplicationListener;
	//   declare const service: ecs.BaseService;
	//   listener.addTargets('ECS', {
	//     port: 80,
	//     targets: [service.loadBalancerTarget({
	//       containerName: 'MyContainer',
	//       containerPort: 1234,
	//     })],
	//   });
	//
	// Experimental.
	LoadBalancerTarget(options *LoadBalancerTargetOptions) IEcsLoadBalancerTarget
	// This method returns the specified CloudWatch metric name for this service.
	// Experimental.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this service's CPU utilization.
	// Experimental.
	MetricCpuUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// This method returns the CloudWatch metric for this service's memory utilization.
	// Experimental.
	MetricMemoryUtilization(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// 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()
	// Use this function to create all load balancer targets to be registered in this service, add them to target groups, and attach target groups to listeners accordingly.
	//
	// Alternatively, you can use `listener.addTargets()` to create targets and add them to target groups.
	//
	// Example:
	//   declare const listener: elbv2.ApplicationListener;
	//   declare const service: ecs.BaseService;
	//   service.registerLoadBalancerTargets(
	//     {
	//       containerName: 'web',
	//       containerPort: 80,
	//       newTargetGroupId: 'ECS',
	//       listener: ecs.ListenerConfig.applicationListener(listener, {
	//         protocol: elbv2.ApplicationProtocol.HTTPS
	//       }),
	//     },
	//   )
	//
	// Experimental.
	RegisterLoadBalancerTargets(targets ...*EcsTarget)
	// 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
}

This creates a service using the Fargate launch type on an ECS cluster.

Example:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elbv2.NewApplicationLoadBalancer(this, jsii.String("LB"), &applicationLoadBalancerProps{
	vpc: vpc,
	internetFacing: jsii.Boolean(true),
})
listener := lb.addListener(jsii.String("Listener"), &baseApplicationListenerProps{
	port: jsii.Number(80),
})
service.registerLoadBalancerTargets(&ecsTarget{
	containerName: jsii.String("web"),
	containerPort: jsii.Number(80),
	newTargetGroupId: jsii.String("ECS"),
	listener: ecs.listenerConfig.applicationListener(listener, &addApplicationTargetsProps{
		protocol: elbv2.applicationProtocol_HTTPS,
	}),
})

Experimental.

func NewFargateService

func NewFargateService(scope constructs.Construct, id *string, props *FargateServiceProps) FargateService

Constructs a new instance of the FargateService class. Experimental.

type FargateServiceAttributes

type FargateServiceAttributes struct {
	// The cluster that hosts the service.
	// Experimental.
	Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"`
	// The service ARN.
	// Experimental.
	ServiceArn *string `field:"optional" json:"serviceArn" yaml:"serviceArn"`
	// The name of the service.
	// Experimental.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
}

The properties to import from the service using the Fargate launch type.

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 cluster cluster

fargateServiceAttributes := &fargateServiceAttributes{
	cluster: cluster,

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

Experimental.

type FargateServiceProps

type FargateServiceProps struct {
	// The name of the cluster that hosts the service.
	// Experimental.
	Cluster ICluster `field:"required" json:"cluster" yaml:"cluster"`
	// A list of Capacity Provider strategies used to place a service.
	// Experimental.
	CapacityProviderStrategies *[]*CapacityProviderStrategy `field:"optional" json:"capacityProviderStrategies" yaml:"capacityProviderStrategies"`
	// Whether to enable the deployment circuit breaker.
	//
	// If this property is defined, circuit breaker will be implicitly
	// enabled.
	// Experimental.
	CircuitBreaker *DeploymentCircuitBreaker `field:"optional" json:"circuitBreaker" yaml:"circuitBreaker"`
	// The options for configuring an Amazon ECS service to use service discovery.
	// Experimental.
	CloudMapOptions *CloudMapOptions `field:"optional" json:"cloudMapOptions" yaml:"cloudMapOptions"`
	// Specifies which deployment controller to use for the service.
	//
	// For more information, see
	// [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html)
	// Experimental.
	DeploymentController *DeploymentController `field:"optional" json:"deploymentController" yaml:"deploymentController"`
	// The desired number of instantiations of the task definition to keep running on the service.
	// Experimental.
	DesiredCount *float64 `field:"optional" json:"desiredCount" yaml:"desiredCount"`
	// Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
	//
	// For more information, see
	// [Tagging Your Amazon ECS Resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
	// Experimental.
	EnableECSManagedTags *bool `field:"optional" json:"enableECSManagedTags" yaml:"enableECSManagedTags"`
	// Whether to enable the ability to execute into a container.
	// Experimental.
	EnableExecuteCommand *bool `field:"optional" json:"enableExecuteCommand" yaml:"enableExecuteCommand"`
	// The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
	// Experimental.
	HealthCheckGracePeriod awscdk.Duration `field:"optional" json:"healthCheckGracePeriod" yaml:"healthCheckGracePeriod"`
	// The maximum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that can run in a service during a deployment.
	// Experimental.
	MaxHealthyPercent *float64 `field:"optional" json:"maxHealthyPercent" yaml:"maxHealthyPercent"`
	// The minimum number of tasks, specified as a percentage of the Amazon ECS service's DesiredCount value, that must continue to run and remain healthy during a deployment.
	// Experimental.
	MinHealthyPercent *float64 `field:"optional" json:"minHealthyPercent" yaml:"minHealthyPercent"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION or PropagatedTagSource.NONE
	// Experimental.
	PropagateTags PropagatedTagSource `field:"optional" json:"propagateTags" yaml:"propagateTags"`
	// Specifies whether to propagate the tags from the task definition or the service to the tasks in the service.
	//
	// Tags can only be propagated to the tasks within the service during service creation.
	// Deprecated: Use `propagateTags` instead.
	PropagateTaskTagsFrom PropagatedTagSource `field:"optional" json:"propagateTaskTagsFrom" yaml:"propagateTaskTagsFrom"`
	// The name of the service.
	// Experimental.
	ServiceName *string `field:"optional" json:"serviceName" yaml:"serviceName"`
	// The task definition to use for tasks in the service.
	//
	// [disable-awslint:ref-via-interface].
	// Experimental.
	TaskDefinition TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"`
	// Specifies whether the task's elastic network interface receives a public IP address.
	//
	// If true, each task will receive a public IP address.
	// Experimental.
	AssignPublicIp *bool `field:"optional" json:"assignPublicIp" yaml:"assignPublicIp"`
	// The platform version on which to run your service.
	//
	// If one is not specified, the LATEST platform version is used by default. 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.
	// Experimental.
	PlatformVersion FargatePlatformVersion `field:"optional" json:"platformVersion" yaml:"platformVersion"`
	// The security groups to associate with the service.
	//
	// If you do not specify a security group, a new security group is created.
	// Deprecated: use securityGroups instead.
	SecurityGroup awsec2.ISecurityGroup `field:"optional" json:"securityGroup" yaml:"securityGroup"`
	// The security groups to associate with the service.
	//
	// If you do not specify a security group, a new security group is created.
	// Experimental.
	SecurityGroups *[]awsec2.ISecurityGroup `field:"optional" json:"securityGroups" yaml:"securityGroups"`
	// The subnets to associate with the service.
	// Experimental.
	VpcSubnets *awsec2.SubnetSelection `field:"optional" json:"vpcSubnets" yaml:"vpcSubnets"`
}

The properties for defining a service using the Fargate launch type.

Example:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elbv2.NewApplicationLoadBalancer(this, jsii.String("LB"), &applicationLoadBalancerProps{
	vpc: vpc,
	internetFacing: jsii.Boolean(true),
})
listener := lb.addListener(jsii.String("Listener"), &baseApplicationListenerProps{
	port: jsii.Number(80),
})
service.registerLoadBalancerTargets(&ecsTarget{
	containerName: jsii.String("web"),
	containerPort: jsii.Number(80),
	newTargetGroupId: jsii.String("ECS"),
	listener: ecs.listenerConfig.applicationListener(listener, &addApplicationTargetsProps{
		protocol: elbv2.applicationProtocol_HTTPS,
	}),
})

Experimental.

type FargateTaskDefinition

type FargateTaskDefinition interface {
	TaskDefinition
	IFargateTaskDefinition
	// The task launch type compatibility requirement.
	// Experimental.
	Compatibility() Compatibility
	// The container definitions.
	// Experimental.
	Containers() *[]ContainerDefinition
	// Default container for this task.
	//
	// Load balancers will send traffic to this container. The first
	// essential container that is added to this task will become the default
	// container.
	// Experimental.
	DefaultContainer() ContainerDefinition
	// Experimental.
	SetDefaultContainer(val ContainerDefinition)
	// 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 amount (in GiB) of ephemeral storage to be allocated to the task.
	// Experimental.
	EphemeralStorageGiB() *float64
	// Execution role for this task definition.
	// Experimental.
	ExecutionRole() awsiam.IRole
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	// Experimental.
	Family() *string
	// Public getter method to access list of inference accelerators attached to the instance.
	// Experimental.
	InferenceAccelerators() *[]*InferenceAccelerator
	// Return true if the task definition can be run on an EC2 cluster.
	// Experimental.
	IsEc2Compatible() *bool
	// Return true if the task definition can be run on a ECS anywhere cluster.
	// Experimental.
	IsExternalCompatible() *bool
	// Return true if the task definition can be run on a Fargate cluster.
	// Experimental.
	IsFargateCompatible() *bool
	// The Docker networking mode to use for the containers in the task.
	//
	// Fargate tasks require the awsvpc network mode.
	// Experimental.
	NetworkMode() NetworkMode
	// 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
	// Whether this task definition has at least a container that references a specific JSON field of a secret stored in Secrets Manager.
	// Experimental.
	ReferencesSecretJsonField() *bool
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The full Amazon Resource Name (ARN) of the task definition.
	// Experimental.
	TaskDefinitionArn() *string
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole() awsiam.IRole
	// Adds a new container to the task definition.
	// Experimental.
	AddContainer(id *string, props *ContainerDefinitionOptions) ContainerDefinition
	// Adds the specified extension to the task definition.
	//
	// Extension can be used to apply a packaged modification to
	// a task definition.
	// Experimental.
	AddExtension(extension ITaskDefinitionExtension)
	// Adds a firelens log router to the task definition.
	// Experimental.
	AddFirelensLogRouter(id *string, props *FirelensLogRouterDefinitionOptions) FirelensLogRouter
	// Adds an inference accelerator to the task definition.
	// Experimental.
	AddInferenceAccelerator(inferenceAccelerator *InferenceAccelerator)
	// Adds the specified placement constraint to the task definition.
	// Experimental.
	AddPlacementConstraint(constraint PlacementConstraint)
	// Adds a policy statement to the task execution IAM role.
	// Experimental.
	AddToExecutionRolePolicy(statement awsiam.PolicyStatement)
	// Adds a policy statement to the task IAM role.
	// Experimental.
	AddToTaskRolePolicy(statement awsiam.PolicyStatement)
	// Adds a volume to the task definition.
	// Experimental.
	AddVolume(volume *Volume)
	// 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)
	// Returns the container that match the provided containerName.
	// Experimental.
	FindContainer(containerName *string) ContainerDefinition
	// 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
	// Creates the task execution IAM role if it doesn't already exist.
	// Experimental.
	ObtainExecutionRole() awsiam.IRole
	// 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
	// Validates the task definition.
	// Experimental.
	Validate() *[]*string
}

The details of a task definition run on a Fargate cluster.

Example:

fargateTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	memoryLimitMiB: jsii.Number(512),
	cpu: jsii.Number(256),
})
container := fargateTaskDefinition.addContainer(jsii.String("WebContainer"), &containerDefinitionOptions{
	// Use an image from DockerHub
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
})

Experimental.

func NewFargateTaskDefinition

func NewFargateTaskDefinition(scope constructs.Construct, id *string, props *FargateTaskDefinitionProps) FargateTaskDefinition

Constructs a new instance of the FargateTaskDefinition class. Experimental.

type FargateTaskDefinitionAttributes

type FargateTaskDefinitionAttributes struct {
	// The arn of the task definition.
	// Experimental.
	TaskDefinitionArn *string `field:"required" json:"taskDefinitionArn" yaml:"taskDefinitionArn"`
	// The networking mode to use for the containers in the task.
	// Experimental.
	NetworkMode NetworkMode `field:"optional" json:"networkMode" yaml:"networkMode"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
}

Attributes used to import an existing Fargate task 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"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

fargateTaskDefinitionAttributes := &fargateTaskDefinitionAttributes{
	taskDefinitionArn: jsii.String("taskDefinitionArn"),

	// the properties below are optional
	networkMode: awscdk.Aws_ecs.networkMode_NONE,
	taskRole: role,
}

Experimental.

type FargateTaskDefinitionProps

type FargateTaskDefinitionProps struct {
	// The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf.
	//
	// The role will be used to retrieve container images from ECR and create CloudWatch log groups.
	// Experimental.
	ExecutionRole awsiam.IRole `field:"optional" json:"executionRole" yaml:"executionRole"`
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	// Experimental.
	Family *string `field:"optional" json:"family" yaml:"family"`
	// The configuration details for the App Mesh proxy.
	// Experimental.
	ProxyConfiguration ProxyConfiguration `field:"optional" json:"proxyConfiguration" yaml:"proxyConfiguration"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
	// The list of volume definitions for the task.
	//
	// For more information, see
	// [Task Definition Parameter Volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide//task_definition_parameters.html#volumes).
	// Experimental.
	Volumes *[]*Volume `field:"optional" json:"volumes" yaml:"volumes"`
	// The number of cpu units used by the task.
	//
	// For tasks using the Fargate launch type,
	// this field is required and you must use one of the following values,
	// which determines your range of valid values for the memory parameter:
	//
	// 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
	//
	// 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
	//
	// 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
	//
	// 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
	//
	// 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB).
	// Experimental.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// The amount (in GiB) of ephemeral storage to be allocated to the task.
	//
	// The maximum supported value is 200 GiB.
	//
	// NOTE: This parameter is only supported for tasks hosted on AWS Fargate using platform version 1.4.0 or later.
	// Experimental.
	EphemeralStorageGiB *float64 `field:"optional" json:"ephemeralStorageGiB" yaml:"ephemeralStorageGiB"`
	// The amount (in MiB) of memory used by the task.
	//
	// For tasks using the Fargate launch type,
	// this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter:
	//
	// 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
	//
	// 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
	//
	// 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
	//
	// Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
	//
	// Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU).
	// Experimental.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
	// The operating system that your task definitions are running on.
	//
	// A runtimePlatform is supported only for tasks using the Fargate launch type.
	// Experimental.
	RuntimePlatform *RuntimePlatform `field:"optional" json:"runtimePlatform" yaml:"runtimePlatform"`
}

The properties for a task definition.

Example:

fargateTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	memoryLimitMiB: jsii.Number(512),
	cpu: jsii.Number(256),
})
container := fargateTaskDefinition.addContainer(jsii.String("WebContainer"), &containerDefinitionOptions{
	// Use an image from DockerHub
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
})

Experimental.

type FireLensLogDriver

type FireLensLogDriver interface {
	LogDriver
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(_scope awscdk.Construct, _containerDefinition ContainerDefinition) *LogDriverConfig
}

FireLens enables you to use task definition parameters to route logs to an AWS service or AWS Partner Network (APN) destination for log storage and analytics.

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 secret secret

fireLensLogDriver := awscdk.Aws_ecs.NewFireLensLogDriver(&fireLensLogDriverProps{
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	labels: []*string{
		jsii.String("labels"),
	},
	options: map[string]*string{
		"optionsKey": jsii.String("options"),
	},
	secretOptions: map[string]*secret{
		"secretOptionsKey": secret,
	},
	tag: jsii.String("tag"),
})

Experimental.

func NewFireLensLogDriver

func NewFireLensLogDriver(props *FireLensLogDriverProps) FireLensLogDriver

Constructs a new instance of the FireLensLogDriver class. Experimental.

type FireLensLogDriverProps

type FireLensLogDriverProps struct {
	// The env option takes an array of keys.
	//
	// If there is collision between
	// label and env keys, the value of the env takes precedence. Adds additional fields
	// to the extra attributes of a logging message.
	// Experimental.
	Env *[]*string `field:"optional" json:"env" yaml:"env"`
	// The env-regex option is similar to and compatible with env.
	//
	// Its value is a regular
	// expression to match logging-related environment variables. It is used for advanced
	// log tag options.
	// Experimental.
	EnvRegex *string `field:"optional" json:"envRegex" yaml:"envRegex"`
	// The labels option takes an array of keys.
	//
	// If there is collision
	// between label and env keys, the value of the env takes precedence. Adds additional
	// fields to the extra attributes of a logging message.
	// Experimental.
	Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
	// By default, Docker uses the first 12 characters of the container ID to tag log messages.
	//
	// Refer to the log tag option documentation for customizing the
	// log tag format.
	// Experimental.
	Tag *string `field:"optional" json:"tag" yaml:"tag"`
	// The configuration options to send to the log driver.
	// Experimental.
	Options *map[string]*string `field:"optional" json:"options" yaml:"options"`
	// The secrets to pass to the log configuration.
	// Experimental.
	SecretOptions *map[string]Secret `field:"optional" json:"secretOptions" yaml:"secretOptions"`
}

Specifies the firelens log driver configuration options.

Example:

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.firelens(&fireLensLogDriverProps{
		options: map[string]*string{
			"Name": jsii.String("firehose"),
			"region": jsii.String("us-west-2"),
			"delivery_stream": jsii.String("my-stream"),
		},
	}),
})

Experimental.

type FirelensConfig

type FirelensConfig struct {
	// The log router to use.
	// Experimental.
	Type FirelensLogRouterType `field:"required" json:"type" yaml:"type"`
	// Firelens options.
	// Experimental.
	Options *FirelensOptions `field:"optional" json:"options" yaml:"options"`
}

Firelens Configuration https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef.

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"

firelensConfig := &firelensConfig{
	type: awscdk.Aws_ecs.firelensLogRouterType_FLUENTBIT,

	// the properties below are optional
	options: &firelensOptions{
		configFileValue: jsii.String("configFileValue"),

		// the properties below are optional
		configFileType: awscdk.*Aws_ecs.firelensConfigFileType_S3,
		enableECSLogMetadata: jsii.Boolean(false),
	},
}

Experimental.

type FirelensConfigFileType

type FirelensConfigFileType string

Firelens configuration file type, s3 or file path.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef-customconfig Experimental.

const (
	// s3.
	// Experimental.
	FirelensConfigFileType_S3 FirelensConfigFileType = "S3"
	// fluentd.
	// Experimental.
	FirelensConfigFileType_FILE FirelensConfigFileType = "FILE"
)

type FirelensLogRouter

type FirelensLogRouter interface {
	ContainerDefinition
	// An array dependencies defined for container startup and shutdown.
	// Experimental.
	ContainerDependencies() *[]*ContainerDependency
	// The name of this container.
	// Experimental.
	ContainerName() *string
	// The port the container will listen on.
	// Experimental.
	ContainerPort() *float64
	// The environment files for this container.
	// Experimental.
	EnvironmentFiles() *[]*EnvironmentFileConfig
	// Specifies whether the container will be marked essential.
	//
	// If the essential parameter of a container is marked as true, and that container
	// fails or stops for any reason, all other containers that are part of the task are
	// stopped. If the essential parameter of a container is marked as false, then its
	// failure does not affect the rest of the containers in a task.
	//
	// If this parameter is omitted, a container is assumed to be essential.
	// Experimental.
	Essential() *bool
	// Firelens configuration.
	// Experimental.
	FirelensConfig() *FirelensConfig
	// The name of the image referenced by this container.
	// Experimental.
	ImageName() *string
	// The inbound rules associated with the security group the task or service will use.
	//
	// This property is only used for tasks that use the awsvpc network mode.
	// Experimental.
	IngressPort() *float64
	// The Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
	// Experimental.
	LinuxParameters() LinuxParameters
	// The log configuration specification for the container.
	// Experimental.
	LogDriverConfig() *LogDriverConfig
	// Whether there was at least one memory limit specified in this definition.
	// Experimental.
	MemoryLimitSpecified() *bool
	// The mount points for data volumes in your container.
	// Experimental.
	MountPoints() *[]*MountPoint
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// The list of port mappings for the container.
	//
	// Port mappings allow containers to access ports
	// on the host container instance to send or receive traffic.
	// Experimental.
	PortMappings() *[]*PortMapping
	// Whether this container definition references a specific JSON field of a secret stored in Secrets Manager.
	// Experimental.
	ReferencesSecretJsonField() *bool
	// The name of the task definition that includes this container definition.
	// Experimental.
	TaskDefinition() TaskDefinition
	// An array of ulimits to set in the container.
	// Experimental.
	Ulimits() *[]*Ulimit
	// The data volumes to mount from another container in the same task definition.
	// Experimental.
	VolumesFrom() *[]*VolumeFrom
	// This method adds one or more container dependencies to the container.
	// Experimental.
	AddContainerDependencies(containerDependencies ...*ContainerDependency)
	// This method adds an environment variable to the container.
	// Experimental.
	AddEnvironment(name *string, value *string)
	// This method adds one or more resources to the container.
	// Experimental.
	AddInferenceAcceleratorResource(inferenceAcceleratorResources ...*string)
	// This method adds a link which allows containers to communicate with each other without the need for port mappings.
	//
	// This parameter is only supported if the task definition is using the bridge network mode.
	// Warning: The --link flag is a legacy feature of Docker. It may eventually be removed.
	// Experimental.
	AddLink(container ContainerDefinition, alias *string)
	// This method adds one or more mount points for data volumes to the container.
	// Experimental.
	AddMountPoints(mountPoints ...*MountPoint)
	// This method adds one or more port mappings to the container.
	// Experimental.
	AddPortMappings(portMappings ...*PortMapping)
	// This method mounts temporary disk space to the container.
	//
	// This adds the correct container mountPoint and task definition volume.
	// Experimental.
	AddScratch(scratch *ScratchSpace)
	// This method adds the specified statement to the IAM task execution policy in the task definition.
	// Experimental.
	AddToExecutionPolicy(statement awsiam.PolicyStatement)
	// This method adds one or more ulimits to the container.
	// Experimental.
	AddUlimits(ulimits ...*Ulimit)
	// This method adds one or more volumes to the container.
	// Experimental.
	AddVolumesFrom(volumesFrom ...*VolumeFrom)
	// Returns the host port for the requested container port if it exists.
	// Experimental.
	FindPortMapping(containerPort *float64, protocol Protocol) *PortMapping
	// 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()
	// Render this container definition to a CloudFormation object.
	// Experimental.
	RenderContainerDefinition(_taskDefinition TaskDefinition) *CfnTaskDefinition_ContainerDefinitionProperty
	// 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
}

Firelens log router.

Example:

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

var containerImage containerImage
var duration duration
var environmentFile environmentFile
var linuxParameters linuxParameters
var logDriver logDriver
var secret secret
var taskDefinition taskDefinition

firelensLogRouter := awscdk.Aws_ecs.NewFirelensLogRouter(this, jsii.String("MyFirelensLogRouter"), &firelensLogRouterProps{
	firelensConfig: &firelensConfig{
		type: awscdk.*Aws_ecs.firelensLogRouterType_FLUENTBIT,

		// the properties below are optional
		options: &firelensOptions{
			configFileValue: jsii.String("configFileValue"),

			// the properties below are optional
			configFileType: awscdk.*Aws_ecs.firelensConfigFileType_S3,
			enableECSLogMetadata: jsii.Boolean(false),
		},
	},
	image: containerImage,
	taskDefinition: taskDefinition,

	// the properties below are optional
	command: []*string{
		jsii.String("command"),
	},
	containerName: jsii.String("containerName"),
	cpu: jsii.Number(123),
	disableNetworking: jsii.Boolean(false),
	dnsSearchDomains: []*string{
		jsii.String("dnsSearchDomains"),
	},
	dnsServers: []*string{
		jsii.String("dnsServers"),
	},
	dockerLabels: map[string]*string{
		"dockerLabelsKey": jsii.String("dockerLabels"),
	},
	dockerSecurityOptions: []*string{
		jsii.String("dockerSecurityOptions"),
	},
	entryPoint: []*string{
		jsii.String("entryPoint"),
	},
	environment: map[string]*string{
		"environmentKey": jsii.String("environment"),
	},
	environmentFiles: []*environmentFile{
		environmentFile,
	},
	essential: jsii.Boolean(false),
	extraHosts: map[string]*string{
		"extraHostsKey": jsii.String("extraHosts"),
	},
	gpuCount: jsii.Number(123),
	healthCheck: &healthCheck{
		command: []*string{
			jsii.String("command"),
		},

		// the properties below are optional
		interval: duration,
		retries: jsii.Number(123),
		startPeriod: duration,
		timeout: duration,
	},
	hostname: jsii.String("hostname"),
	inferenceAcceleratorResources: []*string{
		jsii.String("inferenceAcceleratorResources"),
	},
	linuxParameters: linuxParameters,
	logging: logDriver,
	memoryLimitMiB: jsii.Number(123),
	memoryReservationMiB: jsii.Number(123),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(123),

			// the properties below are optional
			hostPort: jsii.Number(123),
			protocol: awscdk.*Aws_ecs.protocol_TCP,
		},
	},
	privileged: jsii.Boolean(false),
	readonlyRootFilesystem: jsii.Boolean(false),
	secrets: map[string]*secret{
		"secretsKey": secret,
	},
	startTimeout: duration,
	stopTimeout: duration,
	systemControls: []systemControl{
		&systemControl{
			namespace: jsii.String("namespace"),
			value: jsii.String("value"),
		},
	},
	user: jsii.String("user"),
	workingDirectory: jsii.String("workingDirectory"),
})

Experimental.

func NewFirelensLogRouter

func NewFirelensLogRouter(scope constructs.Construct, id *string, props *FirelensLogRouterProps) FirelensLogRouter

Constructs a new instance of the FirelensLogRouter class. Experimental.

type FirelensLogRouterDefinitionOptions

type FirelensLogRouterDefinitionOptions 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 either repository-url/image:tag or repository-url/image@digest.
	// TODO: Update these to specify using classes of IContainerImage.
	// Experimental.
	Image ContainerImage `field:"required" json:"image" yaml:"image"`
	// 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 name of the container.
	// Experimental.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
	// The minimum number of CPU units to reserve for the container.
	// Experimental.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// Specifies whether networking is disabled within the container.
	//
	// When this parameter is true, networking is disabled within the container.
	// Experimental.
	DisableNetworking *bool `field:"optional" json:"disableNetworking" yaml:"disableNetworking"`
	// A list of DNS search domains that are presented to the container.
	// Experimental.
	DnsSearchDomains *[]*string `field:"optional" json:"dnsSearchDomains" yaml:"dnsSearchDomains"`
	// A list of DNS servers that are presented to the container.
	// Experimental.
	DnsServers *[]*string `field:"optional" json:"dnsServers" yaml:"dnsServers"`
	// A key/value map of labels to add to the container.
	// Experimental.
	DockerLabels *map[string]*string `field:"optional" json:"dockerLabels" yaml:"dockerLabels"`
	// A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems.
	// Experimental.
	DockerSecurityOptions *[]*string `field:"optional" json:"dockerSecurityOptions" yaml:"dockerSecurityOptions"`
	// The ENTRYPOINT value to pass to the container.
	// See: https://docs.docker.com/engine/reference/builder/#entrypoint
	//
	// Experimental.
	EntryPoint *[]*string `field:"optional" json:"entryPoint" yaml:"entryPoint"`
	// The environment variables to pass to the container.
	// Experimental.
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// The environment files to pass to the container.
	// See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html
	//
	// Experimental.
	EnvironmentFiles *[]EnvironmentFile `field:"optional" json:"environmentFiles" yaml:"environmentFiles"`
	// Specifies whether the container is marked essential.
	//
	// If the essential parameter of a container is marked as true, and that container fails
	// or stops for any reason, all other containers that are part of the task are stopped.
	// If the essential parameter of a container is marked as false, then its failure does not
	// affect the rest of the containers in a task. All tasks must have at least one essential container.
	//
	// If this parameter is omitted, a container is assumed to be essential.
	// Experimental.
	Essential *bool `field:"optional" json:"essential" yaml:"essential"`
	// A list of hostnames and IP address mappings to append to the /etc/hosts file on the container.
	// Experimental.
	ExtraHosts *map[string]*string `field:"optional" json:"extraHosts" yaml:"extraHosts"`
	// The number of GPUs assigned to the container.
	// Experimental.
	GpuCount *float64 `field:"optional" json:"gpuCount" yaml:"gpuCount"`
	// The health check command and associated configuration parameters for the container.
	// Experimental.
	HealthCheck *HealthCheck `field:"optional" json:"healthCheck" yaml:"healthCheck"`
	// The hostname to use for your container.
	// Experimental.
	Hostname *string `field:"optional" json:"hostname" yaml:"hostname"`
	// The inference accelerators referenced by the container.
	// Experimental.
	InferenceAcceleratorResources *[]*string `field:"optional" json:"inferenceAcceleratorResources" yaml:"inferenceAcceleratorResources"`
	// Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
	//
	// For more information see [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html).
	// Experimental.
	LinuxParameters LinuxParameters `field:"optional" json:"linuxParameters" yaml:"linuxParameters"`
	// The log configuration specification for the container.
	// Experimental.
	Logging LogDriver `field:"optional" json:"logging" yaml:"logging"`
	// The amount (in MiB) of memory to present to the container.
	//
	// If your container attempts to exceed the allocated memory, the container
	// is terminated.
	//
	// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
	// Experimental.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
	// The soft limit (in MiB) of memory to reserve for the container.
	//
	// When system memory is under heavy contention, Docker attempts to keep the
	// container memory to this soft limit. However, your container can consume more
	// memory when it needs to, up to either the hard limit specified with the memory
	// parameter (if applicable), or all of the available memory on the container
	// instance, whichever comes first.
	//
	// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
	// Experimental.
	MemoryReservationMiB *float64 `field:"optional" json:"memoryReservationMiB" yaml:"memoryReservationMiB"`
	// The port mappings to add to the container definition.
	// Experimental.
	PortMappings *[]*PortMapping `field:"optional" json:"portMappings" yaml:"portMappings"`
	// Specifies whether the container is marked as privileged.
	//
	// 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.
	ReadonlyRootFilesystem *bool `field:"optional" json:"readonlyRootFilesystem" yaml:"readonlyRootFilesystem"`
	// The secret environment variables to pass to the container.
	// Experimental.
	Secrets *map[string]Secret `field:"optional" json:"secrets" yaml:"secrets"`
	// Time duration (in seconds) to wait before giving up on resolving dependencies for a container.
	// Experimental.
	StartTimeout awscdk.Duration `field:"optional" json:"startTimeout" yaml:"startTimeout"`
	// Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.
	// Experimental.
	StopTimeout awscdk.Duration `field:"optional" json:"stopTimeout" yaml:"stopTimeout"`
	// A list of namespaced kernel parameters to set in the container.
	// See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_systemcontrols
	//
	// Experimental.
	SystemControls *[]*SystemControl `field:"optional" json:"systemControls" yaml:"systemControls"`
	// The user name to use inside the container.
	// Experimental.
	User *string `field:"optional" json:"user" yaml:"user"`
	// The working directory in which to run commands inside the container.
	// Experimental.
	WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
	// Firelens configuration.
	// Experimental.
	FirelensConfig *FirelensConfig `field:"required" json:"firelensConfig" yaml:"firelensConfig"`
}

The options for creating a firelens log router.

Example:

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

var containerImage containerImage
var duration duration
var environmentFile environmentFile
var linuxParameters linuxParameters
var logDriver logDriver
var secret secret

firelensLogRouterDefinitionOptions := &firelensLogRouterDefinitionOptions{
	firelensConfig: &firelensConfig{
		type: awscdk.Aws_ecs.firelensLogRouterType_FLUENTBIT,

		// the properties below are optional
		options: &firelensOptions{
			configFileValue: jsii.String("configFileValue"),

			// the properties below are optional
			configFileType: awscdk.*Aws_ecs.firelensConfigFileType_S3,
			enableECSLogMetadata: jsii.Boolean(false),
		},
	},
	image: containerImage,

	// the properties below are optional
	command: []*string{
		jsii.String("command"),
	},
	containerName: jsii.String("containerName"),
	cpu: jsii.Number(123),
	disableNetworking: jsii.Boolean(false),
	dnsSearchDomains: []*string{
		jsii.String("dnsSearchDomains"),
	},
	dnsServers: []*string{
		jsii.String("dnsServers"),
	},
	dockerLabels: map[string]*string{
		"dockerLabelsKey": jsii.String("dockerLabels"),
	},
	dockerSecurityOptions: []*string{
		jsii.String("dockerSecurityOptions"),
	},
	entryPoint: []*string{
		jsii.String("entryPoint"),
	},
	environment: map[string]*string{
		"environmentKey": jsii.String("environment"),
	},
	environmentFiles: []*environmentFile{
		environmentFile,
	},
	essential: jsii.Boolean(false),
	extraHosts: map[string]*string{
		"extraHostsKey": jsii.String("extraHosts"),
	},
	gpuCount: jsii.Number(123),
	healthCheck: &healthCheck{
		command: []*string{
			jsii.String("command"),
		},

		// the properties below are optional
		interval: duration,
		retries: jsii.Number(123),
		startPeriod: duration,
		timeout: duration,
	},
	hostname: jsii.String("hostname"),
	inferenceAcceleratorResources: []*string{
		jsii.String("inferenceAcceleratorResources"),
	},
	linuxParameters: linuxParameters,
	logging: logDriver,
	memoryLimitMiB: jsii.Number(123),
	memoryReservationMiB: jsii.Number(123),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(123),

			// the properties below are optional
			hostPort: jsii.Number(123),
			protocol: awscdk.*Aws_ecs.protocol_TCP,
		},
	},
	privileged: jsii.Boolean(false),
	readonlyRootFilesystem: jsii.Boolean(false),
	secrets: map[string]*secret{
		"secretsKey": secret,
	},
	startTimeout: duration,
	stopTimeout: duration,
	systemControls: []systemControl{
		&systemControl{
			namespace: jsii.String("namespace"),
			value: jsii.String("value"),
		},
	},
	user: jsii.String("user"),
	workingDirectory: jsii.String("workingDirectory"),
}

Experimental.

type FirelensLogRouterProps

type FirelensLogRouterProps 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 either repository-url/image:tag or repository-url/image@digest.
	// TODO: Update these to specify using classes of IContainerImage.
	// Experimental.
	Image ContainerImage `field:"required" json:"image" yaml:"image"`
	// 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 name of the container.
	// Experimental.
	ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"`
	// The minimum number of CPU units to reserve for the container.
	// Experimental.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// Specifies whether networking is disabled within the container.
	//
	// When this parameter is true, networking is disabled within the container.
	// Experimental.
	DisableNetworking *bool `field:"optional" json:"disableNetworking" yaml:"disableNetworking"`
	// A list of DNS search domains that are presented to the container.
	// Experimental.
	DnsSearchDomains *[]*string `field:"optional" json:"dnsSearchDomains" yaml:"dnsSearchDomains"`
	// A list of DNS servers that are presented to the container.
	// Experimental.
	DnsServers *[]*string `field:"optional" json:"dnsServers" yaml:"dnsServers"`
	// A key/value map of labels to add to the container.
	// Experimental.
	DockerLabels *map[string]*string `field:"optional" json:"dockerLabels" yaml:"dockerLabels"`
	// A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems.
	// Experimental.
	DockerSecurityOptions *[]*string `field:"optional" json:"dockerSecurityOptions" yaml:"dockerSecurityOptions"`
	// The ENTRYPOINT value to pass to the container.
	// See: https://docs.docker.com/engine/reference/builder/#entrypoint
	//
	// Experimental.
	EntryPoint *[]*string `field:"optional" json:"entryPoint" yaml:"entryPoint"`
	// The environment variables to pass to the container.
	// Experimental.
	Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"`
	// The environment files to pass to the container.
	// See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html
	//
	// Experimental.
	EnvironmentFiles *[]EnvironmentFile `field:"optional" json:"environmentFiles" yaml:"environmentFiles"`
	// Specifies whether the container is marked essential.
	//
	// If the essential parameter of a container is marked as true, and that container fails
	// or stops for any reason, all other containers that are part of the task are stopped.
	// If the essential parameter of a container is marked as false, then its failure does not
	// affect the rest of the containers in a task. All tasks must have at least one essential container.
	//
	// If this parameter is omitted, a container is assumed to be essential.
	// Experimental.
	Essential *bool `field:"optional" json:"essential" yaml:"essential"`
	// A list of hostnames and IP address mappings to append to the /etc/hosts file on the container.
	// Experimental.
	ExtraHosts *map[string]*string `field:"optional" json:"extraHosts" yaml:"extraHosts"`
	// The number of GPUs assigned to the container.
	// Experimental.
	GpuCount *float64 `field:"optional" json:"gpuCount" yaml:"gpuCount"`
	// The health check command and associated configuration parameters for the container.
	// Experimental.
	HealthCheck *HealthCheck `field:"optional" json:"healthCheck" yaml:"healthCheck"`
	// The hostname to use for your container.
	// Experimental.
	Hostname *string `field:"optional" json:"hostname" yaml:"hostname"`
	// The inference accelerators referenced by the container.
	// Experimental.
	InferenceAcceleratorResources *[]*string `field:"optional" json:"inferenceAcceleratorResources" yaml:"inferenceAcceleratorResources"`
	// Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
	//
	// For more information see [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html).
	// Experimental.
	LinuxParameters LinuxParameters `field:"optional" json:"linuxParameters" yaml:"linuxParameters"`
	// The log configuration specification for the container.
	// Experimental.
	Logging LogDriver `field:"optional" json:"logging" yaml:"logging"`
	// The amount (in MiB) of memory to present to the container.
	//
	// If your container attempts to exceed the allocated memory, the container
	// is terminated.
	//
	// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
	// Experimental.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
	// The soft limit (in MiB) of memory to reserve for the container.
	//
	// When system memory is under heavy contention, Docker attempts to keep the
	// container memory to this soft limit. However, your container can consume more
	// memory when it needs to, up to either the hard limit specified with the memory
	// parameter (if applicable), or all of the available memory on the container
	// instance, whichever comes first.
	//
	// At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
	// Experimental.
	MemoryReservationMiB *float64 `field:"optional" json:"memoryReservationMiB" yaml:"memoryReservationMiB"`
	// The port mappings to add to the container definition.
	// Experimental.
	PortMappings *[]*PortMapping `field:"optional" json:"portMappings" yaml:"portMappings"`
	// Specifies whether the container is marked as privileged.
	//
	// 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.
	ReadonlyRootFilesystem *bool `field:"optional" json:"readonlyRootFilesystem" yaml:"readonlyRootFilesystem"`
	// The secret environment variables to pass to the container.
	// Experimental.
	Secrets *map[string]Secret `field:"optional" json:"secrets" yaml:"secrets"`
	// Time duration (in seconds) to wait before giving up on resolving dependencies for a container.
	// Experimental.
	StartTimeout awscdk.Duration `field:"optional" json:"startTimeout" yaml:"startTimeout"`
	// Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.
	// Experimental.
	StopTimeout awscdk.Duration `field:"optional" json:"stopTimeout" yaml:"stopTimeout"`
	// A list of namespaced kernel parameters to set in the container.
	// See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_systemcontrols
	//
	// Experimental.
	SystemControls *[]*SystemControl `field:"optional" json:"systemControls" yaml:"systemControls"`
	// The user name to use inside the container.
	// Experimental.
	User *string `field:"optional" json:"user" yaml:"user"`
	// The working directory in which to run commands inside the container.
	// Experimental.
	WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
	// The name of the task definition that includes this container definition.
	//
	// [disable-awslint:ref-via-interface].
	// Experimental.
	TaskDefinition TaskDefinition `field:"required" json:"taskDefinition" yaml:"taskDefinition"`
	// Firelens configuration.
	// Experimental.
	FirelensConfig *FirelensConfig `field:"required" json:"firelensConfig" yaml:"firelensConfig"`
}

The properties in a firelens log router.

Example:

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

var containerImage containerImage
var duration duration
var environmentFile environmentFile
var linuxParameters linuxParameters
var logDriver logDriver
var secret secret
var taskDefinition taskDefinition

firelensLogRouterProps := &firelensLogRouterProps{
	firelensConfig: &firelensConfig{
		type: awscdk.Aws_ecs.firelensLogRouterType_FLUENTBIT,

		// the properties below are optional
		options: &firelensOptions{
			configFileValue: jsii.String("configFileValue"),

			// the properties below are optional
			configFileType: awscdk.*Aws_ecs.firelensConfigFileType_S3,
			enableECSLogMetadata: jsii.Boolean(false),
		},
	},
	image: containerImage,
	taskDefinition: taskDefinition,

	// the properties below are optional
	command: []*string{
		jsii.String("command"),
	},
	containerName: jsii.String("containerName"),
	cpu: jsii.Number(123),
	disableNetworking: jsii.Boolean(false),
	dnsSearchDomains: []*string{
		jsii.String("dnsSearchDomains"),
	},
	dnsServers: []*string{
		jsii.String("dnsServers"),
	},
	dockerLabels: map[string]*string{
		"dockerLabelsKey": jsii.String("dockerLabels"),
	},
	dockerSecurityOptions: []*string{
		jsii.String("dockerSecurityOptions"),
	},
	entryPoint: []*string{
		jsii.String("entryPoint"),
	},
	environment: map[string]*string{
		"environmentKey": jsii.String("environment"),
	},
	environmentFiles: []*environmentFile{
		environmentFile,
	},
	essential: jsii.Boolean(false),
	extraHosts: map[string]*string{
		"extraHostsKey": jsii.String("extraHosts"),
	},
	gpuCount: jsii.Number(123),
	healthCheck: &healthCheck{
		command: []*string{
			jsii.String("command"),
		},

		// the properties below are optional
		interval: duration,
		retries: jsii.Number(123),
		startPeriod: duration,
		timeout: duration,
	},
	hostname: jsii.String("hostname"),
	inferenceAcceleratorResources: []*string{
		jsii.String("inferenceAcceleratorResources"),
	},
	linuxParameters: linuxParameters,
	logging: logDriver,
	memoryLimitMiB: jsii.Number(123),
	memoryReservationMiB: jsii.Number(123),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(123),

			// the properties below are optional
			hostPort: jsii.Number(123),
			protocol: awscdk.*Aws_ecs.protocol_TCP,
		},
	},
	privileged: jsii.Boolean(false),
	readonlyRootFilesystem: jsii.Boolean(false),
	secrets: map[string]*secret{
		"secretsKey": secret,
	},
	startTimeout: duration,
	stopTimeout: duration,
	systemControls: []systemControl{
		&systemControl{
			namespace: jsii.String("namespace"),
			value: jsii.String("value"),
		},
	},
	user: jsii.String("user"),
	workingDirectory: jsii.String("workingDirectory"),
}

Experimental.

type FirelensLogRouterType

type FirelensLogRouterType string

Firelens log router type, fluentbit or fluentd.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html Experimental.

const (
	// fluentbit.
	// Experimental.
	FirelensLogRouterType_FLUENTBIT FirelensLogRouterType = "FLUENTBIT"
	// fluentd.
	// Experimental.
	FirelensLogRouterType_FLUENTD FirelensLogRouterType = "FLUENTD"
)

type FirelensOptions

type FirelensOptions struct {
	// Custom configuration file, S3 ARN or a file path.
	// Experimental.
	ConfigFileValue *string `field:"required" json:"configFileValue" yaml:"configFileValue"`
	// Custom configuration file, s3 or file.
	// Experimental.
	ConfigFileType FirelensConfigFileType `field:"optional" json:"configFileType" yaml:"configFileType"`
	// By default, Amazon ECS adds additional fields in your log entries that help identify the source of the logs.
	//
	// You can disable this action by setting enable-ecs-log-metadata to false.
	// Experimental.
	EnableECSLogMetadata *bool `field:"optional" json:"enableECSLogMetadata" yaml:"enableECSLogMetadata"`
}

The options for firelens log router https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef-customconfig.

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"

firelensOptions := &firelensOptions{
	configFileValue: jsii.String("configFileValue"),

	// the properties below are optional
	configFileType: awscdk.Aws_ecs.firelensConfigFileType_S3,
	enableECSLogMetadata: jsii.Boolean(false),
}

Experimental.

type FluentdLogDriver

type FluentdLogDriver interface {
	LogDriver
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(_scope awscdk.Construct, _containerDefinition ContainerDefinition) *LogDriverConfig
}

A log driver that sends log information to journald Logs.

Example:

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

var duration duration

fluentdLogDriver := awscdk.Aws_ecs.NewFluentdLogDriver(&fluentdLogDriverProps{
	address: jsii.String("address"),
	asyncConnect: jsii.Boolean(false),
	bufferLimit: jsii.Number(123),
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	labels: []*string{
		jsii.String("labels"),
	},
	maxRetries: jsii.Number(123),
	retryWait: duration,
	subSecondPrecision: jsii.Boolean(false),
	tag: jsii.String("tag"),
})

Experimental.

func NewFluentdLogDriver

func NewFluentdLogDriver(props *FluentdLogDriverProps) FluentdLogDriver

Constructs a new instance of the FluentdLogDriver class. Experimental.

type FluentdLogDriverProps

type FluentdLogDriverProps struct {
	// The env option takes an array of keys.
	//
	// If there is collision between
	// label and env keys, the value of the env takes precedence. Adds additional fields
	// to the extra attributes of a logging message.
	// Experimental.
	Env *[]*string `field:"optional" json:"env" yaml:"env"`
	// The env-regex option is similar to and compatible with env.
	//
	// Its value is a regular
	// expression to match logging-related environment variables. It is used for advanced
	// log tag options.
	// Experimental.
	EnvRegex *string `field:"optional" json:"envRegex" yaml:"envRegex"`
	// The labels option takes an array of keys.
	//
	// If there is collision
	// between label and env keys, the value of the env takes precedence. Adds additional
	// fields to the extra attributes of a logging message.
	// Experimental.
	Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
	// By default, Docker uses the first 12 characters of the container ID to tag log messages.
	//
	// Refer to the log tag option documentation for customizing the
	// log tag format.
	// Experimental.
	Tag *string `field:"optional" json:"tag" yaml:"tag"`
	// By default, the logging driver connects to localhost:24224.
	//
	// Supply the
	// address option to connect to a different address. tcp(default) and unix
	// sockets are supported.
	// Experimental.
	Address *string `field:"optional" json:"address" yaml:"address"`
	// Docker connects to Fluentd in the background.
	//
	// Messages are buffered until
	// the connection is established.
	// Experimental.
	AsyncConnect *bool `field:"optional" json:"asyncConnect" yaml:"asyncConnect"`
	// The amount of data to buffer before flushing to disk.
	// Experimental.
	BufferLimit *float64 `field:"optional" json:"bufferLimit" yaml:"bufferLimit"`
	// The maximum number of retries.
	// Experimental.
	MaxRetries *float64 `field:"optional" json:"maxRetries" yaml:"maxRetries"`
	// How long to wait between retries.
	// Experimental.
	RetryWait awscdk.Duration `field:"optional" json:"retryWait" yaml:"retryWait"`
	// Generates event logs in nanosecond resolution.
	// Experimental.
	SubSecondPrecision *bool `field:"optional" json:"subSecondPrecision" yaml:"subSecondPrecision"`
}

Specifies the fluentd log driver configuration options.

[Source](https://docs.docker.com/config/containers/logging/fluentd/)

Example:

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

var duration duration

fluentdLogDriverProps := &fluentdLogDriverProps{
	address: jsii.String("address"),
	asyncConnect: jsii.Boolean(false),
	bufferLimit: jsii.Number(123),
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	labels: []*string{
		jsii.String("labels"),
	},
	maxRetries: jsii.Number(123),
	retryWait: duration,
	subSecondPrecision: jsii.Boolean(false),
	tag: jsii.String("tag"),
}

Experimental.

type GelfCompressionType

type GelfCompressionType string

The type of compression the GELF driver uses to compress each log message. Experimental.

const (
	// Experimental.
	GelfCompressionType_GZIP GelfCompressionType = "GZIP"
	// Experimental.
	GelfCompressionType_ZLIB GelfCompressionType = "ZLIB"
	// Experimental.
	GelfCompressionType_NONE GelfCompressionType = "NONE"
)

type GelfLogDriver

type GelfLogDriver interface {
	LogDriver
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(_scope awscdk.Construct, _containerDefinition ContainerDefinition) *LogDriverConfig
}

A log driver that sends log information to journald Logs.

Example:

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

var duration duration

gelfLogDriver := awscdk.Aws_ecs.NewGelfLogDriver(&gelfLogDriverProps{
	address: jsii.String("address"),

	// the properties below are optional
	compressionLevel: jsii.Number(123),
	compressionType: awscdk.*Aws_ecs.gelfCompressionType_GZIP,
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	labels: []*string{
		jsii.String("labels"),
	},
	tag: jsii.String("tag"),
	tcpMaxReconnect: jsii.Number(123),
	tcpReconnectDelay: duration,
})

Experimental.

func NewGelfLogDriver

func NewGelfLogDriver(props *GelfLogDriverProps) GelfLogDriver

Constructs a new instance of the GelfLogDriver class. Experimental.

type GelfLogDriverProps

type GelfLogDriverProps struct {
	// The env option takes an array of keys.
	//
	// If there is collision between
	// label and env keys, the value of the env takes precedence. Adds additional fields
	// to the extra attributes of a logging message.
	// Experimental.
	Env *[]*string `field:"optional" json:"env" yaml:"env"`
	// The env-regex option is similar to and compatible with env.
	//
	// Its value is a regular
	// expression to match logging-related environment variables. It is used for advanced
	// log tag options.
	// Experimental.
	EnvRegex *string `field:"optional" json:"envRegex" yaml:"envRegex"`
	// The labels option takes an array of keys.
	//
	// If there is collision
	// between label and env keys, the value of the env takes precedence. Adds additional
	// fields to the extra attributes of a logging message.
	// Experimental.
	Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
	// By default, Docker uses the first 12 characters of the container ID to tag log messages.
	//
	// Refer to the log tag option documentation for customizing the
	// log tag format.
	// Experimental.
	Tag *string `field:"optional" json:"tag" yaml:"tag"`
	// The address of the GELF server.
	//
	// tcp and udp are the only supported URI
	// specifier and you must specify the port.
	// Experimental.
	Address *string `field:"required" json:"address" yaml:"address"`
	// UDP Only The level of compression when gzip or zlib is the gelf-compression-type.
	//
	// An integer in the range of -1 to 9 (BestCompression). Higher levels provide more
	// compression at lower speed. Either -1 or 0 disables compression.
	// Experimental.
	CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"`
	// UDP Only The type of compression the GELF driver uses to compress each log message.
	//
	// Allowed values are gzip, zlib and none.
	// Experimental.
	CompressionType GelfCompressionType `field:"optional" json:"compressionType" yaml:"compressionType"`
	// TCP Only The maximum number of reconnection attempts when the connection drop.
	//
	// A positive integer.
	// Experimental.
	TcpMaxReconnect *float64 `field:"optional" json:"tcpMaxReconnect" yaml:"tcpMaxReconnect"`
	// TCP Only The number of seconds to wait between reconnection attempts.
	//
	// A positive integer.
	// Experimental.
	TcpReconnectDelay awscdk.Duration `field:"optional" json:"tcpReconnectDelay" yaml:"tcpReconnectDelay"`
}

Specifies the journald log driver configuration options.

[Source](https://docs.docker.com/config/containers/logging/gelf/)

Example:

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.gelf(&gelfLogDriverProps{
		address: jsii.String("my-gelf-address"),
	}),
})

Experimental.

type GenericLogDriver

type GenericLogDriver interface {
	LogDriver
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(_scope awscdk.Construct, _containerDefinition ContainerDefinition) *LogDriverConfig
}

A log driver that sends logs to the specified driver.

Example:

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.NewGenericLogDriver(&genericLogDriverProps{
		logDriver: jsii.String("fluentd"),
		options: map[string]*string{
			"tag": jsii.String("example-tag"),
		},
	}),
})

Experimental.

func NewGenericLogDriver

func NewGenericLogDriver(props *GenericLogDriverProps) GenericLogDriver

Constructs a new instance of the GenericLogDriver class. Experimental.

type GenericLogDriverProps

type GenericLogDriverProps 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.
	//
	// For tasks using the Fargate launch type, the supported log drivers are awslogs and splunk.
	// For tasks using the EC2 launch type, the supported log drivers are awslogs, syslog, gelf, fluentd, splunk, journald, and json-file.
	//
	// For more information about using the awslogs log driver, see
	// [Using the awslogs Log Driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html)
	// in the Amazon Elastic Container Service Developer Guide.
	// Experimental.
	LogDriver *string `field:"required" json:"logDriver" yaml:"logDriver"`
	// The configuration options to send to the log driver.
	// Experimental.
	Options *map[string]*string `field:"optional" json:"options" yaml:"options"`
	// The secrets to pass to the log configuration.
	// Experimental.
	SecretOptions *map[string]Secret `field:"optional" json:"secretOptions" yaml:"secretOptions"`
}

The configuration to use when creating a log driver.

Example:

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.NewGenericLogDriver(&genericLogDriverProps{
		logDriver: jsii.String("fluentd"),
		options: map[string]*string{
			"tag": jsii.String("example-tag"),
		},
	}),
})

Experimental.

type HealthCheck

type HealthCheck struct {
	// A string array representing the command that the container runs to determine if it is healthy.
	//
	// The string array must start with CMD to execute the command arguments directly, or
	// CMD-SHELL to run the command with the container's default shell.
	//
	// For example: [ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ].
	// Experimental.
	Command *[]*string `field:"required" json:"command" yaml:"command"`
	// The time period in seconds between each health check execution.
	//
	// You may specify between 5 and 300 seconds.
	// Experimental.
	Interval awscdk.Duration `field:"optional" json:"interval" yaml:"interval"`
	// The number of times to retry a failed health check before the container is considered unhealthy.
	//
	// You may specify between 1 and 10 retries.
	// Experimental.
	Retries *float64 `field:"optional" json:"retries" yaml:"retries"`
	// The optional grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries.
	//
	// You may specify between 0 and 300 seconds.
	// Experimental.
	StartPeriod awscdk.Duration `field:"optional" json:"startPeriod" yaml:"startPeriod"`
	// The time period in seconds to wait for a health check to succeed before it is considered a failure.
	//
	// You may specify between 2 and 60 seconds.
	// Experimental.
	Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"`
}

The health check command and associated configuration parameters for the container.

Example:

var vpc vpc
var securityGroup securityGroup

queueProcessingFargateService := ecsPatterns.NewQueueProcessingFargateService(this, jsii.String("Service"), &queueProcessingFargateServiceProps{
	vpc: vpc,
	memoryLimitMiB: jsii.Number(512),
	image: ecs.containerImage.fromRegistry(jsii.String("test")),
	healthCheck: &healthCheck{
		command: []*string{
			jsii.String("CMD-SHELL"),
			jsii.String("curl -f http://localhost/ || exit 1"),
		},
		// the properties below are optional
		interval: awscdk.Duration.minutes(jsii.Number(30)),
		retries: jsii.Number(123),
		startPeriod: awscdk.Duration.minutes(jsii.Number(30)),
		timeout: awscdk.Duration.minutes(jsii.Number(30)),
	},
})

Experimental.

type Host

type Host struct {
	// Specifies the path on the host container instance that is presented to the container.
	//
	// If the sourcePath value does not 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 property is not supported for tasks that use the Fargate launch type.
	// Experimental.
	SourcePath *string `field:"optional" json:"sourcePath" yaml:"sourcePath"`
}

The details on a container instance bind mount host volume.

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"

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

Experimental.

type IBaseService

type IBaseService interface {
	IService
	// The cluster that hosts the service.
	// Experimental.
	Cluster() ICluster
}

The interface for BaseService. Experimental.

func BaseService_FromServiceArnWithCluster

func BaseService_FromServiceArnWithCluster(scope constructs.Construct, id *string, serviceArn *string) IBaseService

Import an existing ECS/Fargate Service using the service cluster format.

The format is the "new" format "arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name". See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids

Experimental.

func Ec2Service_FromEc2ServiceAttributes

func Ec2Service_FromEc2ServiceAttributes(scope constructs.Construct, id *string, attrs *Ec2ServiceAttributes) IBaseService

Imports from the specified service attributes. Experimental.

func Ec2Service_FromServiceArnWithCluster

func Ec2Service_FromServiceArnWithCluster(scope constructs.Construct, id *string, serviceArn *string) IBaseService

Import an existing ECS/Fargate Service using the service cluster format.

The format is the "new" format "arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name". See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids

Experimental.

func ExternalService_FromExternalServiceAttributes

func ExternalService_FromExternalServiceAttributes(scope constructs.Construct, id *string, attrs *ExternalServiceAttributes) IBaseService

Imports from the specified service attributes. Experimental.

func ExternalService_FromServiceArnWithCluster

func ExternalService_FromServiceArnWithCluster(scope constructs.Construct, id *string, serviceArn *string) IBaseService

Import an existing ECS/Fargate Service using the service cluster format.

The format is the "new" format "arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name". See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids

Experimental.

func FargateService_FromFargateServiceAttributes

func FargateService_FromFargateServiceAttributes(scope constructs.Construct, id *string, attrs *FargateServiceAttributes) IBaseService

Imports from the specified service attributes. Experimental.

func FargateService_FromServiceArnWithCluster

func FargateService_FromServiceArnWithCluster(scope constructs.Construct, id *string, serviceArn *string) IBaseService

Import an existing ECS/Fargate Service using the service cluster format.

The format is the "new" format "arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name". See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids

Experimental.

type ICluster

type ICluster interface {
	awscdk.IResource
	// The autoscaling group added to the cluster if capacity is associated to the cluster.
	// Experimental.
	AutoscalingGroup() awsautoscaling.IAutoScalingGroup
	// The Amazon Resource Name (ARN) that identifies the cluster.
	// Experimental.
	ClusterArn() *string
	// The name of the cluster.
	// Experimental.
	ClusterName() *string
	// Manage the allowed network connections for the cluster with Security Groups.
	// Experimental.
	Connections() awsec2.Connections
	// The AWS Cloud Map namespace to associate with the cluster.
	// Experimental.
	DefaultCloudMapNamespace() awsservicediscovery.INamespace
	// The execute command configuration for the cluster.
	// Experimental.
	ExecuteCommandConfiguration() *ExecuteCommandConfiguration
	// Specifies whether the cluster has EC2 instance capacity.
	// Experimental.
	HasEc2Capacity() *bool
	// The VPC associated with the cluster.
	// Experimental.
	Vpc() awsec2.IVpc
}

A regional grouping of one or more container instances on which you can run tasks and services. Experimental.

func Cluster_FromClusterArn

func Cluster_FromClusterArn(scope constructs.Construct, id *string, clusterArn *string) ICluster

Import an existing cluster to the stack from the cluster ARN.

This does not provide access to the vpc, hasEc2Capacity, or connections - use the `fromClusterAttributes` method to access those properties. Experimental.

func Cluster_FromClusterAttributes

func Cluster_FromClusterAttributes(scope constructs.Construct, id *string, attrs *ClusterAttributes) ICluster

Import an existing cluster to the stack from its attributes. Experimental.

type IEc2Service

type IEc2Service interface {
	IService
}

The interface for a service using the EC2 launch type on an ECS cluster. Experimental.

func Ec2Service_FromEc2ServiceArn

func Ec2Service_FromEc2ServiceArn(scope constructs.Construct, id *string, ec2ServiceArn *string) IEc2Service

Imports from the specified service ARN. Experimental.

type IEc2TaskDefinition

type IEc2TaskDefinition interface {
	ITaskDefinition
}

The interface of a task definition run on an EC2 cluster. Experimental.

func Ec2TaskDefinition_FromEc2TaskDefinitionArn

func Ec2TaskDefinition_FromEc2TaskDefinitionArn(scope constructs.Construct, id *string, ec2TaskDefinitionArn *string) IEc2TaskDefinition

Imports a task definition from the specified task definition ARN. Experimental.

func Ec2TaskDefinition_FromEc2TaskDefinitionAttributes

func Ec2TaskDefinition_FromEc2TaskDefinitionAttributes(scope constructs.Construct, id *string, attrs *Ec2TaskDefinitionAttributes) IEc2TaskDefinition

Imports an existing Ec2 task definition from its attributes. Experimental.

type IExternalService

type IExternalService interface {
	IService
}

The interface for a service using the External launch type on an ECS cluster. Experimental.

func ExternalService_FromExternalServiceArn

func ExternalService_FromExternalServiceArn(scope constructs.Construct, id *string, externalServiceArn *string) IExternalService

Imports from the specified service ARN. Experimental.

type IExternalTaskDefinition

type IExternalTaskDefinition interface {
	ITaskDefinition
}

The interface of a task definition run on an External cluster. Experimental.

func ExternalTaskDefinition_FromEc2TaskDefinitionArn

func ExternalTaskDefinition_FromEc2TaskDefinitionArn(scope constructs.Construct, id *string, externalTaskDefinitionArn *string) IExternalTaskDefinition

Imports a task definition from the specified task definition ARN. Experimental.

func ExternalTaskDefinition_FromExternalTaskDefinitionAttributes

func ExternalTaskDefinition_FromExternalTaskDefinitionAttributes(scope constructs.Construct, id *string, attrs *ExternalTaskDefinitionAttributes) IExternalTaskDefinition

Imports an existing External task definition from its attributes. Experimental.

type IFargateService

type IFargateService interface {
	IService
}

The interface for a service using the Fargate launch type on an ECS cluster. Experimental.

func FargateService_FromFargateServiceArn

func FargateService_FromFargateServiceArn(scope constructs.Construct, id *string, fargateServiceArn *string) IFargateService

Imports from the specified service ARN. Experimental.

type IFargateTaskDefinition

type IFargateTaskDefinition interface {
	ITaskDefinition
}

The interface of a task definition run on a Fargate cluster. Experimental.

func FargateTaskDefinition_FromFargateTaskDefinitionArn

func FargateTaskDefinition_FromFargateTaskDefinitionArn(scope constructs.Construct, id *string, fargateTaskDefinitionArn *string) IFargateTaskDefinition

Imports a task definition from the specified task definition ARN. Experimental.

func FargateTaskDefinition_FromFargateTaskDefinitionAttributes

func FargateTaskDefinition_FromFargateTaskDefinitionAttributes(scope constructs.Construct, id *string, attrs *FargateTaskDefinitionAttributes) IFargateTaskDefinition

Import an existing Fargate task definition from its attributes. Experimental.

type IService

type IService interface {
	awscdk.IResource
	// The Amazon Resource Name (ARN) of the service.
	// Experimental.
	ServiceArn() *string
	// The name of the service.
	// Experimental.
	ServiceName() *string
}

The interface for a service. Experimental.

type ITaskDefinition

type ITaskDefinition interface {
	awscdk.IResource
	// What launch types this task definition should be compatible with.
	// Experimental.
	Compatibility() Compatibility
	// Execution role for this task definition.
	// Experimental.
	ExecutionRole() awsiam.IRole
	// Return true if the task definition can be run on an EC2 cluster.
	// Experimental.
	IsEc2Compatible() *bool
	// Return true if the task definition can be run on a ECS Anywhere cluster.
	// Experimental.
	IsExternalCompatible() *bool
	// Return true if the task definition can be run on a Fargate cluster.
	// Experimental.
	IsFargateCompatible() *bool
	// The networking mode to use for the containers in the task.
	// Experimental.
	NetworkMode() NetworkMode
	// ARN of this task definition.
	// Experimental.
	TaskDefinitionArn() *string
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole() awsiam.IRole
}

The interface for all task definitions. Experimental.

func Ec2TaskDefinition_FromTaskDefinitionArn

func Ec2TaskDefinition_FromTaskDefinitionArn(scope constructs.Construct, id *string, taskDefinitionArn *string) ITaskDefinition

Imports a task definition from the specified task definition ARN.

The task will have a compatibility of EC2+Fargate. Experimental.

func Ec2TaskDefinition_FromTaskDefinitionAttributes

func Ec2TaskDefinition_FromTaskDefinitionAttributes(scope constructs.Construct, id *string, attrs *TaskDefinitionAttributes) ITaskDefinition

Create a task definition from a task definition reference. Experimental.

func ExternalTaskDefinition_FromTaskDefinitionArn

func ExternalTaskDefinition_FromTaskDefinitionArn(scope constructs.Construct, id *string, taskDefinitionArn *string) ITaskDefinition

Imports a task definition from the specified task definition ARN.

The task will have a compatibility of EC2+Fargate. Experimental.

func ExternalTaskDefinition_FromTaskDefinitionAttributes

func ExternalTaskDefinition_FromTaskDefinitionAttributes(scope constructs.Construct, id *string, attrs *TaskDefinitionAttributes) ITaskDefinition

Create a task definition from a task definition reference. Experimental.

func FargateTaskDefinition_FromTaskDefinitionArn

func FargateTaskDefinition_FromTaskDefinitionArn(scope constructs.Construct, id *string, taskDefinitionArn *string) ITaskDefinition

Imports a task definition from the specified task definition ARN.

The task will have a compatibility of EC2+Fargate. Experimental.

func FargateTaskDefinition_FromTaskDefinitionAttributes

func FargateTaskDefinition_FromTaskDefinitionAttributes(scope constructs.Construct, id *string, attrs *TaskDefinitionAttributes) ITaskDefinition

Create a task definition from a task definition reference. Experimental.

func TaskDefinition_FromTaskDefinitionArn

func TaskDefinition_FromTaskDefinitionArn(scope constructs.Construct, id *string, taskDefinitionArn *string) ITaskDefinition

Imports a task definition from the specified task definition ARN.

The task will have a compatibility of EC2+Fargate. Experimental.

func TaskDefinition_FromTaskDefinitionAttributes

func TaskDefinition_FromTaskDefinitionAttributes(scope constructs.Construct, id *string, attrs *TaskDefinitionAttributes) ITaskDefinition

Create a task definition from a task definition reference. Experimental.

type ITaskDefinitionExtension

type ITaskDefinitionExtension interface {
	// Apply the extension to the given TaskDefinition.
	// Experimental.
	Extend(taskDefinition TaskDefinition)
}

An extension for Task Definitions.

Classes that want to make changes to a TaskDefinition (such as adding helper containers) can implement this interface, and can then be "added" to a TaskDefinition like so:

taskDefinition.addExtension(new MyExtension("some_parameter"));

Experimental.

type InferenceAccelerator

type InferenceAccelerator struct {
	// The Elastic Inference accelerator device name.
	// Experimental.
	DeviceName *string `field:"optional" json:"deviceName" yaml:"deviceName"`
	// The Elastic Inference accelerator type to use.
	//
	// The allowed values are: eia2.medium, eia2.large and eia2.xlarge.
	// Experimental.
	DeviceType *string `field:"optional" json:"deviceType" yaml:"deviceType"`
}

Elastic Inference Accelerator.

For more information, see [Elastic Inference Basics](https://docs.aws.amazon.com/elastic-inference/latest/developerguide/basics.html)

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"

inferenceAccelerator := &inferenceAccelerator{
	deviceName: jsii.String("deviceName"),
	deviceType: jsii.String("deviceType"),
}

Experimental.

type IpcMode

type IpcMode string

The IPC resource namespace to use for the containers in the task. Experimental.

const (
	// If none is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance.
	// Experimental.
	IpcMode_NONE IpcMode = "NONE"
	// If host is specified, then all containers within the tasks that specified the host IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance.
	// Experimental.
	IpcMode_HOST IpcMode = "HOST"
	// If task is specified, all containers within the specified task share the same IPC resources.
	// Experimental.
	IpcMode_TASK IpcMode = "TASK"
)

type JournaldLogDriver

type JournaldLogDriver interface {
	LogDriver
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(_scope awscdk.Construct, _containerDefinition ContainerDefinition) *LogDriverConfig
}

A log driver that sends log information to journald Logs.

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"

journaldLogDriver := awscdk.Aws_ecs.NewJournaldLogDriver(&journaldLogDriverProps{
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	labels: []*string{
		jsii.String("labels"),
	},
	tag: jsii.String("tag"),
})

Experimental.

func NewJournaldLogDriver

func NewJournaldLogDriver(props *JournaldLogDriverProps) JournaldLogDriver

Constructs a new instance of the JournaldLogDriver class. Experimental.

type JournaldLogDriverProps

type JournaldLogDriverProps struct {
	// The env option takes an array of keys.
	//
	// If there is collision between
	// label and env keys, the value of the env takes precedence. Adds additional fields
	// to the extra attributes of a logging message.
	// Experimental.
	Env *[]*string `field:"optional" json:"env" yaml:"env"`
	// The env-regex option is similar to and compatible with env.
	//
	// Its value is a regular
	// expression to match logging-related environment variables. It is used for advanced
	// log tag options.
	// Experimental.
	EnvRegex *string `field:"optional" json:"envRegex" yaml:"envRegex"`
	// The labels option takes an array of keys.
	//
	// If there is collision
	// between label and env keys, the value of the env takes precedence. Adds additional
	// fields to the extra attributes of a logging message.
	// Experimental.
	Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
	// By default, Docker uses the first 12 characters of the container ID to tag log messages.
	//
	// Refer to the log tag option documentation for customizing the
	// log tag format.
	// Experimental.
	Tag *string `field:"optional" json:"tag" yaml:"tag"`
}

Specifies the journald log driver configuration options.

[Source](https://docs.docker.com/config/containers/logging/journald/)

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"

journaldLogDriverProps := &journaldLogDriverProps{
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	labels: []*string{
		jsii.String("labels"),
	},
	tag: jsii.String("tag"),
}

Experimental.

type JsonFileLogDriver

type JsonFileLogDriver interface {
	LogDriver
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(_scope awscdk.Construct, _containerDefinition ContainerDefinition) *LogDriverConfig
}

A log driver that sends log information to json-file Logs.

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"

jsonFileLogDriver := awscdk.Aws_ecs.NewJsonFileLogDriver(&jsonFileLogDriverProps{
	compress: jsii.Boolean(false),
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	labels: []*string{
		jsii.String("labels"),
	},
	maxFile: jsii.Number(123),
	maxSize: jsii.String("maxSize"),
	tag: jsii.String("tag"),
})

Experimental.

func NewJsonFileLogDriver

func NewJsonFileLogDriver(props *JsonFileLogDriverProps) JsonFileLogDriver

Constructs a new instance of the JsonFileLogDriver class. Experimental.

type JsonFileLogDriverProps

type JsonFileLogDriverProps struct {
	// The env option takes an array of keys.
	//
	// If there is collision between
	// label and env keys, the value of the env takes precedence. Adds additional fields
	// to the extra attributes of a logging message.
	// Experimental.
	Env *[]*string `field:"optional" json:"env" yaml:"env"`
	// The env-regex option is similar to and compatible with env.
	//
	// Its value is a regular
	// expression to match logging-related environment variables. It is used for advanced
	// log tag options.
	// Experimental.
	EnvRegex *string `field:"optional" json:"envRegex" yaml:"envRegex"`
	// The labels option takes an array of keys.
	//
	// If there is collision
	// between label and env keys, the value of the env takes precedence. Adds additional
	// fields to the extra attributes of a logging message.
	// Experimental.
	Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
	// By default, Docker uses the first 12 characters of the container ID to tag log messages.
	//
	// Refer to the log tag option documentation for customizing the
	// log tag format.
	// Experimental.
	Tag *string `field:"optional" json:"tag" yaml:"tag"`
	// Toggles compression for rotated logs.
	// Experimental.
	Compress *bool `field:"optional" json:"compress" yaml:"compress"`
	// The maximum number of log files that can be present.
	//
	// If rolling the logs creates
	// excess files, the oldest file is removed. Only effective when max-size is also set.
	// A positive integer.
	// Experimental.
	MaxFile *float64 `field:"optional" json:"maxFile" yaml:"maxFile"`
	// The maximum size of the log before it is rolled.
	//
	// A positive integer plus a modifier
	// representing the unit of measure (k, m, or g).
	// Experimental.
	MaxSize *string `field:"optional" json:"maxSize" yaml:"maxSize"`
}

Specifies the json-file log driver configuration options.

[Source](https://docs.docker.com/config/containers/logging/json-file/)

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"

jsonFileLogDriverProps := &jsonFileLogDriverProps{
	compress: jsii.Boolean(false),
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	labels: []*string{
		jsii.String("labels"),
	},
	maxFile: jsii.Number(123),
	maxSize: jsii.String("maxSize"),
	tag: jsii.String("tag"),
}

Experimental.

type LaunchType

type LaunchType string

The launch type of an ECS service. Experimental.

const (
	// The service will be launched using the EC2 launch type.
	// Experimental.
	LaunchType_EC2 LaunchType = "EC2"
	// The service will be launched using the FARGATE launch type.
	// Experimental.
	LaunchType_FARGATE LaunchType = "FARGATE"
	// The service will be launched using the EXTERNAL launch type.
	// Experimental.
	LaunchType_EXTERNAL LaunchType = "EXTERNAL"
)

type LinuxParameters

type LinuxParameters interface {
	awscdk.Construct
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Adds one or more Linux capabilities to the Docker configuration of a container.
	//
	// Only works with EC2 launch type.
	// Experimental.
	AddCapabilities(cap ...Capability)
	// Adds one or more host devices to a container.
	// Experimental.
	AddDevices(device ...*Device)
	// Specifies the container path, mount options, and size (in MiB) of the tmpfs mount for a container.
	//
	// Only works with EC2 launch type.
	// Experimental.
	AddTmpfs(tmpfs ...*Tmpfs)
	// Removes one or more Linux capabilities to the Docker configuration of a container.
	//
	// Only works with EC2 launch type.
	// Experimental.
	DropCapabilities(cap ...Capability)
	// 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()
	// Renders the Linux parameters to a CloudFormation object.
	// Experimental.
	RenderLinuxParameters() *CfnTaskDefinition_LinuxParametersProperty
	// 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
}

Linux-specific options that are applied to 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"

linuxParameters := awscdk.Aws_ecs.NewLinuxParameters(this, jsii.String("MyLinuxParameters"), &linuxParametersProps{
	initProcessEnabled: jsii.Boolean(false),
	sharedMemorySize: jsii.Number(123),
})

Experimental.

func NewLinuxParameters

func NewLinuxParameters(scope constructs.Construct, id *string, props *LinuxParametersProps) LinuxParameters

Constructs a new instance of the LinuxParameters class. Experimental.

type LinuxParametersProps

type LinuxParametersProps struct {
	// Specifies whether to run an init process inside the container that forwards signals and reaps processes.
	// Experimental.
	InitProcessEnabled *bool `field:"optional" json:"initProcessEnabled" yaml:"initProcessEnabled"`
	// The value for the size (in MiB) of the /dev/shm volume.
	// Experimental.
	SharedMemorySize *float64 `field:"optional" json:"sharedMemorySize" yaml:"sharedMemorySize"`
}

The properties for defining Linux-specific options that are applied to 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"

linuxParametersProps := &linuxParametersProps{
	initProcessEnabled: jsii.Boolean(false),
	sharedMemorySize: jsii.Number(123),
}

Experimental.

type ListenerConfig

type ListenerConfig interface {
	// Create and attach a target group to listener.
	// Experimental.
	AddTargets(id *string, target *LoadBalancerTargetOptions, service BaseService)
}

Base class for configuring listener when registering targets.

Example:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elbv2.NewApplicationLoadBalancer(this, jsii.String("LB"), &applicationLoadBalancerProps{
	vpc: vpc,
	internetFacing: jsii.Boolean(true),
})
listener := lb.addListener(jsii.String("Listener"), &baseApplicationListenerProps{
	port: jsii.Number(80),
})
service.registerLoadBalancerTargets(&ecsTarget{
	containerName: jsii.String("web"),
	containerPort: jsii.Number(80),
	newTargetGroupId: jsii.String("ECS"),
	listener: ecs.listenerConfig.applicationListener(listener, &addApplicationTargetsProps{
		protocol: elbv2.applicationProtocol_HTTPS,
	}),
})

Experimental.

func ListenerConfig_ApplicationListener

Create a config for adding target group to ALB listener. Experimental.

func ListenerConfig_NetworkListener

Create a config for adding target group to NLB listener. Experimental.

type LoadBalancerTargetOptions

type LoadBalancerTargetOptions struct {
	// The name of the container.
	// Experimental.
	ContainerName *string `field:"required" json:"containerName" yaml:"containerName"`
	// The port number of the container.
	//
	// Only applicable when using application/network load balancers.
	// Experimental.
	ContainerPort *float64 `field:"optional" json:"containerPort" yaml:"containerPort"`
	// The protocol used for the port mapping.
	//
	// Only applicable when using application load balancers.
	// Experimental.
	Protocol Protocol `field:"optional" json:"protocol" yaml:"protocol"`
}

Properties for defining an ECS target.

The port mapping for it must already have been created through addPortMapping().

Example:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elb.NewLoadBalancer(this, jsii.String("LB"), &loadBalancerProps{
	vpc: vpc,
})
lb.addListener(&loadBalancerListener{
	externalPort: jsii.Number(80),
})
lb.addTarget(service.loadBalancerTarget(&loadBalancerTargetOptions{
	containerName: jsii.String("MyContainer"),
	containerPort: jsii.Number(80),
}))

Experimental.

type LogDriver

type LogDriver interface {
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(scope awscdk.Construct, containerDefinition ContainerDefinition) *LogDriverConfig
}

The base class for log drivers.

Example:

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.splunk(&splunkLogDriverProps{
		token: awscdk.SecretValue.secretsManager(jsii.String("my-splunk-token")),
		url: jsii.String("my-splunk-url"),
	}),
})

Experimental.

func AwsLogDriver_AwsLogs

func AwsLogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func FireLensLogDriver_AwsLogs

func FireLensLogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func FluentdLogDriver_AwsLogs

func FluentdLogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func GelfLogDriver_AwsLogs

func GelfLogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func GenericLogDriver_AwsLogs

func GenericLogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func JournaldLogDriver_AwsLogs

func JournaldLogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func JsonFileLogDriver_AwsLogs

func JsonFileLogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func LogDriver_AwsLogs

func LogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func LogDrivers_AwsLogs

func LogDrivers_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func LogDrivers_Firelens

func LogDrivers_Firelens(props *FireLensLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to firelens log router.

For detail configurations, please refer to Amazon ECS FireLens Examples: https://github.com/aws-samples/amazon-ecs-firelens-examples Experimental.

func LogDrivers_Fluentd

func LogDrivers_Fluentd(props *FluentdLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to fluentd Logs. Experimental.

func LogDrivers_Gelf

func LogDrivers_Gelf(props *GelfLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to gelf Logs. Experimental.

func LogDrivers_Journald

func LogDrivers_Journald(props *JournaldLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to journald Logs. Experimental.

func LogDrivers_JsonFile

func LogDrivers_JsonFile(props *JsonFileLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to json-file Logs. Experimental.

func LogDrivers_Splunk

func LogDrivers_Splunk(props *SplunkLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to splunk Logs. Experimental.

func LogDrivers_Syslog

func LogDrivers_Syslog(props *SyslogLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to syslog Logs. Experimental.

func SplunkLogDriver_AwsLogs

func SplunkLogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

func SyslogLogDriver_AwsLogs

func SyslogLogDriver_AwsLogs(props *AwsLogDriverProps) LogDriver

Creates a log driver configuration that sends log information to CloudWatch Logs. Experimental.

type LogDriverConfig

type LogDriverConfig 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.
	//
	// For tasks using the Fargate launch type, the supported log drivers are awslogs, splunk, and awsfirelens.
	// For tasks using the EC2 launch type, the supported log drivers are awslogs, fluentd, gelf, json-file, journald,
	// logentries,syslog, splunk, and awsfirelens.
	//
	// For more information about using the awslogs log driver, see
	// [Using the awslogs Log Driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html)
	// in the Amazon Elastic Container Service Developer Guide.
	//
	// For more information about using the awsfirelens log driver, see
	// [Custom Log Routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html)
	// in the Amazon Elastic Container Service Developer Guide.
	// Experimental.
	LogDriver *string `field:"required" json:"logDriver" yaml:"logDriver"`
	// The configuration options to send to the log driver.
	// Experimental.
	Options *map[string]*string `field:"optional" json:"options" yaml:"options"`
	// The secrets to pass to the log configuration.
	// Experimental.
	SecretOptions *[]*CfnTaskDefinition_SecretProperty `field:"optional" json:"secretOptions" yaml:"secretOptions"`
}

The configuration to use when creating a log driver.

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"

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

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

Experimental.

type LogDrivers

type LogDrivers interface {
}

The base class for log drivers.

Example:

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.awsLogs(&awsLogDriverProps{
		streamPrefix: jsii.String("EventDemo"),
	}),
})

Experimental.

func NewLogDrivers

func NewLogDrivers() LogDrivers

Experimental.

type MachineImageType

type MachineImageType string

The machine image type.

Example:

var cluster cluster

cluster.addCapacity(jsii.String("graviton-cluster"), &addCapacityOptions{
	minCapacity: jsii.Number(2),
	instanceType: ec2.NewInstanceType(jsii.String("c6g.large")),
	machineImageType: ecs.machineImageType_BOTTLEROCKET,
})

Experimental.

const (
	// Amazon ECS-optimized Amazon Linux 2 AMI.
	// Experimental.
	MachineImageType_AMAZON_LINUX_2 MachineImageType = "AMAZON_LINUX_2"
	// Bottlerocket AMI.
	// Experimental.
	MachineImageType_BOTTLEROCKET MachineImageType = "BOTTLEROCKET"
)

type MemoryUtilizationScalingProps

type MemoryUtilizationScalingProps struct {
	// Indicates whether scale in by the target tracking policy is disabled.
	//
	// If the value is true, scale in is disabled and the target tracking policy
	// won't remove capacity from the scalable resource. Otherwise, scale in is
	// enabled and the target tracking policy can remove capacity from the
	// scalable resource.
	// Experimental.
	DisableScaleIn *bool `field:"optional" json:"disableScaleIn" yaml:"disableScaleIn"`
	// A name for the scaling policy.
	// Experimental.
	PolicyName *string `field:"optional" json:"policyName" yaml:"policyName"`
	// Period after a scale in activity completes before another scale in activity can start.
	// Experimental.
	ScaleInCooldown awscdk.Duration `field:"optional" json:"scaleInCooldown" yaml:"scaleInCooldown"`
	// Period after a scale out activity completes before another scale out activity can start.
	// Experimental.
	ScaleOutCooldown awscdk.Duration `field:"optional" json:"scaleOutCooldown" yaml:"scaleOutCooldown"`
	// The target value for memory utilization across all tasks in the service.
	// Experimental.
	TargetUtilizationPercent *float64 `field:"required" json:"targetUtilizationPercent" yaml:"targetUtilizationPercent"`
}

The properties for enabling scaling based on memory utilization.

Example:

var cluster cluster

loadBalancedFargateService := ecsPatterns.NewApplicationLoadBalancedFargateService(this, jsii.String("Service"), &applicationLoadBalancedFargateServiceProps{
	cluster: cluster,
	memoryLimitMiB: jsii.Number(1024),
	desiredCount: jsii.Number(1),
	cpu: jsii.Number(512),
	taskImageOptions: &applicationLoadBalancedTaskImageOptions{
		image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	},
})

scalableTarget := loadBalancedFargateService.service.autoScaleTaskCount(&enableScalingProps{
	minCapacity: jsii.Number(1),
	maxCapacity: jsii.Number(20),
})

scalableTarget.scaleOnCpuUtilization(jsii.String("CpuScaling"), &cpuUtilizationScalingProps{
	targetUtilizationPercent: jsii.Number(50),
})

scalableTarget.scaleOnMemoryUtilization(jsii.String("MemoryScaling"), &memoryUtilizationScalingProps{
	targetUtilizationPercent: jsii.Number(50),
})

Experimental.

type MountPoint

type MountPoint struct {
	// The path on the container to mount the host volume at.
	// Experimental.
	ContainerPath *string `field:"required" json:"containerPath" yaml:"containerPath"`
	// Specifies whether to give the container read-only access to the volume.
	//
	// If this value is true, the container has read-only access to the volume.
	// If this value is false, then the container can write to the volume.
	// Experimental.
	ReadOnly *bool `field:"required" json:"readOnly" yaml:"readOnly"`
	// The name of the volume to mount.
	//
	// Must be a volume name referenced in the name parameter of task definition volume.
	// Experimental.
	SourceVolume *string `field:"required" json:"sourceVolume" yaml:"sourceVolume"`
}

The details of data volume mount points for a 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"

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

Experimental.

type NetworkMode

type NetworkMode string

The networking mode to use for the containers in the task.

Example:

ec2TaskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"), &ec2TaskDefinitionProps{
	networkMode: ecs.networkMode_BRIDGE,
})

container := ec2TaskDefinition.addContainer(jsii.String("WebContainer"), &containerDefinitionOptions{
	// Use an image from DockerHub
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
})

Experimental.

const (
	// The task's containers do not have external connectivity and port mappings can't be specified in the container definition.
	// Experimental.
	NetworkMode_NONE NetworkMode = "NONE"
	// The task utilizes Docker's built-in virtual network which runs inside each container instance.
	// Experimental.
	NetworkMode_BRIDGE NetworkMode = "BRIDGE"
	// The task is allocated an elastic network interface.
	// Experimental.
	NetworkMode_AWS_VPC NetworkMode = "AWS_VPC"
	// The task bypasses Docker's built-in virtual network and maps container ports directly to the EC2 instance's network interface directly.
	//
	// In this mode, you can't run multiple instantiations of the same task on a
	// single container instance when port mappings are used.
	// Experimental.
	NetworkMode_HOST NetworkMode = "HOST"
	// The task utilizes NAT network mode required by Windows containers.
	//
	// This is the only supported network mode for Windows containers. For more information, see
	// [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#network_mode).
	// Experimental.
	NetworkMode_NAT NetworkMode = "NAT"
)

type OperatingSystemFamily

type OperatingSystemFamily interface {
}

The operating system for Fargate Runtime Platform.

Example:

// Create a Task Definition for the Windows container to start
taskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	runtimePlatform: &runtimePlatform{
		operatingSystemFamily: ecs.operatingSystemFamily_WINDOWS_SERVER_2019_CORE(),
		cpuArchitecture: ecs.cpuArchitecture_X86_64(),
	},
	cpu: jsii.Number(1024),
	memoryLimitMiB: jsii.Number(2048),
})

taskDefinition.addContainer(jsii.String("windowsservercore"), &containerDefinitionOptions{
	logging: ecs.logDriver.awsLogs(&awsLogDriverProps{
		streamPrefix: jsii.String("win-iis-on-fargate"),
	}),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(80),
		},
	},
	image: ecs.containerImage.fromRegistry(jsii.String("mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019")),
})

Experimental.

func OperatingSystemFamily_LINUX

func OperatingSystemFamily_LINUX() OperatingSystemFamily

func OperatingSystemFamily_WINDOWS_SERVER_2004_CORE

func OperatingSystemFamily_WINDOWS_SERVER_2004_CORE() OperatingSystemFamily

func OperatingSystemFamily_WINDOWS_SERVER_2016_FULL

func OperatingSystemFamily_WINDOWS_SERVER_2016_FULL() OperatingSystemFamily

func OperatingSystemFamily_WINDOWS_SERVER_2019_CORE

func OperatingSystemFamily_WINDOWS_SERVER_2019_CORE() OperatingSystemFamily

func OperatingSystemFamily_WINDOWS_SERVER_2019_FULL

func OperatingSystemFamily_WINDOWS_SERVER_2019_FULL() OperatingSystemFamily

func OperatingSystemFamily_WINDOWS_SERVER_2022_CORE

func OperatingSystemFamily_WINDOWS_SERVER_2022_CORE() OperatingSystemFamily

func OperatingSystemFamily_WINDOWS_SERVER_2022_FULL

func OperatingSystemFamily_WINDOWS_SERVER_2022_FULL() OperatingSystemFamily

func OperatingSystemFamily_WINDOWS_SERVER_20H2_CORE

func OperatingSystemFamily_WINDOWS_SERVER_20H2_CORE() OperatingSystemFamily

type PidMode

type PidMode string

The process namespace to use for the containers in the task. Experimental.

const (
	// If host is specified, then all containers within the tasks that specified the host PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance.
	// Experimental.
	PidMode_HOST PidMode = "HOST"
	// If task is specified, all containers within the specified task share the same process namespace.
	// Experimental.
	PidMode_TASK PidMode = "TASK"
)

type PlacementConstraint

type PlacementConstraint interface {
	// Return the placement JSON.
	// Experimental.
	ToJson() *[]*CfnService_PlacementConstraintProperty
}

The placement constraints to use for tasks in the service. For more information, see [Amazon ECS Task Placement Constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html).

Tasks will only be placed on instances that match these rules.

Example:

vpc := ec2.vpc.fromLookup(this, jsii.String("Vpc"), &vpcLookupOptions{
	isDefault: jsii.Boolean(true),
})

cluster := ecs.NewCluster(this, jsii.String("Ec2Cluster"), &clusterProps{
	vpc: vpc,
})
cluster.addCapacity(jsii.String("DefaultAutoScalingGroup"), &addCapacityOptions{
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
	vpcSubnets: &subnetSelection{
		subnetType: ec2.subnetType_PUBLIC,
	},
})

taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &taskDefinitionProps{
	compatibility: ecs.compatibility_EC2,
})

taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("foo/bar")),
	memoryLimitMiB: jsii.Number(256),
})

runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &ecsRunTaskProps{
	integrationPattern: sfn.integrationPattern_RUN_JOB,
	cluster: cluster,
	taskDefinition: taskDefinition,
	launchTarget: tasks.NewEcsEc2LaunchTarget(&ecsEc2LaunchTargetOptions{
		placementStrategies: []placementStrategy{
			ecs.*placementStrategy.spreadAcrossInstances(),
			ecs.*placementStrategy.packedByCpu(),
			ecs.*placementStrategy.randomly(),
		},
		placementConstraints: []placementConstraint{
			ecs.*placementConstraint.memberOf(jsii.String("blieptuut")),
		},
	}),
})

Experimental.

func PlacementConstraint_DistinctInstances

func PlacementConstraint_DistinctInstances() PlacementConstraint

Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Experimental.

func PlacementConstraint_MemberOf

func PlacementConstraint_MemberOf(expressions ...*string) PlacementConstraint

Use memberOf to restrict the selection to a group of valid candidates specified by a query expression.

Multiple expressions can be specified. For more information, see [Cluster Query Language](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html).

You can specify multiple expressions in one call. The tasks will only be placed on instances matching all expressions. See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html

Experimental.

type PlacementStrategy

type PlacementStrategy interface {
	// Return the placement JSON.
	// Experimental.
	ToJson() *[]*CfnService_PlacementStrategyProperty
}

The placement strategies to use for tasks in the service. For more information, see [Amazon ECS Task Placement Strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html).

Tasks will preferentially be placed on instances that match these rules.

Example:

vpc := ec2.vpc.fromLookup(this, jsii.String("Vpc"), &vpcLookupOptions{
	isDefault: jsii.Boolean(true),
})

cluster := ecs.NewCluster(this, jsii.String("Ec2Cluster"), &clusterProps{
	vpc: vpc,
})
cluster.addCapacity(jsii.String("DefaultAutoScalingGroup"), &addCapacityOptions{
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
	vpcSubnets: &subnetSelection{
		subnetType: ec2.subnetType_PUBLIC,
	},
})

taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &taskDefinitionProps{
	compatibility: ecs.compatibility_EC2,
})

taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("foo/bar")),
	memoryLimitMiB: jsii.Number(256),
})

runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &ecsRunTaskProps{
	integrationPattern: sfn.integrationPattern_RUN_JOB,
	cluster: cluster,
	taskDefinition: taskDefinition,
	launchTarget: tasks.NewEcsEc2LaunchTarget(&ecsEc2LaunchTargetOptions{
		placementStrategies: []placementStrategy{
			ecs.*placementStrategy.spreadAcrossInstances(),
			ecs.*placementStrategy.packedByCpu(),
			ecs.*placementStrategy.randomly(),
		},
		placementConstraints: []placementConstraint{
			ecs.*placementConstraint.memberOf(jsii.String("blieptuut")),
		},
	}),
})

Experimental.

func PlacementStrategy_PackedBy

func PlacementStrategy_PackedBy(resource BinPackResource) PlacementStrategy

Places tasks on the container instances with the least available capacity of the specified resource. Experimental.

func PlacementStrategy_PackedByCpu

func PlacementStrategy_PackedByCpu() PlacementStrategy

Places tasks on container instances with the least available amount of CPU capacity.

This minimizes the number of instances in use. Experimental.

func PlacementStrategy_PackedByMemory

func PlacementStrategy_PackedByMemory() PlacementStrategy

Places tasks on container instances with the least available amount of memory capacity.

This minimizes the number of instances in use. Experimental.

func PlacementStrategy_Randomly

func PlacementStrategy_Randomly() PlacementStrategy

Places tasks randomly. Experimental.

func PlacementStrategy_SpreadAcross

func PlacementStrategy_SpreadAcross(fields ...*string) PlacementStrategy

Places tasks evenly based on the specified value.

You can use one of the built-in attributes found on `BuiltInAttributes` or supply your own custom instance attributes. If more than one attribute is supplied, spreading is done in order. Experimental.

func PlacementStrategy_SpreadAcrossInstances

func PlacementStrategy_SpreadAcrossInstances() PlacementStrategy

Places tasks evenly across all container instances in the cluster. Experimental.

type PortMapping

type PortMapping struct {
	// The port number on the container that is bound to the user-specified or automatically assigned host port.
	//
	// If you are using containers in a task with the awsvpc or host network mode, exposed ports should be specified using containerPort.
	// If you are using containers in a task with the bridge network mode and you specify a container port and not a host port,
	// your container automatically receives a host port in the ephemeral port range.
	//
	// For more information, see hostPort.
	// Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.
	// Experimental.
	ContainerPort *float64 `field:"required" json:"containerPort" yaml:"containerPort"`
	// The port number on the container instance to reserve for your container.
	//
	// If you are using containers in a task with the awsvpc or host network mode,
	// the hostPort can either be left blank or set to the same value as the containerPort.
	//
	// If you are using containers in a task with the bridge network mode,
	// you can specify a non-reserved host port for your container port mapping, or
	// you can omit the hostPort (or set it to 0) while specifying a containerPort and
	// your container automatically receives a port in the ephemeral port range for
	// your container instance operating system and Docker version.
	// Experimental.
	HostPort *float64 `field:"optional" json:"hostPort" yaml:"hostPort"`
	// The protocol used for the port mapping.
	//
	// Valid values are Protocol.TCP and Protocol.UDP.
	// Experimental.
	Protocol Protocol `field:"optional" json:"protocol" yaml:"protocol"`
}

Port mappings allow containers to access ports on the host container instance to send or receive traffic.

Example:

var container containerDefinition

container.addPortMappings(&portMapping{
	containerPort: jsii.Number(3000),
})

Experimental.

type PropagatedTagSource

type PropagatedTagSource string

Propagate tags from either service or task definition. Experimental.

const (
	// Propagate tags from service.
	// Experimental.
	PropagatedTagSource_SERVICE PropagatedTagSource = "SERVICE"
	// Propagate tags from task definition.
	// Experimental.
	PropagatedTagSource_TASK_DEFINITION PropagatedTagSource = "TASK_DEFINITION"
	// Do not propagate.
	// Experimental.
	PropagatedTagSource_NONE PropagatedTagSource = "NONE"
)

type Protocol

type Protocol string

Network protocol.

Example:

var taskDefinition taskDefinition
var cluster cluster

// Add a container to the task definition
specificContainer := taskDefinition.addContainer(jsii.String("Container"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("/aws/aws-example-app")),
	memoryLimitMiB: jsii.Number(2048),
})

// Add a port mapping
specificContainer.addPortMappings(&portMapping{
	containerPort: jsii.Number(7600),
	protocol: ecs.protocol_TCP,
})

ecs.NewEc2Service(this, jsii.String("Service"), &ec2ServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
	cloudMapOptions: &cloudMapOptions{
		// Create SRV records - useful for bridge networking
		dnsRecordType: cloudmap.dnsRecordType_SRV,
		// Targets port TCP port 7600 `specificContainer`
		container: specificContainer,
		containerPort: jsii.Number(7600),
	},
})

Experimental.

const (
	// TCP.
	// Experimental.
	Protocol_TCP Protocol = "TCP"
	// UDP.
	// Experimental.
	Protocol_UDP Protocol = "UDP"
)

type ProxyConfiguration

type ProxyConfiguration interface {
	// Called when the proxy configuration is configured on a task definition.
	// Experimental.
	Bind(_scope awscdk.Construct, _taskDefinition TaskDefinition) *CfnTaskDefinition_ProxyConfigurationProperty
}

The base class for proxy configurations. Experimental.

func ProxyConfigurations_AppMeshProxyConfiguration

func ProxyConfigurations_AppMeshProxyConfiguration(props *AppMeshProxyConfigurationConfigProps) ProxyConfiguration

Constructs a new instance of the ProxyConfiguration class. Experimental.

type ProxyConfigurations

type ProxyConfigurations interface {
}

The base class for proxy configurations.

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"

proxyConfigurations := awscdk.Aws_ecs.NewProxyConfigurations()

Experimental.

func NewProxyConfigurations

func NewProxyConfigurations() ProxyConfigurations

Experimental.

type RepositoryImage

type RepositoryImage interface {
	ContainerImage
	// Called when the image is used by a ContainerDefinition.
	// Experimental.
	Bind(scope awscdk.Construct, containerDefinition ContainerDefinition) *ContainerImageConfig
}

An image hosted in a public or private repository.

For images hosted in Amazon ECR, see EcrImage(https://docs.aws.amazon.com/AmazonECR/latest/userguide/images.html).

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"
import "github.com/aws/aws-cdk-go/awscdk"

var dockerImageAsset dockerImageAsset

repositoryImage := awscdk.Aws_ecs.repositoryImage.fromDockerImageAsset(dockerImageAsset)

Experimental.

func AssetImage_FromRegistry

func AssetImage_FromRegistry(name *string, props *RepositoryImageProps) RepositoryImage

Reference an image on DockerHub or another online registry. Experimental.

func ContainerImage_FromRegistry

func ContainerImage_FromRegistry(name *string, props *RepositoryImageProps) RepositoryImage

Reference an image on DockerHub or another online registry. Experimental.

func EcrImage_FromRegistry

func EcrImage_FromRegistry(name *string, props *RepositoryImageProps) RepositoryImage

Reference an image on DockerHub or another online registry. Experimental.

func NewRepositoryImage

func NewRepositoryImage(imageName *string, props *RepositoryImageProps) RepositoryImage

Constructs a new instance of the RepositoryImage class. Experimental.

func RepositoryImage_FromRegistry

func RepositoryImage_FromRegistry(name *string, props *RepositoryImageProps) RepositoryImage

Reference an image on DockerHub or another online registry. Experimental.

func TagParameterContainerImage_FromRegistry

func TagParameterContainerImage_FromRegistry(name *string, props *RepositoryImageProps) RepositoryImage

Reference an image on DockerHub or another online registry. Experimental.

type RepositoryImageProps

type RepositoryImageProps struct {
	// The secret to expose to the container that contains the credentials for the image repository.
	//
	// The supported value is the full ARN of an AWS Secrets Manager secret.
	// Experimental.
	Credentials awssecretsmanager.ISecret `field:"optional" json:"credentials" yaml:"credentials"`
}

The properties for an image hosted in a public or private repository.

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"
import "github.com/aws/aws-cdk-go/awscdk"

var secret secret

repositoryImageProps := &repositoryImageProps{
	credentials: secret,
}

Experimental.

type RequestCountScalingProps

type RequestCountScalingProps struct {
	// Indicates whether scale in by the target tracking policy is disabled.
	//
	// If the value is true, scale in is disabled and the target tracking policy
	// won't remove capacity from the scalable resource. Otherwise, scale in is
	// enabled and the target tracking policy can remove capacity from the
	// scalable resource.
	// Experimental.
	DisableScaleIn *bool `field:"optional" json:"disableScaleIn" yaml:"disableScaleIn"`
	// A name for the scaling policy.
	// Experimental.
	PolicyName *string `field:"optional" json:"policyName" yaml:"policyName"`
	// Period after a scale in activity completes before another scale in activity can start.
	// Experimental.
	ScaleInCooldown awscdk.Duration `field:"optional" json:"scaleInCooldown" yaml:"scaleInCooldown"`
	// Period after a scale out activity completes before another scale out activity can start.
	// Experimental.
	ScaleOutCooldown awscdk.Duration `field:"optional" json:"scaleOutCooldown" yaml:"scaleOutCooldown"`
	// The number of ALB requests per target.
	// Experimental.
	RequestsPerTarget *float64 `field:"required" json:"requestsPerTarget" yaml:"requestsPerTarget"`
	// The ALB target group name.
	// Experimental.
	TargetGroup awselasticloadbalancingv2.ApplicationTargetGroup `field:"required" json:"targetGroup" yaml:"targetGroup"`
}

The properties for enabling scaling based on Application Load Balancer (ALB) request counts.

Example:

var target applicationTargetGroup
var service baseService

scaling := service.autoScaleTaskCount(&enableScalingProps{
	maxCapacity: jsii.Number(10),
})
scaling.scaleOnCpuUtilization(jsii.String("CpuScaling"), &cpuUtilizationScalingProps{
	targetUtilizationPercent: jsii.Number(50),
})

scaling.scaleOnRequestCount(jsii.String("RequestScaling"), &requestCountScalingProps{
	requestsPerTarget: jsii.Number(10000),
	targetGroup: target,
})

Experimental.

type RuntimePlatform

type RuntimePlatform struct {
	// The CpuArchitecture for Fargate Runtime Platform.
	// Experimental.
	CpuArchitecture CpuArchitecture `field:"optional" json:"cpuArchitecture" yaml:"cpuArchitecture"`
	// The operating system for Fargate Runtime Platform.
	// Experimental.
	OperatingSystemFamily OperatingSystemFamily `field:"optional" json:"operatingSystemFamily" yaml:"operatingSystemFamily"`
}

The interface for Runtime Platform.

Example:

// Create a Task Definition for the Windows container to start
taskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	runtimePlatform: &runtimePlatform{
		operatingSystemFamily: ecs.operatingSystemFamily_WINDOWS_SERVER_2019_CORE(),
		cpuArchitecture: ecs.cpuArchitecture_X86_64(),
	},
	cpu: jsii.Number(1024),
	memoryLimitMiB: jsii.Number(2048),
})

taskDefinition.addContainer(jsii.String("windowsservercore"), &containerDefinitionOptions{
	logging: ecs.logDriver.awsLogs(&awsLogDriverProps{
		streamPrefix: jsii.String("win-iis-on-fargate"),
	}),
	portMappings: []portMapping{
		&portMapping{
			containerPort: jsii.Number(80),
		},
	},
	image: ecs.containerImage.fromRegistry(jsii.String("mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019")),
})

Experimental.

type S3EnvironmentFile

type S3EnvironmentFile interface {
	EnvironmentFile
	// Called when the container is initialized to allow this object to bind to the stack.
	// Experimental.
	Bind(_scope awscdk.Construct) *EnvironmentFileConfig
}

Environment file from S3.

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"
import "github.com/aws/aws-cdk-go/awscdk"

var bucket bucket

s3EnvironmentFile := awscdk.Aws_ecs.NewS3EnvironmentFile(bucket, jsii.String("key"), jsii.String("objectVersion"))

Experimental.

func AssetEnvironmentFile_FromBucket

func AssetEnvironmentFile_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3EnvironmentFile

Loads the environment file from an S3 bucket.

Returns: `S3EnvironmentFile` associated with the specified S3 object. Experimental.

func EnvironmentFile_FromBucket

func EnvironmentFile_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3EnvironmentFile

Loads the environment file from an S3 bucket.

Returns: `S3EnvironmentFile` associated with the specified S3 object. Experimental.

func NewS3EnvironmentFile

func NewS3EnvironmentFile(bucket awss3.IBucket, key *string, objectVersion *string) S3EnvironmentFile

Experimental.

func S3EnvironmentFile_FromBucket

func S3EnvironmentFile_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3EnvironmentFile

Loads the environment file from an S3 bucket.

Returns: `S3EnvironmentFile` associated with the specified S3 object. Experimental.

type ScalableTaskCount

type ScalableTaskCount interface {
	awsapplicationautoscaling.BaseScalableAttribute
	// The construct tree node associated with this construct.
	// Experimental.
	Node() awscdk.ConstructNode
	// Experimental.
	Props() *awsapplicationautoscaling.BaseScalableAttributeProps
	// Scale out or in based on a metric value.
	// Experimental.
	DoScaleOnMetric(id *string, props *awsapplicationautoscaling.BasicStepScalingPolicyProps)
	// Scale out or in based on time.
	// Experimental.
	DoScaleOnSchedule(id *string, props *awsapplicationautoscaling.ScalingSchedule)
	// Scale out or in in order to keep a metric around a target value.
	// Experimental.
	DoScaleToTrackMetric(id *string, props *awsapplicationautoscaling.BasicTargetTrackingScalingPolicyProps)
	// 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()
	// Scales in or out to achieve a target CPU utilization.
	// Experimental.
	ScaleOnCpuUtilization(id *string, props *CpuUtilizationScalingProps)
	// Scales in or out to achieve a target memory utilization.
	// Experimental.
	ScaleOnMemoryUtilization(id *string, props *MemoryUtilizationScalingProps)
	// Scales in or out based on a specified metric value.
	// Experimental.
	ScaleOnMetric(id *string, props *awsapplicationautoscaling.BasicStepScalingPolicyProps)
	// Scales in or out to achieve a target Application Load Balancer request count per target.
	// Experimental.
	ScaleOnRequestCount(id *string, props *RequestCountScalingProps)
	// Scales in or out based on a specified scheduled time.
	// Experimental.
	ScaleOnSchedule(id *string, props *awsapplicationautoscaling.ScalingSchedule)
	// Scales in or out to achieve a target on a custom metric.
	// Experimental.
	ScaleToTrackCustomMetric(id *string, props *TrackCustomMetricProps)
	// 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
}

The scalable attribute representing task count.

Example:

var cluster cluster

loadBalancedFargateService := ecsPatterns.NewApplicationLoadBalancedFargateService(this, jsii.String("Service"), &applicationLoadBalancedFargateServiceProps{
	cluster: cluster,
	memoryLimitMiB: jsii.Number(1024),
	desiredCount: jsii.Number(1),
	cpu: jsii.Number(512),
	taskImageOptions: &applicationLoadBalancedTaskImageOptions{
		image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	},
})

scalableTarget := loadBalancedFargateService.service.autoScaleTaskCount(&enableScalingProps{
	minCapacity: jsii.Number(1),
	maxCapacity: jsii.Number(20),
})

scalableTarget.scaleOnCpuUtilization(jsii.String("CpuScaling"), &cpuUtilizationScalingProps{
	targetUtilizationPercent: jsii.Number(50),
})

scalableTarget.scaleOnMemoryUtilization(jsii.String("MemoryScaling"), &memoryUtilizationScalingProps{
	targetUtilizationPercent: jsii.Number(50),
})

Experimental.

func NewScalableTaskCount

func NewScalableTaskCount(scope constructs.Construct, id *string, props *ScalableTaskCountProps) ScalableTaskCount

Constructs a new instance of the ScalableTaskCount class. Experimental.

type ScalableTaskCountProps

type ScalableTaskCountProps struct {
	// Maximum capacity to scale to.
	// Experimental.
	MaxCapacity *float64 `field:"required" json:"maxCapacity" yaml:"maxCapacity"`
	// Minimum capacity to scale to.
	// Experimental.
	MinCapacity *float64 `field:"optional" json:"minCapacity" yaml:"minCapacity"`
	// Scalable dimension of the attribute.
	// Experimental.
	Dimension *string `field:"required" json:"dimension" yaml:"dimension"`
	// Resource ID of the attribute.
	// Experimental.
	ResourceId *string `field:"required" json:"resourceId" yaml:"resourceId"`
	// Role to use for scaling.
	// Experimental.
	Role awsiam.IRole `field:"required" json:"role" yaml:"role"`
	// Service namespace of the scalable attribute.
	// Experimental.
	ServiceNamespace awsapplicationautoscaling.ServiceNamespace `field:"required" json:"serviceNamespace" yaml:"serviceNamespace"`
}

The properties of a scalable attribute representing task count.

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"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

scalableTaskCountProps := &scalableTaskCountProps{
	dimension: jsii.String("dimension"),
	maxCapacity: jsii.Number(123),
	resourceId: jsii.String("resourceId"),
	role: role,
	serviceNamespace: awscdk.Aws_applicationautoscaling.serviceNamespace_ECS,

	// the properties below are optional
	minCapacity: jsii.Number(123),
}

Experimental.

type Scope

type Scope string

The scope for the Docker volume that determines its lifecycle.

Docker volumes that are scoped to a task are automatically provisioned when the task starts and destroyed when the task stops. Docker volumes that are scoped as shared persist after the task stops. Experimental.

const (
	// Docker volumes that are scoped to a task are automatically provisioned when the task starts and destroyed when the task stops.
	// Experimental.
	Scope_TASK Scope = "TASK"
	// Docker volumes that are scoped as shared persist after the task stops.
	// Experimental.
	Scope_SHARED Scope = "SHARED"
)

type ScratchSpace

type ScratchSpace struct {
	// The path on the container to mount the scratch volume at.
	// Experimental.
	ContainerPath *string `field:"required" json:"containerPath" yaml:"containerPath"`
	// The name of the scratch volume to mount.
	//
	// Must be a volume name referenced in the name parameter of task definition volume.
	// Experimental.
	Name *string `field:"required" json:"name" yaml:"name"`
	// Specifies whether to give the container read-only access to the scratch volume.
	//
	// If this value is true, the container has read-only access to the scratch volume.
	// If this value is false, then the container can write to the scratch volume.
	// Experimental.
	ReadOnly *bool `field:"required" json:"readOnly" yaml:"readOnly"`
	// Experimental.
	SourcePath *string `field:"required" json:"sourcePath" yaml:"sourcePath"`
}

The temporary disk space mounted to 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"

scratchSpace := &scratchSpace{
	containerPath: jsii.String("containerPath"),
	name: jsii.String("name"),
	readOnly: jsii.Boolean(false),
	sourcePath: jsii.String("sourcePath"),
}

Experimental.

type Secret

type Secret interface {
	// The ARN of the secret.
	// Experimental.
	Arn() *string
	// Whether this secret uses a specific JSON field.
	// Experimental.
	HasField() *bool
	// Grants reading the secret to a principal.
	// Experimental.
	GrantRead(grantee awsiam.IGrantable) awsiam.Grant
}

A secret environment variable.

Example:

var secret secret
var dbSecret secret
var parameter stringParameter
var taskDefinition taskDefinition
var s3Bucket bucket

newContainer := taskDefinition.addContainer(jsii.String("container"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
	environment: map[string]*string{
		 // clear text, not for sensitive data
		"STAGE": jsii.String("prod"),
	},
	environmentFiles: []environmentFile{
		ecs.*environmentFile.fromAsset(jsii.String("./demo-env-file.env")),
		ecs.*environmentFile.fromBucket(s3Bucket, jsii.String("assets/demo-env-file.env")),
	},
	secrets: map[string]secret{
		 // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store at container start-up.
		"SECRET": ecs.*secret.fromSecretsManager(secret),
		"DB_PASSWORD": ecs.*secret.fromSecretsManager(dbSecret, jsii.String("password")),
		 // Reference a specific JSON field, (requires platform version 1.4.0 or later for Fargate tasks)
		"API_KEY": ecs.*secret.fromSecretsManagerVersion(secret, &SecretVersionInfo{
			"versionId": jsii.String("12345"),
		}, jsii.String("apiKey")),
		 // Reference a specific version of the secret by its version id or version stage (requires platform version 1.4.0 or later for Fargate tasks)
		"PARAMETER": ecs.*secret.fromSsmParameter(parameter),
	},
})
newContainer.addEnvironment(jsii.String("QUEUE_NAME"), jsii.String("MyQueue"))

Experimental.

func Secret_FromSecretsManager

func Secret_FromSecretsManager(secret awssecretsmanager.ISecret, field *string) Secret

Creates a environment variable value from a secret stored in AWS Secrets Manager. Experimental.

func Secret_FromSecretsManagerVersion

func Secret_FromSecretsManagerVersion(secret awssecretsmanager.ISecret, versionInfo *SecretVersionInfo, field *string) Secret

Creates a environment variable value from a secret stored in AWS Secrets Manager. Experimental.

func Secret_FromSsmParameter

func Secret_FromSsmParameter(parameter awsssm.IParameter) Secret

Creates an environment variable value from a parameter stored in AWS Systems Manager Parameter Store. Experimental.

type SecretVersionInfo

type SecretVersionInfo struct {
	// version id of the secret.
	// Experimental.
	VersionId *string `field:"optional" json:"versionId" yaml:"versionId"`
	// version stage of the secret.
	// Experimental.
	VersionStage *string `field:"optional" json:"versionStage" yaml:"versionStage"`
}

Specify the secret's version id or version stage.

Example:

var secret secret
var dbSecret secret
var parameter stringParameter
var taskDefinition taskDefinition
var s3Bucket bucket

newContainer := taskDefinition.addContainer(jsii.String("container"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	memoryLimitMiB: jsii.Number(1024),
	environment: map[string]*string{
		 // clear text, not for sensitive data
		"STAGE": jsii.String("prod"),
	},
	environmentFiles: []environmentFile{
		ecs.*environmentFile.fromAsset(jsii.String("./demo-env-file.env")),
		ecs.*environmentFile.fromBucket(s3Bucket, jsii.String("assets/demo-env-file.env")),
	},
	secrets: map[string]secret{
		 // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store at container start-up.
		"SECRET": ecs.*secret.fromSecretsManager(secret),
		"DB_PASSWORD": ecs.*secret.fromSecretsManager(dbSecret, jsii.String("password")),
		 // Reference a specific JSON field, (requires platform version 1.4.0 or later for Fargate tasks)
		"API_KEY": ecs.*secret.fromSecretsManagerVersion(secret, &SecretVersionInfo{
			"versionId": jsii.String("12345"),
		}, jsii.String("apiKey")),
		 // Reference a specific version of the secret by its version id or version stage (requires platform version 1.4.0 or later for Fargate tasks)
		"PARAMETER": ecs.*secret.fromSsmParameter(parameter),
	},
})
newContainer.addEnvironment(jsii.String("QUEUE_NAME"), jsii.String("MyQueue"))

Experimental.

type SplunkLogDriver

type SplunkLogDriver interface {
	LogDriver
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(_scope awscdk.Construct, _containerDefinition ContainerDefinition) *LogDriverConfig
}

A log driver that sends log information to splunk Logs.

Example:

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

var secret secret
var secretValue secretValue

splunkLogDriver := awscdk.Aws_ecs.NewSplunkLogDriver(&splunkLogDriverProps{
	url: jsii.String("url"),

	// the properties below are optional
	caName: jsii.String("caName"),
	caPath: jsii.String("caPath"),
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	format: awscdk.*Aws_ecs.splunkLogFormat_INLINE,
	gzip: jsii.Boolean(false),
	gzipLevel: jsii.Number(123),
	index: jsii.String("index"),
	insecureSkipVerify: jsii.String("insecureSkipVerify"),
	labels: []*string{
		jsii.String("labels"),
	},
	secretToken: secret,
	source: jsii.String("source"),
	sourceType: jsii.String("sourceType"),
	tag: jsii.String("tag"),
	token: secretValue,
	verifyConnection: jsii.Boolean(false),
})

Experimental.

func NewSplunkLogDriver

func NewSplunkLogDriver(props *SplunkLogDriverProps) SplunkLogDriver

Constructs a new instance of the SplunkLogDriver class. Experimental.

type SplunkLogDriverProps

type SplunkLogDriverProps struct {
	// The env option takes an array of keys.
	//
	// If there is collision between
	// label and env keys, the value of the env takes precedence. Adds additional fields
	// to the extra attributes of a logging message.
	// Experimental.
	Env *[]*string `field:"optional" json:"env" yaml:"env"`
	// The env-regex option is similar to and compatible with env.
	//
	// Its value is a regular
	// expression to match logging-related environment variables. It is used for advanced
	// log tag options.
	// Experimental.
	EnvRegex *string `field:"optional" json:"envRegex" yaml:"envRegex"`
	// The labels option takes an array of keys.
	//
	// If there is collision
	// between label and env keys, the value of the env takes precedence. Adds additional
	// fields to the extra attributes of a logging message.
	// Experimental.
	Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
	// By default, Docker uses the first 12 characters of the container ID to tag log messages.
	//
	// Refer to the log tag option documentation for customizing the
	// log tag format.
	// Experimental.
	Tag *string `field:"optional" json:"tag" yaml:"tag"`
	// Path to your Splunk Enterprise, self-service Splunk Cloud instance, or Splunk Cloud managed cluster (including port and scheme used by HTTP Event Collector) in one of the following formats: https://your_splunk_instance:8088 or https://input-prd-p-XXXXXXX.cloud.splunk.com:8088 or https://http-inputs-XXXXXXXX.splunkcloud.com.
	// Experimental.
	Url *string `field:"required" json:"url" yaml:"url"`
	// Name to use for validating server certificate.
	// Experimental.
	CaName *string `field:"optional" json:"caName" yaml:"caName"`
	// Path to root certificate.
	// Experimental.
	CaPath *string `field:"optional" json:"caPath" yaml:"caPath"`
	// Message format.
	//
	// Can be inline, json or raw.
	// Experimental.
	Format SplunkLogFormat `field:"optional" json:"format" yaml:"format"`
	// Enable/disable gzip compression to send events to Splunk Enterprise or Splunk Cloud instance.
	// Experimental.
	Gzip *bool `field:"optional" json:"gzip" yaml:"gzip"`
	// Set compression level for gzip.
	//
	// Valid values are -1 (default), 0 (no compression),
	// 1 (best speed) ... 9 (best compression).
	// Experimental.
	GzipLevel *float64 `field:"optional" json:"gzipLevel" yaml:"gzipLevel"`
	// Event index.
	// Experimental.
	Index *string `field:"optional" json:"index" yaml:"index"`
	// Ignore server certificate validation.
	// Experimental.
	InsecureSkipVerify *string `field:"optional" json:"insecureSkipVerify" yaml:"insecureSkipVerify"`
	// Splunk HTTP Event Collector token (Secret).
	//
	// The splunk-token is added to the SecretOptions property of the Log Driver Configuration. So the secret value will not be
	// resolved or viewable as plain text.
	//
	// Please provide at least one of `token` or `secretToken`.
	// Experimental.
	SecretToken Secret `field:"optional" json:"secretToken" yaml:"secretToken"`
	// Event source.
	// Experimental.
	Source *string `field:"optional" json:"source" yaml:"source"`
	// Event source type.
	// Experimental.
	SourceType *string `field:"optional" json:"sourceType" yaml:"sourceType"`
	// Splunk HTTP Event Collector token.
	//
	// The splunk-token is added to the Options property of the Log Driver Configuration. So the secret value will be resolved and
	// viewable in plain text in the console.
	//
	// Please provide at least one of `token` or `secretToken`.
	// Deprecated: Use {@link SplunkLogDriverProps.secretToken} instead.
	Token awscdk.SecretValue `field:"optional" json:"token" yaml:"token"`
	// Verify on start, that docker can connect to Splunk server.
	// Experimental.
	VerifyConnection *bool `field:"optional" json:"verifyConnection" yaml:"verifyConnection"`
}

Specifies the splunk log driver configuration options.

[Source](https://docs.docker.com/config/containers/logging/splunk/)

Example:

// Create a Task Definition for the container to start
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("example-image")),
	memoryLimitMiB: jsii.Number(256),
	logging: ecs.logDrivers.splunk(&splunkLogDriverProps{
		token: awscdk.SecretValue.secretsManager(jsii.String("my-splunk-token")),
		url: jsii.String("my-splunk-url"),
	}),
})

Experimental.

type SplunkLogFormat

type SplunkLogFormat string

Log Message Format. Experimental.

const (
	// Experimental.
	SplunkLogFormat_INLINE SplunkLogFormat = "INLINE"
	// Experimental.
	SplunkLogFormat_JSON SplunkLogFormat = "JSON"
	// Experimental.
	SplunkLogFormat_RAW SplunkLogFormat = "RAW"
)

type SyslogLogDriver

type SyslogLogDriver interface {
	LogDriver
	// Called when the log driver is configured on a container.
	// Experimental.
	Bind(_scope awscdk.Construct, _containerDefinition ContainerDefinition) *LogDriverConfig
}

A log driver that sends log information to syslog Logs.

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"

syslogLogDriver := awscdk.Aws_ecs.NewSyslogLogDriver(&syslogLogDriverProps{
	address: jsii.String("address"),
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	facility: jsii.String("facility"),
	format: jsii.String("format"),
	labels: []*string{
		jsii.String("labels"),
	},
	tag: jsii.String("tag"),
	tlsCaCert: jsii.String("tlsCaCert"),
	tlsCert: jsii.String("tlsCert"),
	tlsKey: jsii.String("tlsKey"),
	tlsSkipVerify: jsii.Boolean(false),
})

Experimental.

func NewSyslogLogDriver

func NewSyslogLogDriver(props *SyslogLogDriverProps) SyslogLogDriver

Constructs a new instance of the SyslogLogDriver class. Experimental.

type SyslogLogDriverProps

type SyslogLogDriverProps struct {
	// The env option takes an array of keys.
	//
	// If there is collision between
	// label and env keys, the value of the env takes precedence. Adds additional fields
	// to the extra attributes of a logging message.
	// Experimental.
	Env *[]*string `field:"optional" json:"env" yaml:"env"`
	// The env-regex option is similar to and compatible with env.
	//
	// Its value is a regular
	// expression to match logging-related environment variables. It is used for advanced
	// log tag options.
	// Experimental.
	EnvRegex *string `field:"optional" json:"envRegex" yaml:"envRegex"`
	// The labels option takes an array of keys.
	//
	// If there is collision
	// between label and env keys, the value of the env takes precedence. Adds additional
	// fields to the extra attributes of a logging message.
	// Experimental.
	Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
	// By default, Docker uses the first 12 characters of the container ID to tag log messages.
	//
	// Refer to the log tag option documentation for customizing the
	// log tag format.
	// Experimental.
	Tag *string `field:"optional" json:"tag" yaml:"tag"`
	// The address of an external syslog server.
	//
	// The URI specifier may be
	// [tcp|udp|tcp+tls]://host:port, unix://path, or unixgram://path.
	// Experimental.
	Address *string `field:"optional" json:"address" yaml:"address"`
	// The syslog facility to use.
	//
	// Can be the number or name for any valid
	// syslog facility. See the syslog documentation:
	// https://tools.ietf.org/html/rfc5424#section-6.2.1.
	// Experimental.
	Facility *string `field:"optional" json:"facility" yaml:"facility"`
	// The syslog message format to use.
	//
	// If not specified the local UNIX syslog
	// format is used, without a specified hostname. Specify rfc3164 for the RFC-3164
	// compatible format, rfc5424 for RFC-5424 compatible format, or rfc5424micro
	// for RFC-5424 compatible format with microsecond timestamp resolution.
	// Experimental.
	Format *string `field:"optional" json:"format" yaml:"format"`
	// The absolute path to the trust certificates signed by the CA.
	//
	// Ignored
	// if the address protocol is not tcp+tls.
	// Experimental.
	TlsCaCert *string `field:"optional" json:"tlsCaCert" yaml:"tlsCaCert"`
	// The absolute path to the TLS certificate file.
	//
	// Ignored if the address
	// protocol is not tcp+tls.
	// Experimental.
	TlsCert *string `field:"optional" json:"tlsCert" yaml:"tlsCert"`
	// The absolute path to the TLS key file.
	//
	// Ignored if the address protocol
	// is not tcp+tls.
	// Experimental.
	TlsKey *string `field:"optional" json:"tlsKey" yaml:"tlsKey"`
	// If set to true, TLS verification is skipped when connecting to the syslog daemon.
	//
	// Ignored if the address protocol is not tcp+tls.
	// Experimental.
	TlsSkipVerify *bool `field:"optional" json:"tlsSkipVerify" yaml:"tlsSkipVerify"`
}

Specifies the syslog log driver configuration options.

[Source](https://docs.docker.com/config/containers/logging/syslog/)

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"

syslogLogDriverProps := &syslogLogDriverProps{
	address: jsii.String("address"),
	env: []*string{
		jsii.String("env"),
	},
	envRegex: jsii.String("envRegex"),
	facility: jsii.String("facility"),
	format: jsii.String("format"),
	labels: []*string{
		jsii.String("labels"),
	},
	tag: jsii.String("tag"),
	tlsCaCert: jsii.String("tlsCaCert"),
	tlsCert: jsii.String("tlsCert"),
	tlsKey: jsii.String("tlsKey"),
	tlsSkipVerify: jsii.Boolean(false),
}

Experimental.

type SystemControl

type SystemControl struct {
	// The namespaced kernel parameter for which to set a value.
	// Experimental.
	Namespace *string `field:"required" json:"namespace" yaml:"namespace"`
	// The value for the namespaced kernel parameter specified in namespace.
	// Experimental.
	Value *string `field:"required" json:"value" yaml:"value"`
}

Kernel parameters to set in 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"

systemControl := &systemControl{
	namespace: jsii.String("namespace"),
	value: jsii.String("value"),
}

Experimental.

type TagParameterContainerImage

type TagParameterContainerImage interface {
	ContainerImage
	// Returns the name of the CloudFormation Parameter that represents the tag of the image in the ECR repository.
	// Experimental.
	TagParameterName() *string
	// Returns the value of the CloudFormation Parameter that represents the tag of the image in the ECR repository.
	// Experimental.
	TagParameterValue() *string
	// Called when the image is used by a ContainerDefinition.
	// Experimental.
	Bind(scope awscdk.Construct, containerDefinition ContainerDefinition) *ContainerImageConfig
}

A special type of {@link ContainerImage} that uses an ECR repository for the image, but a CloudFormation Parameter for the tag of the image in that repository.

This allows providing this tag through the Parameter at deploy time, for example in a CodePipeline that pushes a new tag of the image to the repository during a build step, and then provides that new tag through the CloudFormation Parameter in the deploy step.

Example:

/**
 * These are the construction properties for {@link EcsAppStack}.
 * They extend the standard Stack properties,
 * but also require providing the ContainerImage that the service will use.
 * That Image will be provided from the Stack containing the CodePipeline.
 */
type ecsAppStackProps struct {
	stackProps
	image containerImage
}

/**
 * This is the Stack containing a simple ECS Service that uses the provided ContainerImage.
 */
type EcsAppStack struct {
	stack
}

func NewEcsAppStack(scope construct, id *string, props ecsAppStackProps) *EcsAppStack {
	this := &EcsAppStack{}
	cdk.NewStack_Override(this, scope, id, props)

	taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TaskDefinition"), &taskDefinitionProps{
		compatibility: ecs.compatibility_FARGATE,
		cpu: jsii.String("1024"),
		memoryMiB: jsii.String("2048"),
	})
	taskDefinition.addContainer(jsii.String("AppContainer"), &containerDefinitionOptions{
		image: props.image,
	})
	ecs.NewFargateService(this, jsii.String("EcsService"), &fargateServiceProps{
		taskDefinition: taskDefinition,
		cluster: ecs.NewCluster(this, jsii.String("Cluster"), &clusterProps{
			vpc: ec2.NewVpc(this, jsii.String("Vpc"), &vpcProps{
				maxAzs: jsii.Number(1),
			}),
		}),
	})
	return this
}

/**
 * This is the Stack containing the CodePipeline definition that deploys an ECS Service.
 */
type PipelineStack struct {
	stack
	tagParameterContainerImage tagParameterContainerImage
}tagParameterContainerImage tagParameterContainerImage

func NewPipelineStack(scope construct, id *string, props stackProps) *PipelineStack {
	this := &PipelineStack{}
	cdk.NewStack_Override(this, scope, id, props)

	/* ********** ECS part **************** */

	// this is the ECR repository where the built Docker image will be pushed
	appEcrRepo := ecr.NewRepository(this, jsii.String("EcsDeployRepository"))
	// the build that creates the Docker image, and pushes it to the ECR repo
	appCodeDockerBuild := codebuild.NewPipelineProject(this, jsii.String("AppCodeDockerImageBuildAndPushProject"), &pipelineProjectProps{
		environment: &buildEnvironment{
			// we need to run Docker
			privileged: jsii.Boolean(true),
		},
		buildSpec: codebuild.buildSpec.fromObject(map[string]interface{}{
			"version": jsii.String("0.2"),
			"phases": map[string]map[string][]*string{
				"build": map[string][]*string{
					"commands": []*string{
						jsii.String("$(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)"),
						jsii.String("docker build -t $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION ."),
					},
				},
				"post_build": map[string][]*string{
					"commands": []*string{
						jsii.String("docker push $REPOSITORY_URI:$CODEBUILD_RESOLVED_SOURCE_VERSION"),
						jsii.String("export imageTag=$CODEBUILD_RESOLVED_SOURCE_VERSION"),
					},
				},
			},
			"env": map[string][]*string{
				// save the imageTag environment variable as a CodePipeline Variable
				"exported-variables": []*string{
					jsii.String("imageTag"),
				},
			},
		}),
		environmentVariables: map[string]buildEnvironmentVariable{
			"REPOSITORY_URI": &buildEnvironmentVariable{
				"value": appEcrRepo.repositoryUri,
			},
		},
	})
	// needed for `docker push`
	appEcrRepo.grantPullPush(appCodeDockerBuild)
	// create the ContainerImage used for the ECS application Stack
	this.tagParameterContainerImage = ecs.NewTagParameterContainerImage(appEcrRepo)

	cdkCodeBuild := codebuild.NewPipelineProject(this, jsii.String("CdkCodeBuildProject"), &pipelineProjectProps{
		buildSpec: codebuild.*buildSpec.fromObject(map[string]interface{}{
			"version": jsii.String("0.2"),
			"phases": map[string]map[string][]*string{
				"install": map[string][]*string{
					"commands": []*string{
						jsii.String("npm install"),
					},
				},
				"build": map[string][]*string{
					"commands": []*string{
						jsii.String("npx cdk synth --verbose"),
					},
				},
			},
			"artifacts": map[string]*string{
				// store the entire Cloud Assembly as the output artifact
				"base-directory": jsii.String("cdk.out"),
				"files": jsii.String("**/*"),
			},
		}),
	})

	/* ********** Pipeline part **************** */

	appCodeSourceOutput := codepipeline.NewArtifact()
	cdkCodeSourceOutput := codepipeline.NewArtifact()
	cdkCodeBuildOutput := codepipeline.NewArtifact()
	appCodeBuildAction := codepipeline_actions.NewCodeBuildAction(&codeBuildActionProps{
		actionName: jsii.String("AppCodeDockerImageBuildAndPush"),
		project: appCodeDockerBuild,
		input: appCodeSourceOutput,
	})
	codepipeline.NewPipeline(this, jsii.String("CodePipelineDeployingEcsApplication"), &pipelineProps{
		artifactBucket: s3.NewBucket(this, jsii.String("ArtifactBucket"), &bucketProps{
			removalPolicy: cdk.removalPolicy_DESTROY,
		}),
		stages: []stageProps{
			&stageProps{
				stageName: jsii.String("Source"),
				actions: []iAction{
					// this is the Action that takes the source of your application code
					codepipeline_actions.NewCodeCommitSourceAction(&codeCommitSourceActionProps{
						actionName: jsii.String("AppCodeSource"),
						repository: codecommit.NewRepository(this, jsii.String("AppCodeSourceRepository"), &repositoryProps{
							repositoryName: jsii.String("AppCodeSourceRepository"),
						}),
						output: appCodeSourceOutput,
					}),
					// this is the Action that takes the source of your CDK code
					// (which would probably include this Pipeline code as well)
					codepipeline_actions.NewCodeCommitSourceAction(&codeCommitSourceActionProps{
						actionName: jsii.String("CdkCodeSource"),
						repository: codecommit.NewRepository(this, jsii.String("CdkCodeSourceRepository"), &repositoryProps{
							repositoryName: jsii.String("CdkCodeSourceRepository"),
						}),
						output: cdkCodeSourceOutput,
					}),
				},
			},
			&stageProps{
				stageName: jsii.String("Build"),
				actions: []*iAction{
					appCodeBuildAction,
					codepipeline_actions.NewCodeBuildAction(&codeBuildActionProps{
						actionName: jsii.String("CdkCodeBuildAndSynth"),
						project: cdkCodeBuild,
						input: cdkCodeSourceOutput,
						outputs: []artifact{
							cdkCodeBuildOutput,
						},
					}),
				},
			},
			&stageProps{
				stageName: jsii.String("Deploy"),
				actions: []*iAction{
					codepipeline_actions.NewCloudFormationCreateUpdateStackAction(&cloudFormationCreateUpdateStackActionProps{
						actionName: jsii.String("CFN_Deploy"),
						stackName: jsii.String("SampleEcsStackDeployedFromCodePipeline"),
						// this name has to be the same name as used below in the CDK code for the application Stack
						templatePath: cdkCodeBuildOutput.atPath(jsii.String("EcsStackDeployedInPipeline.template.json")),
						adminPermissions: jsii.Boolean(true),
						parameterOverrides: map[string]interface{}{
							// read the tag pushed to the ECR repository from the CodePipeline Variable saved by the application build step,
							// and pass it as the CloudFormation Parameter for the tag
							this.tagParameterContainerImage.tagParameterName: appCodeBuildAction.variable(jsii.String("imageTag")),
						},
					}),
				},
			},
		},
	})
	return this
}

app := cdk.NewApp()

// the CodePipeline Stack needs to be created first
pipelineStack := NewPipelineStack(app, jsii.String("aws-cdk-pipeline-ecs-separate-sources"))
// we supply the image to the ECS application Stack from the CodePipeline Stack
// we supply the image to the ECS application Stack from the CodePipeline Stack
NewEcsAppStack(app, jsii.String("EcsStackDeployedInPipeline"), &ecsAppStackProps{
	image: pipelineStack.tagParameterContainerImage,
})

See: #tagParameterName.

Experimental.

func NewTagParameterContainerImage

func NewTagParameterContainerImage(repository awsecr.IRepository) TagParameterContainerImage

Experimental.

type TaskDefinition

type TaskDefinition interface {
	awscdk.Resource
	ITaskDefinition
	// The task launch type compatibility requirement.
	// Experimental.
	Compatibility() Compatibility
	// The container definitions.
	// Experimental.
	Containers() *[]ContainerDefinition
	// Default container for this task.
	//
	// Load balancers will send traffic to this container. The first
	// essential container that is added to this task will become the default
	// container.
	// Experimental.
	DefaultContainer() ContainerDefinition
	// Experimental.
	SetDefaultContainer(val ContainerDefinition)
	// 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 amount (in GiB) of ephemeral storage to be allocated to the task.
	//
	// Only supported in Fargate platform version 1.4.0 or later.
	// Experimental.
	EphemeralStorageGiB() *float64
	// Execution role for this task definition.
	// Experimental.
	ExecutionRole() awsiam.IRole
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	// Experimental.
	Family() *string
	// Public getter method to access list of inference accelerators attached to the instance.
	// Experimental.
	InferenceAccelerators() *[]*InferenceAccelerator
	// Return true if the task definition can be run on an EC2 cluster.
	// Experimental.
	IsEc2Compatible() *bool
	// Return true if the task definition can be run on a ECS anywhere cluster.
	// Experimental.
	IsExternalCompatible() *bool
	// Return true if the task definition can be run on a Fargate cluster.
	// Experimental.
	IsFargateCompatible() *bool
	// The networking mode to use for the containers in the task.
	// Experimental.
	NetworkMode() NetworkMode
	// 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
	// Whether this task definition has at least a container that references a specific JSON field of a secret stored in Secrets Manager.
	// Experimental.
	ReferencesSecretJsonField() *bool
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// The full Amazon Resource Name (ARN) of the task definition.
	// Experimental.
	TaskDefinitionArn() *string
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole() awsiam.IRole
	// Adds a new container to the task definition.
	// Experimental.
	AddContainer(id *string, props *ContainerDefinitionOptions) ContainerDefinition
	// Adds the specified extension to the task definition.
	//
	// Extension can be used to apply a packaged modification to
	// a task definition.
	// Experimental.
	AddExtension(extension ITaskDefinitionExtension)
	// Adds a firelens log router to the task definition.
	// Experimental.
	AddFirelensLogRouter(id *string, props *FirelensLogRouterDefinitionOptions) FirelensLogRouter
	// Adds an inference accelerator to the task definition.
	// Experimental.
	AddInferenceAccelerator(inferenceAccelerator *InferenceAccelerator)
	// Adds the specified placement constraint to the task definition.
	// Experimental.
	AddPlacementConstraint(constraint PlacementConstraint)
	// Adds a policy statement to the task execution IAM role.
	// Experimental.
	AddToExecutionRolePolicy(statement awsiam.PolicyStatement)
	// Adds a policy statement to the task IAM role.
	// Experimental.
	AddToTaskRolePolicy(statement awsiam.PolicyStatement)
	// Adds a volume to the task definition.
	// Experimental.
	AddVolume(volume *Volume)
	// 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)
	// Returns the container that match the provided containerName.
	// Experimental.
	FindContainer(containerName *string) ContainerDefinition
	// 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
	// Creates the task execution IAM role if it doesn't already exist.
	// Experimental.
	ObtainExecutionRole() awsiam.IRole
	// 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
	// Validates the task definition.
	// Experimental.
	Validate() *[]*string
}

The base class for all task definitions.

Example:

var cluster cluster
var taskDefinition taskDefinition
var vpc vpc

service := ecs.NewFargateService(this, jsii.String("Service"), &fargateServiceProps{
	cluster: cluster,
	taskDefinition: taskDefinition,
})

lb := elbv2.NewApplicationLoadBalancer(this, jsii.String("LB"), &applicationLoadBalancerProps{
	vpc: vpc,
	internetFacing: jsii.Boolean(true),
})
listener := lb.addListener(jsii.String("Listener"), &baseApplicationListenerProps{
	port: jsii.Number(80),
})
service.registerLoadBalancerTargets(&ecsTarget{
	containerName: jsii.String("web"),
	containerPort: jsii.Number(80),
	newTargetGroupId: jsii.String("ECS"),
	listener: ecs.listenerConfig.applicationListener(listener, &addApplicationTargetsProps{
		protocol: elbv2.applicationProtocol_HTTPS,
	}),
})

Experimental.

func NewTaskDefinition

func NewTaskDefinition(scope constructs.Construct, id *string, props *TaskDefinitionProps) TaskDefinition

Constructs a new instance of the TaskDefinition class. Experimental.

type TaskDefinitionAttributes

type TaskDefinitionAttributes struct {
	// The arn of the task definition.
	// Experimental.
	TaskDefinitionArn *string `field:"required" json:"taskDefinitionArn" yaml:"taskDefinitionArn"`
	// The networking mode to use for the containers in the task.
	// Experimental.
	NetworkMode NetworkMode `field:"optional" json:"networkMode" yaml:"networkMode"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
	// What launch types this task definition should be compatible with.
	// Experimental.
	Compatibility Compatibility `field:"optional" json:"compatibility" yaml:"compatibility"`
}

A reference to an existing task 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"
import "github.com/aws/aws-cdk-go/awscdk"

var role role

taskDefinitionAttributes := &taskDefinitionAttributes{
	taskDefinitionArn: jsii.String("taskDefinitionArn"),

	// the properties below are optional
	compatibility: awscdk.Aws_ecs.compatibility_EC2,
	networkMode: awscdk.*Aws_ecs.networkMode_NONE,
	taskRole: role,
}

Experimental.

type TaskDefinitionProps

type TaskDefinitionProps struct {
	// The name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf.
	//
	// The role will be used to retrieve container images from ECR and create CloudWatch log groups.
	// Experimental.
	ExecutionRole awsiam.IRole `field:"optional" json:"executionRole" yaml:"executionRole"`
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	// Experimental.
	Family *string `field:"optional" json:"family" yaml:"family"`
	// The configuration details for the App Mesh proxy.
	// Experimental.
	ProxyConfiguration ProxyConfiguration `field:"optional" json:"proxyConfiguration" yaml:"proxyConfiguration"`
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	// Experimental.
	TaskRole awsiam.IRole `field:"optional" json:"taskRole" yaml:"taskRole"`
	// The list of volume definitions for the task.
	//
	// For more information, see
	// [Task Definition Parameter Volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide//task_definition_parameters.html#volumes).
	// Experimental.
	Volumes *[]*Volume `field:"optional" json:"volumes" yaml:"volumes"`
	// The task launch type compatiblity requirement.
	// Experimental.
	Compatibility Compatibility `field:"required" json:"compatibility" yaml:"compatibility"`
	// The number of cpu units used by the task.
	//
	// If you are using the EC2 launch type, this field is optional and any value can be used.
	// If you are using the Fargate launch type, this field is required and you must use one of the following values,
	// which determines your range of valid values for the memory parameter:
	//
	// 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
	//
	// 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
	//
	// 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
	//
	// 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
	//
	// 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB).
	// Experimental.
	Cpu *string `field:"optional" json:"cpu" yaml:"cpu"`
	// The amount (in GiB) of ephemeral storage to be allocated to the task.
	//
	// Only supported in Fargate platform version 1.4.0 or later.
	// Experimental.
	EphemeralStorageGiB *float64 `field:"optional" json:"ephemeralStorageGiB" yaml:"ephemeralStorageGiB"`
	// The inference accelerators to use for the containers in the task.
	//
	// Not supported in Fargate.
	// Experimental.
	InferenceAccelerators *[]*InferenceAccelerator `field:"optional" json:"inferenceAccelerators" yaml:"inferenceAccelerators"`
	// The IPC resource namespace to use for the containers in the task.
	//
	// Not supported in Fargate and Windows containers.
	// Experimental.
	IpcMode IpcMode `field:"optional" json:"ipcMode" yaml:"ipcMode"`
	// The amount (in MiB) of memory used by the task.
	//
	// If using the EC2 launch type, this field is optional and any value can be used.
	// If using the Fargate launch type, this field is required and you must use one of the following values,
	// which determines your range of valid values for the cpu parameter:
	//
	// 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)
	//
	// 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)
	//
	// 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)
	//
	// Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)
	//
	// Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU).
	// Experimental.
	MemoryMiB *string `field:"optional" json:"memoryMiB" yaml:"memoryMiB"`
	// The networking mode to use for the containers in the task.
	//
	// On Fargate, the only supported networking mode is AwsVpc.
	// Experimental.
	NetworkMode NetworkMode `field:"optional" json:"networkMode" yaml:"networkMode"`
	// The process namespace to use for the containers in the task.
	//
	// Not supported in Fargate and Windows containers.
	// Experimental.
	PidMode PidMode `field:"optional" json:"pidMode" yaml:"pidMode"`
	// The placement constraints to use for tasks in the service.
	//
	// You can specify a maximum of 10 constraints per task (this limit includes
	// constraints in the task definition and those specified at run time).
	//
	// Not supported in Fargate.
	// Experimental.
	PlacementConstraints *[]PlacementConstraint `field:"optional" json:"placementConstraints" yaml:"placementConstraints"`
	// The operating system that your task definitions are running on.
	//
	// A runtimePlatform is supported only for tasks using the Fargate launch type.
	// Experimental.
	RuntimePlatform *RuntimePlatform `field:"optional" json:"runtimePlatform" yaml:"runtimePlatform"`
}

The properties for task definitions.

Example:

vpc := ec2.vpc.fromLookup(this, jsii.String("Vpc"), &vpcLookupOptions{
	isDefault: jsii.Boolean(true),
})

cluster := ecs.NewCluster(this, jsii.String("Ec2Cluster"), &clusterProps{
	vpc: vpc,
})
cluster.addCapacity(jsii.String("DefaultAutoScalingGroup"), &addCapacityOptions{
	instanceType: ec2.NewInstanceType(jsii.String("t2.micro")),
	vpcSubnets: &subnetSelection{
		subnetType: ec2.subnetType_PUBLIC,
	},
})

taskDefinition := ecs.NewTaskDefinition(this, jsii.String("TD"), &taskDefinitionProps{
	compatibility: ecs.compatibility_EC2,
})

taskDefinition.addContainer(jsii.String("TheContainer"), &containerDefinitionOptions{
	image: ecs.containerImage.fromRegistry(jsii.String("foo/bar")),
	memoryLimitMiB: jsii.Number(256),
})

runTask := tasks.NewEcsRunTask(this, jsii.String("Run"), &ecsRunTaskProps{
	integrationPattern: sfn.integrationPattern_RUN_JOB,
	cluster: cluster,
	taskDefinition: taskDefinition,
	launchTarget: tasks.NewEcsEc2LaunchTarget(&ecsEc2LaunchTargetOptions{
		placementStrategies: []placementStrategy{
			ecs.*placementStrategy.spreadAcrossInstances(),
			ecs.*placementStrategy.packedByCpu(),
			ecs.*placementStrategy.randomly(),
		},
		placementConstraints: []placementConstraint{
			ecs.*placementConstraint.memberOf(jsii.String("blieptuut")),
		},
	}),
})

Experimental.

type Tmpfs

type Tmpfs struct {
	// The absolute file path where the tmpfs volume is to be mounted.
	// Experimental.
	ContainerPath *string `field:"required" json:"containerPath" yaml:"containerPath"`
	// The size (in MiB) of the tmpfs volume.
	// Experimental.
	Size *float64 `field:"required" json:"size" yaml:"size"`
	// The list of tmpfs volume mount options.
	//
	// For more information, see
	// [TmpfsMountOptions](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Tmpfs.html).
	// Experimental.
	MountOptions *[]TmpfsMountOption `field:"optional" json:"mountOptions" yaml:"mountOptions"`
}

The details of a tmpfs mount for a 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"

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

	// the properties below are optional
	mountOptions: []tmpfsMountOption{
		awscdk.Aws_ecs.*tmpfsMountOption_DEFAULTS,
	},
}

Experimental.

type TmpfsMountOption

type TmpfsMountOption string

The supported options for a tmpfs mount for a container. Experimental.

const (
	// Experimental.
	TmpfsMountOption_DEFAULTS TmpfsMountOption = "DEFAULTS"
	// Experimental.
	TmpfsMountOption_RO TmpfsMountOption = "RO"
	// Experimental.
	TmpfsMountOption_RW TmpfsMountOption = "RW"
	// Experimental.
	TmpfsMountOption_SUID TmpfsMountOption = "SUID"
	// Experimental.
	TmpfsMountOption_NOSUID TmpfsMountOption = "NOSUID"
	// Experimental.
	TmpfsMountOption_DEV TmpfsMountOption = "DEV"
	// Experimental.
	TmpfsMountOption_NODEV TmpfsMountOption = "NODEV"
	// Experimental.
	TmpfsMountOption_EXEC TmpfsMountOption = "EXEC"
	// Experimental.
	TmpfsMountOption_NOEXEC TmpfsMountOption = "NOEXEC"
	// Experimental.
	TmpfsMountOption_SYNC TmpfsMountOption = "SYNC"
	// Experimental.
	TmpfsMountOption_ASYNC TmpfsMountOption = "ASYNC"
	// Experimental.
	TmpfsMountOption_DIRSYNC TmpfsMountOption = "DIRSYNC"
	// Experimental.
	TmpfsMountOption_REMOUNT TmpfsMountOption = "REMOUNT"
	// Experimental.
	TmpfsMountOption_MAND TmpfsMountOption = "MAND"
	// Experimental.
	TmpfsMountOption_NOMAND TmpfsMountOption = "NOMAND"
	// Experimental.
	TmpfsMountOption_ATIME TmpfsMountOption = "ATIME"
	// Experimental.
	TmpfsMountOption_NOATIME TmpfsMountOption = "NOATIME"
	// Experimental.
	TmpfsMountOption_DIRATIME TmpfsMountOption = "DIRATIME"
	// Experimental.
	TmpfsMountOption_NODIRATIME TmpfsMountOption = "NODIRATIME"
	// Experimental.
	TmpfsMountOption_BIND TmpfsMountOption = "BIND"
	// Experimental.
	TmpfsMountOption_RBIND TmpfsMountOption = "RBIND"
	// Experimental.
	TmpfsMountOption_UNBINDABLE TmpfsMountOption = "UNBINDABLE"
	// Experimental.
	TmpfsMountOption_RUNBINDABLE TmpfsMountOption = "RUNBINDABLE"
	// Experimental.
	TmpfsMountOption_PRIVATE TmpfsMountOption = "PRIVATE"
	// Experimental.
	TmpfsMountOption_RPRIVATE TmpfsMountOption = "RPRIVATE"
	// Experimental.
	TmpfsMountOption_SHARED TmpfsMountOption = "SHARED"
	// Experimental.
	TmpfsMountOption_RSHARED TmpfsMountOption = "RSHARED"
	// Experimental.
	TmpfsMountOption_SLAVE TmpfsMountOption = "SLAVE"
	// Experimental.
	TmpfsMountOption_RSLAVE TmpfsMountOption = "RSLAVE"
	// Experimental.
	TmpfsMountOption_RELATIME TmpfsMountOption = "RELATIME"
	// Experimental.
	TmpfsMountOption_NORELATIME TmpfsMountOption = "NORELATIME"
	// Experimental.
	TmpfsMountOption_STRICTATIME TmpfsMountOption = "STRICTATIME"
	// Experimental.
	TmpfsMountOption_NOSTRICTATIME TmpfsMountOption = "NOSTRICTATIME"
	// Experimental.
	TmpfsMountOption_MODE TmpfsMountOption = "MODE"
	// Experimental.
	TmpfsMountOption_UID TmpfsMountOption = "UID"
	// Experimental.
	TmpfsMountOption_GID TmpfsMountOption = "GID"
	// Experimental.
	TmpfsMountOption_NR_INODES TmpfsMountOption = "NR_INODES"
	// Experimental.
	TmpfsMountOption_NR_BLOCKS TmpfsMountOption = "NR_BLOCKS"
	// Experimental.
	TmpfsMountOption_MPOL TmpfsMountOption = "MPOL"
)

type TrackCustomMetricProps

type TrackCustomMetricProps struct {
	// Indicates whether scale in by the target tracking policy is disabled.
	//
	// If the value is true, scale in is disabled and the target tracking policy
	// won't remove capacity from the scalable resource. Otherwise, scale in is
	// enabled and the target tracking policy can remove capacity from the
	// scalable resource.
	// Experimental.
	DisableScaleIn *bool `field:"optional" json:"disableScaleIn" yaml:"disableScaleIn"`
	// A name for the scaling policy.
	// Experimental.
	PolicyName *string `field:"optional" json:"policyName" yaml:"policyName"`
	// Period after a scale in activity completes before another scale in activity can start.
	// Experimental.
	ScaleInCooldown awscdk.Duration `field:"optional" json:"scaleInCooldown" yaml:"scaleInCooldown"`
	// Period after a scale out activity completes before another scale out activity can start.
	// Experimental.
	ScaleOutCooldown awscdk.Duration `field:"optional" json:"scaleOutCooldown" yaml:"scaleOutCooldown"`
	// The custom CloudWatch metric to track.
	//
	// The metric must represent utilization; that is, you will always get the following behavior:
	//
	// - metric > targetValue => scale out
	// - metric < targetValue => scale in.
	// Experimental.
	Metric awscloudwatch.IMetric `field:"required" json:"metric" yaml:"metric"`
	// The target value for the custom CloudWatch metric.
	// Experimental.
	TargetValue *float64 `field:"required" json:"targetValue" yaml:"targetValue"`
}

The properties for enabling target tracking scaling based on a custom CloudWatch metric.

Example:

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

var duration duration
var metric metric

trackCustomMetricProps := &trackCustomMetricProps{
	metric: metric,
	targetValue: jsii.Number(123),

	// the properties below are optional
	disableScaleIn: jsii.Boolean(false),
	policyName: jsii.String("policyName"),
	scaleInCooldown: duration,
	scaleOutCooldown: duration,
}

Experimental.

type Ulimit

type Ulimit struct {
	// The hard limit for the ulimit type.
	// Experimental.
	HardLimit *float64 `field:"required" json:"hardLimit" yaml:"hardLimit"`
	// The type of the ulimit.
	//
	// For more information, see [UlimitName](https://docs.aws.amazon.com/cdk/api/latest/typescript/api/aws-ecs/ulimitname.html#aws_ecs_UlimitName).
	// Experimental.
	Name UlimitName `field:"required" json:"name" yaml:"name"`
	// The soft limit for the ulimit type.
	// Experimental.
	SoftLimit *float64 `field:"required" json:"softLimit" yaml:"softLimit"`
}

The ulimit settings to pass to the container.

NOTE: Does not work for Windows containers.

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"

ulimit := &ulimit{
	hardLimit: jsii.Number(123),
	name: awscdk.Aws_ecs.ulimitName_CORE,
	softLimit: jsii.Number(123),
}

Experimental.

type UlimitName

type UlimitName string

Type of resource to set a limit on. Experimental.

const (
	// Experimental.
	UlimitName_CORE UlimitName = "CORE"
	// Experimental.
	UlimitName_CPU UlimitName = "CPU"
	// Experimental.
	UlimitName_DATA UlimitName = "DATA"
	// Experimental.
	UlimitName_FSIZE UlimitName = "FSIZE"
	// Experimental.
	UlimitName_LOCKS UlimitName = "LOCKS"
	// Experimental.
	UlimitName_MEMLOCK UlimitName = "MEMLOCK"
	// Experimental.
	UlimitName_MSGQUEUE UlimitName = "MSGQUEUE"
	// Experimental.
	UlimitName_NICE UlimitName = "NICE"
	// Experimental.
	UlimitName_NOFILE UlimitName = "NOFILE"
	// Experimental.
	UlimitName_NPROC UlimitName = "NPROC"
	// Experimental.
	UlimitName_RSS UlimitName = "RSS"
	// Experimental.
	UlimitName_RTPRIO UlimitName = "RTPRIO"
	// Experimental.
	UlimitName_RTTIME UlimitName = "RTTIME"
	// Experimental.
	UlimitName_SIGPENDING UlimitName = "SIGPENDING"
	// Experimental.
	UlimitName_STACK UlimitName = "STACK"
)

type Volume

type Volume struct {
	// The name of the volume.
	//
	// Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed.
	// This name is referenced in the sourceVolume parameter of container definition mountPoints.
	// Experimental.
	Name *string `field:"required" json:"name" yaml:"name"`
	// This property is specified when you are using Docker volumes.
	//
	// Docker volumes are only supported when you are using the EC2 launch type.
	// Windows containers only support the use of the local driver.
	// To use bind mounts, specify a host instead.
	// Experimental.
	DockerVolumeConfiguration *DockerVolumeConfiguration `field:"optional" json:"dockerVolumeConfiguration" yaml:"dockerVolumeConfiguration"`
	// This property is specified when you are using Amazon EFS.
	//
	// When specifying Amazon EFS volumes in tasks using the Fargate launch type,
	// Fargate creates a supervisor container that is responsible for managing the Amazon EFS volume.
	// The supervisor container uses a small amount of the task's memory.
	// The supervisor container is visible when querying the task metadata version 4 endpoint,
	// but is not visible in CloudWatch Container Insights.
	// Experimental.
	EfsVolumeConfiguration *EfsVolumeConfiguration `field:"optional" json:"efsVolumeConfiguration" yaml:"efsVolumeConfiguration"`
	// This property is specified when you are using bind mount host volumes.
	//
	// Bind mount host volumes are supported when you are using either the EC2 or Fargate launch types.
	// The contents of the host parameter determine whether your bind mount host 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 is not guaranteed to persist
	// after the containers associated with it stop running.
	// Experimental.
	Host *Host `field:"optional" json:"host" yaml:"host"`
}

A data volume used in a task definition.

For tasks that use a Docker volume, specify a DockerVolumeConfiguration. For tasks that use a bind mount host volume, specify a host and optional sourcePath.

For more information, see [Using Data Volumes in Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html).

Example:

fargateTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("TaskDef"), &fargateTaskDefinitionProps{
	memoryLimitMiB: jsii.Number(512),
	cpu: jsii.Number(256),
})
volume := map[string]interface{}{
	// Use an Elastic FileSystem
	"name": jsii.String("mydatavolume"),
	"efsVolumeConfiguration": map[string]*string{
		"fileSystemId": jsii.String("EFS"),
	},
}

container := fargateTaskDefinition.addVolume(volume)

Experimental.

type VolumeFrom

type VolumeFrom struct {
	// Specifies whether the container has read-only access to the volume.
	//
	// If this value is true, the container has read-only access to the volume.
	// If this value is false, then the container can write to the volume.
	// Experimental.
	ReadOnly *bool `field:"required" json:"readOnly" yaml:"readOnly"`
	// The name of another container within the same task definition from which to mount volumes.
	// Experimental.
	SourceContainer *string `field:"required" json:"sourceContainer" yaml:"sourceContainer"`
}

The details on a data volume from another container in the same task 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"

volumeFrom := &volumeFrom{
	readOnly: jsii.Boolean(false),
	sourceContainer: jsii.String("sourceContainer"),
}

Experimental.

type WindowsOptimizedVersion

type WindowsOptimizedVersion string

ECS-optimized Windows version list. Experimental.

const (
	// Experimental.
	WindowsOptimizedVersion_SERVER_2019 WindowsOptimizedVersion = "SERVER_2019"
	// Experimental.
	WindowsOptimizedVersion_SERVER_2016 WindowsOptimizedVersion = "SERVER_2016"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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