@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.694Z") @Stability(value=Stable) public class Ec2TaskDefinition extends TaskDefinition implements IEc2TaskDefinition
Example:
// Example automatically generated from non-compiling source. May contain errors.
Secret secret;
// Create a Task Definition for the container to start
Ec2TaskDefinition taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder()
.image(ContainerImage.fromRegistry("example-image"))
.memoryLimitMiB(256)
.logging(LogDrivers.splunk(SplunkLogDriverProps.builder()
.secretToken(secret)
.url("my-splunk-url")
.build()))
.build());
| Modifier and Type | Class and Description |
|---|---|
static class |
Ec2TaskDefinition.Builder
A fluent builder for
Ec2TaskDefinition. |
software.amazon.jsii.JsiiObject.InitializationModeIEc2TaskDefinition.Jsii$Default, IEc2TaskDefinition.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
Ec2TaskDefinition(software.constructs.Construct scope,
String id)
Constructs a new instance of the Ec2TaskDefinition class.
|
|
Ec2TaskDefinition(software.constructs.Construct scope,
String id,
Ec2TaskDefinitionProps props)
Constructs a new instance of the Ec2TaskDefinition class.
|
protected |
Ec2TaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Ec2TaskDefinition(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IEc2TaskDefinition |
fromEc2TaskDefinitionArn(software.constructs.Construct scope,
String id,
String ec2TaskDefinitionArn)
Imports a task definition from the specified task definition ARN.
|
static IEc2TaskDefinition |
fromEc2TaskDefinitionAttributes(software.constructs.Construct scope,
String id,
Ec2TaskDefinitionAttributes attrs)
Imports an existing Ec2 task definition from its attributes.
|
addContainer, addExtension, addFirelensLogRouter, addInferenceAccelerator, addPlacementConstraint, addToExecutionRolePolicy, addToTaskRolePolicy, addVolume, findContainer, fromTaskDefinitionArn, fromTaskDefinitionAttributes, getCompatibility, getContainers, getDefaultContainer, getEphemeralStorageGiB, getExecutionRole, getFamily, getInferenceAccelerators, getIsEc2Compatible, getIsExternalCompatible, getIsFargateCompatible, getNetworkMode, getReferencesSecretJsonField, getTaskDefinitionArn, getTaskRole, grantRun, obtainExecutionRole, setDefaultContainerapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCompatibility, getExecutionRole, getIsEc2Compatible, getIsExternalCompatible, getIsFargateCompatible, getNetworkMode, getTaskDefinitionArn, getTaskRoleapplyRemovalPolicy, getEnv, getStackprotected Ec2TaskDefinition(software.amazon.jsii.JsiiObjectRef objRef)
protected Ec2TaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public Ec2TaskDefinition(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
Ec2TaskDefinitionProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public Ec2TaskDefinition(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public static IEc2TaskDefinition fromEc2TaskDefinitionArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String ec2TaskDefinitionArn)
scope - This parameter is required.id - This parameter is required.ec2TaskDefinitionArn - This parameter is required.@Stability(value=Stable) @NotNull public static IEc2TaskDefinition fromEc2TaskDefinitionAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull Ec2TaskDefinitionAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.Copyright © 2022. All rights reserved.