@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:01:06.827Z") @Stability(value=Experimental) public class TaskDefinition extends Resource implements ITaskDefinition
| Modifier and Type | Class and Description |
|---|---|
static class |
TaskDefinition.Builder
(experimental) A fluent builder for
TaskDefinition. |
software.amazon.jsii.JsiiObject.InitializationModeITaskDefinition.Jsii$Default, ITaskDefinition.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
TaskDefinition(software.constructs.Construct scope,
String id,
TaskDefinitionProps props)
(experimental) Constructs a new instance of the TaskDefinition class.
|
protected |
TaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
TaskDefinition(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
ContainerDefinition |
addContainer(String id,
ContainerDefinitionOptions props)
(experimental) Adds a new container to the task definition.
|
void |
addExtension(ITaskDefinitionExtension extension)
(experimental) Adds the specified extention to the task definition.
|
FirelensLogRouter |
addFirelensLogRouter(String id,
FirelensLogRouterDefinitionOptions props)
(experimental) Adds a firelens log router to the task definition.
|
void |
addInferenceAccelerator(InferenceAccelerator inferenceAccelerator)
(experimental) Adds an inference accelerator to the task definition.
|
void |
addPlacementConstraint(PlacementConstraint constraint)
(experimental) Adds the specified placement constraint to the task definition.
|
void |
addToExecutionRolePolicy(PolicyStatement statement)
(experimental) Adds a policy statement to the task execution IAM role.
|
void |
addToTaskRolePolicy(PolicyStatement statement)
(experimental) Adds a policy statement to the task IAM role.
|
void |
addVolume(Volume volume)
(experimental) Adds a volume to the task definition.
|
static ITaskDefinition |
fromTaskDefinitionArn(software.constructs.Construct scope,
String id,
String taskDefinitionArn)
(experimental) Imports a task definition from the specified task definition ARN.
|
static ITaskDefinition |
fromTaskDefinitionAttributes(software.constructs.Construct scope,
String id,
TaskDefinitionAttributes attrs)
(experimental) Create a task definition from a task definition reference.
|
Compatibility |
getCompatibility()
(experimental) The task launch type compatibility requirement.
|
protected List<ContainerDefinition> |
getContainers()
(experimental) The container definitions.
|
ContainerDefinition |
getDefaultContainer()
(experimental) Default container for this task.
|
IRole |
getExecutionRole()
(experimental) Execution role for this task definition.
|
String |
getFamily()
(experimental) The name of a family that this task definition is registered to.
|
List<InferenceAccelerator> |
getInferenceAccelerators()
(experimental) Public getter method to access list of inference accelerators attached to the instance.
|
Boolean |
getIsEc2Compatible()
(experimental) Return true if the task definition can be run on an EC2 cluster.
|
Boolean |
getIsExternalCompatible()
(experimental) Return true if the task definition can be run on a ECS anywhere cluster.
|
Boolean |
getIsFargateCompatible()
(experimental) Return true if the task definition can be run on a Fargate cluster.
|
NetworkMode |
getNetworkMode()
(experimental) The networking mode to use for the containers in the task.
|
Boolean |
getReferencesSecretJsonField()
(experimental) Whether this task definition has at least a container that references a specific JSON field of a secret stored in Secrets Manager.
|
String |
getTaskDefinitionArn()
(experimental) The full Amazon Resource Name (ARN) of the task definition.
|
IRole |
getTaskRole()
(experimental) The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
|
IRole |
obtainExecutionRole()
(experimental) Creates the task execution IAM role if it doesn't already exist.
|
void |
setDefaultContainer(ContainerDefinition value)
(experimental) Default container for this task.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected TaskDefinition(software.amazon.jsii.JsiiObjectRef objRef)
protected TaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public TaskDefinition(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
TaskDefinitionProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static ITaskDefinition fromTaskDefinitionArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String taskDefinitionArn)
The task will have a compatibility of EC2+Fargate.
scope - This parameter is required.id - This parameter is required.taskDefinitionArn - This parameter is required.@Stability(value=Experimental) @NotNull public static ITaskDefinition fromTaskDefinitionAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TaskDefinitionAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Experimental) @NotNull public ContainerDefinition addContainer(@NotNull String id, @NotNull ContainerDefinitionOptions props)
id - This parameter is required.props - This parameter is required.@Stability(value=Experimental)
public void addExtension(@NotNull
ITaskDefinitionExtension extension)
Extension can be used to apply a packaged modification to a task definition.
extension - This parameter is required.@Stability(value=Experimental) @NotNull public FirelensLogRouter addFirelensLogRouter(@NotNull String id, @NotNull FirelensLogRouterDefinitionOptions props)
id - This parameter is required.props - This parameter is required.@Stability(value=Experimental)
public void addInferenceAccelerator(@NotNull
InferenceAccelerator inferenceAccelerator)
inferenceAccelerator - This parameter is required.@Stability(value=Experimental)
public void addPlacementConstraint(@NotNull
PlacementConstraint constraint)
constraint - This parameter is required.@Stability(value=Experimental)
public void addToExecutionRolePolicy(@NotNull
PolicyStatement statement)
statement - This parameter is required.@Stability(value=Experimental)
public void addToTaskRolePolicy(@NotNull
PolicyStatement statement)
statement - This parameter is required.@Stability(value=Experimental)
public void addVolume(@NotNull
Volume volume)
volume - This parameter is required.@Stability(value=Experimental) @NotNull public IRole obtainExecutionRole()
@Stability(value=Experimental) @NotNull public Compatibility getCompatibility()
getCompatibility in interface ITaskDefinition@Stability(value=Experimental) @NotNull protected List<ContainerDefinition> getContainers()
@Stability(value=Experimental) @NotNull public String getFamily()
A family groups multiple versions of a task definition.
@Stability(value=Experimental) @NotNull public List<InferenceAccelerator> getInferenceAccelerators()
@Stability(value=Experimental) @NotNull public Boolean getIsEc2Compatible()
getIsEc2Compatible in interface ITaskDefinition@Stability(value=Experimental) @NotNull public Boolean getIsExternalCompatible()
getIsExternalCompatible in interface ITaskDefinition@Stability(value=Experimental) @NotNull public Boolean getIsFargateCompatible()
getIsFargateCompatible in interface ITaskDefinition@Stability(value=Experimental) @NotNull public NetworkMode getNetworkMode()
getNetworkMode in interface ITaskDefinition@Stability(value=Experimental) @NotNull public String getTaskDefinitionArn()
getTaskDefinitionArn in interface ITaskDefinition@Stability(value=Experimental) @NotNull public IRole getTaskRole()
getTaskRole in interface ITaskDefinition@Stability(value=Experimental) @Nullable public IRole getExecutionRole()
getExecutionRole in interface ITaskDefinition@Stability(value=Experimental) @Nullable public Boolean getReferencesSecretJsonField()
@Stability(value=Experimental) @Nullable public ContainerDefinition getDefaultContainer()
Load balancers will send traffic to this container. The first essential container that is added to this task will become the default container.
@Stability(value=Experimental)
public void setDefaultContainer(@Nullable
ContainerDefinition value)
Load balancers will send traffic to this container. The first essential container that is added to this task will become the default container.
Copyright © 2021. All rights reserved.