@Generated(value="jsii-pacmak/1.47.0 (build 86d2c33)", date="2021-12-15T10:03:47.632Z") @Stability(value=Stable) public class CfnTaskDefinition extends CfnResource implements IInspectable
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.*;
CfnTaskDefinition cfnTaskDefinition = CfnTaskDefinition.Builder.create(this, "MyCfnTaskDefinition")
.containerDefinitions(List.of(ContainerDefinitionProperty.builder()
.command(List.of("command"))
.cpu(123)
.dependsOn(List.of(ContainerDependencyProperty.builder()
.condition("condition")
.containerName("containerName")
.build()))
.disableNetworking(false)
.dnsSearchDomains(List.of("dnsSearchDomains"))
.dnsServers(List.of("dnsServers"))
.dockerLabels(Map.of(
"dockerLabelsKey", "dockerLabels"))
.dockerSecurityOptions(List.of("dockerSecurityOptions"))
.entryPoint(List.of("entryPoint"))
.environment(List.of(KeyValuePairProperty.builder()
.name("name")
.value("value")
.build()))
.environmentFiles(List.of(EnvironmentFileProperty.builder()
.type("type")
.value("value")
.build()))
.essential(false)
.extraHosts(List.of(HostEntryProperty.builder()
.hostname("hostname")
.ipAddress("ipAddress")
.build()))
.firelensConfiguration(FirelensConfigurationProperty.builder()
.options(Map.of(
"optionsKey", "options"))
.type("type")
.build())
.healthCheck(HealthCheckProperty.builder()
.command(List.of("command"))
.interval(123)
.retries(123)
.startPeriod(123)
.timeout(123)
.build())
.hostname("hostname")
.image("image")
.interactive(false)
.links(List.of("links"))
.linuxParameters(LinuxParametersProperty.builder()
.capabilities(KernelCapabilitiesProperty.builder()
.add(List.of("add"))
.drop(List.of("drop"))
.build())
.devices(List.of(DeviceProperty.builder()
.containerPath("containerPath")
.hostPath("hostPath")
.permissions(List.of("permissions"))
.build()))
.initProcessEnabled(false)
.maxSwap(123)
.sharedMemorySize(123)
.swappiness(123)
.tmpfs(List.of(TmpfsProperty.builder()
.size(123)
// the properties below are optional
.containerPath("containerPath")
.mountOptions(List.of("mountOptions"))
.build()))
.build())
.logConfiguration(LogConfigurationProperty.builder()
.logDriver("logDriver")
// the properties below are optional
.options(Map.of(
"optionsKey", "options"))
.secretOptions(List.of(SecretProperty.builder()
.name("name")
.valueFrom("valueFrom")
.build()))
.build())
.memory(123)
.memoryReservation(123)
.mountPoints(List.of(MountPointProperty.builder()
.containerPath("containerPath")
.readOnly(false)
.sourceVolume("sourceVolume")
.build()))
.name("name")
.portMappings(List.of(PortMappingProperty.builder()
.containerPort(123)
.hostPort(123)
.protocol("protocol")
.build()))
.privileged(false)
.pseudoTerminal(false)
.readonlyRootFilesystem(false)
.repositoryCredentials(RepositoryCredentialsProperty.builder()
.credentialsParameter("credentialsParameter")
.build())
.resourceRequirements(List.of(ResourceRequirementProperty.builder()
.type("type")
.value("value")
.build()))
.secrets(List.of(SecretProperty.builder()
.name("name")
.valueFrom("valueFrom")
.build()))
.startTimeout(123)
.stopTimeout(123)
.systemControls(List.of(SystemControlProperty.builder()
.namespace("namespace")
.value("value")
.build()))
.ulimits(List.of(UlimitProperty.builder()
.hardLimit(123)
.name("name")
.softLimit(123)
.build()))
.user("user")
.volumesFrom(List.of(VolumeFromProperty.builder()
.readOnly(false)
.sourceContainer("sourceContainer")
.build()))
.workingDirectory("workingDirectory")
.build()))
.cpu("cpu")
.ephemeralStorage(EphemeralStorageProperty.builder()
.sizeInGiB(123)
.build())
.executionRoleArn("executionRoleArn")
.family("family")
.inferenceAccelerators(List.of(InferenceAcceleratorProperty.builder()
.deviceName("deviceName")
.deviceType("deviceType")
.build()))
.ipcMode("ipcMode")
.memory("memory")
.networkMode("networkMode")
.pidMode("pidMode")
.placementConstraints(List.of(TaskDefinitionPlacementConstraintProperty.builder()
.type("type")
// the properties below are optional
.expression("expression")
.build()))
.proxyConfiguration(ProxyConfigurationProperty.builder()
.containerName("containerName")
// the properties below are optional
.proxyConfigurationProperties(List.of(KeyValuePairProperty.builder()
.name("name")
.value("value")
.build()))
.type("type")
.build())
.requiresCompatibilities(List.of("requiresCompatibilities"))
.runtimePlatform(RuntimePlatformProperty.builder()
.cpuArchitecture("cpuArchitecture")
.operatingSystemFamily("operatingSystemFamily")
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.taskRoleArn("taskRoleArn")
.volumes(List.of(VolumeProperty.builder()
.dockerVolumeConfiguration(DockerVolumeConfigurationProperty.builder()
.autoprovision(false)
.driver("driver")
.driverOpts(Map.of(
"driverOptsKey", "driverOpts"))
.labels(Map.of(
"labelsKey", "labels"))
.scope("scope")
.build())
.efsVolumeConfiguration(EfsVolumeConfigurationProperty.builder()
.fileSystemId("fileSystemId")
// the properties below are optional
.authorizationConfig(AuthorizationConfigProperty.builder()
.accessPointId("accessPointId")
.iam("iam")
.build())
.rootDirectory("rootDirectory")
.transitEncryption("transitEncryption")
.transitEncryptionPort(123)
.build())
.host(HostVolumePropertiesProperty.builder()
.sourcePath("sourcePath")
.build())
.name("name")
.build()))
.build();
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnTaskDefinition(Construct scope,
String id)
Create a new `AWS::ECS::TaskDefinition`.
|
|
CfnTaskDefinition(Construct scope,
String id,
CfnTaskDefinitionProps props)
Create a new `AWS::ECS::TaskDefinition`.
|
protected |
CfnTaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTaskDefinition(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrTaskDefinitionArn() |
protected Map<String,Object> |
getCfnProperties() |
Object |
getContainerDefinitions()
`AWS::ECS::TaskDefinition.ContainerDefinitions`.
|
String |
getCpu()
`AWS::ECS::TaskDefinition.Cpu`.
|
Object |
getEphemeralStorage()
`AWS::ECS::TaskDefinition.EphemeralStorage`.
|
String |
getExecutionRoleArn()
`AWS::ECS::TaskDefinition.ExecutionRoleArn`.
|
String |
getFamily()
`AWS::ECS::TaskDefinition.Family`.
|
Object |
getInferenceAccelerators()
`AWS::ECS::TaskDefinition.InferenceAccelerators`.
|
String |
getIpcMode()
`AWS::ECS::TaskDefinition.IpcMode`.
|
String |
getMemory()
`AWS::ECS::TaskDefinition.Memory`.
|
String |
getNetworkMode()
`AWS::ECS::TaskDefinition.NetworkMode`.
|
String |
getPidMode()
`AWS::ECS::TaskDefinition.PidMode`.
|
Object |
getPlacementConstraints()
`AWS::ECS::TaskDefinition.PlacementConstraints`.
|
Object |
getProxyConfiguration()
`AWS::ECS::TaskDefinition.ProxyConfiguration`.
|
List<String> |
getRequiresCompatibilities()
`AWS::ECS::TaskDefinition.RequiresCompatibilities`.
|
Object |
getRuntimePlatform()
`AWS::ECS::TaskDefinition.RuntimePlatform`.
|
TagManager |
getTags()
`AWS::ECS::TaskDefinition.Tags`.
|
String |
getTaskRoleArn()
`AWS::ECS::TaskDefinition.TaskRoleArn`.
|
Object |
getVolumes()
`AWS::ECS::TaskDefinition.Volumes`.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setContainerDefinitions(IResolvable value)
`AWS::ECS::TaskDefinition.ContainerDefinitions`.
|
void |
setContainerDefinitions(List<Object> value)
`AWS::ECS::TaskDefinition.ContainerDefinitions`.
|
void |
setCpu(String value)
`AWS::ECS::TaskDefinition.Cpu`.
|
void |
setEphemeralStorage(CfnTaskDefinition.EphemeralStorageProperty value)
`AWS::ECS::TaskDefinition.EphemeralStorage`.
|
void |
setEphemeralStorage(IResolvable value)
`AWS::ECS::TaskDefinition.EphemeralStorage`.
|
void |
setExecutionRoleArn(String value)
`AWS::ECS::TaskDefinition.ExecutionRoleArn`.
|
void |
setFamily(String value)
`AWS::ECS::TaskDefinition.Family`.
|
void |
setInferenceAccelerators(IResolvable value)
`AWS::ECS::TaskDefinition.InferenceAccelerators`.
|
void |
setInferenceAccelerators(List<Object> value)
`AWS::ECS::TaskDefinition.InferenceAccelerators`.
|
void |
setIpcMode(String value)
`AWS::ECS::TaskDefinition.IpcMode`.
|
void |
setMemory(String value)
`AWS::ECS::TaskDefinition.Memory`.
|
void |
setNetworkMode(String value)
`AWS::ECS::TaskDefinition.NetworkMode`.
|
void |
setPidMode(String value)
`AWS::ECS::TaskDefinition.PidMode`.
|
void |
setPlacementConstraints(IResolvable value)
`AWS::ECS::TaskDefinition.PlacementConstraints`.
|
void |
setPlacementConstraints(List<Object> value)
`AWS::ECS::TaskDefinition.PlacementConstraints`.
|
void |
setProxyConfiguration(CfnTaskDefinition.ProxyConfigurationProperty value)
`AWS::ECS::TaskDefinition.ProxyConfiguration`.
|
void |
setProxyConfiguration(IResolvable value)
`AWS::ECS::TaskDefinition.ProxyConfiguration`.
|
void |
setRequiresCompatibilities(List<String> value)
`AWS::ECS::TaskDefinition.RequiresCompatibilities`.
|
void |
setRuntimePlatform(CfnTaskDefinition.RuntimePlatformProperty value)
`AWS::ECS::TaskDefinition.RuntimePlatform`.
|
void |
setRuntimePlatform(IResolvable value)
`AWS::ECS::TaskDefinition.RuntimePlatform`.
|
void |
setTaskRoleArn(String value)
`AWS::ECS::TaskDefinition.TaskRoleArn`.
|
void |
setVolumes(IResolvable value)
`AWS::ECS::TaskDefinition.Volumes`.
|
void |
setVolumes(List<Object> value)
`AWS::ECS::TaskDefinition.Volumes`.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnTaskDefinition(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnTaskDefinition(@NotNull
Construct scope,
@NotNull
String id,
@Nullable
CfnTaskDefinitionProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties.@Stability(value=Stable)
public CfnTaskDefinition(@NotNull
Construct scope,
@NotNull
String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrTaskDefinitionArn()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @Nullable public Object getContainerDefinitions()
@Stability(value=Stable)
public void setContainerDefinitions(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setContainerDefinitions(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public String getCpu()
@Stability(value=Stable)
public void setCpu(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getEphemeralStorage()
@Stability(value=Stable)
public void setEphemeralStorage(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setEphemeralStorage(@Nullable
CfnTaskDefinition.EphemeralStorageProperty value)
@Stability(value=Stable) @Nullable public String getExecutionRoleArn()
@Stability(value=Stable)
public void setExecutionRoleArn(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getFamily()
@Stability(value=Stable)
public void setFamily(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getInferenceAccelerators()
@Stability(value=Stable)
public void setInferenceAccelerators(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setInferenceAccelerators(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public String getIpcMode()
@Stability(value=Stable)
public void setIpcMode(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getMemory()
@Stability(value=Stable)
public void setMemory(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getNetworkMode()
@Stability(value=Stable)
public void setNetworkMode(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getPidMode()
@Stability(value=Stable)
public void setPidMode(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getPlacementConstraints()
@Stability(value=Stable)
public void setPlacementConstraints(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setPlacementConstraints(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public Object getProxyConfiguration()
@Stability(value=Stable)
public void setProxyConfiguration(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setProxyConfiguration(@Nullable
CfnTaskDefinition.ProxyConfigurationProperty value)
@Stability(value=Stable) @Nullable public List<String> getRequiresCompatibilities()
@Stability(value=Stable)
public void setRequiresCompatibilities(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public Object getRuntimePlatform()
@Stability(value=Stable)
public void setRuntimePlatform(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setRuntimePlatform(@Nullable
CfnTaskDefinition.RuntimePlatformProperty value)
@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @Nullable public String getTaskRoleArn()
@Stability(value=Stable)
public void setTaskRoleArn(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getVolumes()
@Stability(value=Stable)
public void setVolumes(@Nullable
IResolvable value)
Copyright © 2021. All rights reserved.