Interface CommonTaskDefinitionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
Ec2TaskDefinitionProps,ExternalTaskDefinitionProps,FargateTaskDefinitionProps,TaskDefinitionProps
- All Known Implementing Classes:
CommonTaskDefinitionProps.Jsii$Proxy,Ec2TaskDefinitionProps.Jsii$Proxy,ExternalTaskDefinitionProps.Jsii$Proxy,FargateTaskDefinitionProps.Jsii$Proxy,TaskDefinitionProps.Jsii$Proxy
For more information, see Task Definition Parameters.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;
import software.amazon.awscdk.services.iam.*;
ProxyConfiguration proxyConfiguration;
Role role;
CommonTaskDefinitionProps commonTaskDefinitionProps = CommonTaskDefinitionProps.builder()
.enableFaultInjection(false)
.executionRole(role)
.family("family")
.proxyConfiguration(proxyConfiguration)
.taskRole(role)
.volumes(List.of(Volume.builder()
.name("name")
// the properties below are optional
.configuredAtLaunch(false)
.dockerVolumeConfiguration(DockerVolumeConfiguration.builder()
.driver("driver")
.scope(Scope.TASK)
// the properties below are optional
.autoprovision(false)
.driverOpts(Map.of(
"driverOptsKey", "driverOpts"))
.labels(Map.of(
"labelsKey", "labels"))
.build())
.efsVolumeConfiguration(EfsVolumeConfiguration.builder()
.fileSystemId("fileSystemId")
// the properties below are optional
.authorizationConfig(AuthorizationConfig.builder()
.accessPointId("accessPointId")
.iam("iam")
.build())
.rootDirectory("rootDirectory")
.transitEncryption("transitEncryption")
.transitEncryptionPort(123)
.build())
.host(Host.builder()
.sourcePath("sourcePath")
.build())
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCommonTaskDefinitionPropsstatic final classAn implementation forCommonTaskDefinitionProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanEnables fault injection and allows for fault injection requests to be accepted from the task's containers.default IRoleThe name of the IAM task execution role that grants the ECS agent permission to call AWS APIs on your behalf.default StringThe name of a family that this task definition is registered to.default ProxyConfigurationThe configuration details for the App Mesh proxy.default IRoleThe name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.The list of volume definitions for the task.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEnableFaultInjection
Enables fault injection and allows for fault injection requests to be accepted from the task's containers.Fault injection only works with tasks using the
orinvalid reference
NetworkMode.AWS_VPCnetwork modes.invalid reference
NetworkMode.HOSTDefault: undefined - ECS default setting is false
-
getExecutionRole
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.
Default: - An execution role will be automatically created if you use ECR images in your task definition.
-
getFamily
The name of a family that this task definition is registered to.A family groups multiple versions of a task definition.
Default: - Automatically generated name.
-
getProxyConfiguration
The configuration details for the App Mesh proxy.Default: - No proxy configuration.
-
getTaskRole
The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.Default: - A task role is automatically created for you.
-
getVolumes
The list of volume definitions for the task.For more information, see Task Definition Parameter Volumes.
Default: - No volumes are passed to the Docker daemon on a container instance.
-
builder
- Returns:
- a
CommonTaskDefinitionProps.BuilderofCommonTaskDefinitionProps
-