PipeTargetEcsTaskParametersProperty Struct
The parameters for using an Amazon ECS task as a target.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_pipes as pipes } from 'aws-cdk-lib';
const pipeTargetEcsTaskParametersProperty: pipes.CfnPipe.PipeTargetEcsTaskParametersProperty = {
taskDefinitionArn: 'taskDefinitionArn',
// the properties below are optional
capacityProviderStrategy: [{
capacityProvider: 'capacityProvider',
// the properties below are optional
base: 123,
weight: 123,
}],
enableEcsManagedTags: false,
enableExecuteCommand: false,
group: 'group',
launchType: 'launchType',
networkConfiguration: {
awsvpcConfiguration: {
subnets: ['subnets'],
// the properties below are optional
assignPublicIp: 'assignPublicIp',
securityGroups: ['securityGroups'],
},
},
overrides: {
containerOverrides: [{
command: ['command'],
cpu: 123,
environment: [{
name: 'name',
value: 'value',
}],
environmentFiles: [{
type: 'type',
value: 'value',
}],
memory: 123,
memoryReservation: 123,
name: 'name',
resourceRequirements: [{
type: 'type',
value: 'value',
}],
}],
cpu: 'cpu',
ephemeralStorage: {
sizeInGiB: 123,
},
executionRoleArn: 'executionRoleArn',
inferenceAcceleratorOverrides: [{
deviceName: 'deviceName',
deviceType: 'deviceType',
}],
memory: 'memory',
taskRoleArn: 'taskRoleArn',
},
placementConstraints: [{
expression: 'expression',
type: 'type',
}],
placementStrategy: [{
field: 'field',
type: 'type',
}],
platformVersion: 'platformVersion',
propagateTags: 'propagateTags',
referenceId: 'referenceId',
tags: [{
key: 'key',
value: 'value',
}],
taskCount: 123,
};
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_pipes as pipes
pipe_target_ecs_task_parameters_property = pipes.CfnPipe.PipeTargetEcsTaskParametersProperty(
task_definition_arn="taskDefinitionArn",
# the properties below are optional
capacity_provider_strategy=[pipes.CfnPipe.CapacityProviderStrategyItemProperty(
capacity_provider="capacityProvider",
# the properties below are optional
base=123,
weight=123
)],
enable_ecs_managed_tags=False,
enable_execute_command=False,
group="group",
launch_type="launchType",
network_configuration=pipes.CfnPipe.NetworkConfigurationProperty(
awsvpc_configuration=pipes.CfnPipe.AwsVpcConfigurationProperty(
subnets=["subnets"],
# the properties below are optional
assign_public_ip="assignPublicIp",
security_groups=["securityGroups"]
)
),
overrides=pipes.CfnPipe.EcsTaskOverrideProperty(
container_overrides=[pipes.CfnPipe.EcsContainerOverrideProperty(
command=["command"],
cpu=123,
environment=[pipes.CfnPipe.EcsEnvironmentVariableProperty(
name="name",
value="value"
)],
environment_files=[pipes.CfnPipe.EcsEnvironmentFileProperty(
type="type",
value="value"
)],
memory=123,
memory_reservation=123,
name="name",
resource_requirements=[pipes.CfnPipe.EcsResourceRequirementProperty(
type="type",
value="value"
)]
)],
cpu="cpu",
ephemeral_storage=pipes.CfnPipe.EcsEphemeralStorageProperty(
size_in_gi_b=123
),
execution_role_arn="executionRoleArn",
inference_accelerator_overrides=[pipes.CfnPipe.EcsInferenceAcceleratorOverrideProperty(
device_name="deviceName",
device_type="deviceType"
)],
memory="memory",
task_role_arn="taskRoleArn"
),
placement_constraints=[pipes.CfnPipe.PlacementConstraintProperty(
expression="expression",
type="type"
)],
placement_strategy=[pipes.CfnPipe.PlacementStrategyProperty(
field="field",
type="type"
)],
platform_version="platformVersion",
propagate_tags="propagateTags",
reference_id="referenceId",
tags=[CfnTag(
key="key",
value="value"
)],
task_count=123
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.pipes.*;
PipeTargetEcsTaskParametersProperty pipeTargetEcsTaskParametersProperty = PipeTargetEcsTaskParametersProperty.builder()
.taskDefinitionArn("taskDefinitionArn")
// the properties below are optional
.capacityProviderStrategy(List.of(CapacityProviderStrategyItemProperty.builder()
.capacityProvider("capacityProvider")
// the properties below are optional
.base(123)
.weight(123)
.build()))
.enableEcsManagedTags(false)
.enableExecuteCommand(false)
.group("group")
.launchType("launchType")
.networkConfiguration(NetworkConfigurationProperty.builder()
.awsvpcConfiguration(AwsVpcConfigurationProperty.builder()
.subnets(List.of("subnets"))
// the properties below are optional
.assignPublicIp("assignPublicIp")
.securityGroups(List.of("securityGroups"))
.build())
.build())
.overrides(EcsTaskOverrideProperty.builder()
.containerOverrides(List.of(EcsContainerOverrideProperty.builder()
.command(List.of("command"))
.cpu(123)
.environment(List.of(EcsEnvironmentVariableProperty.builder()
.name("name")
.value("value")
.build()))
.environmentFiles(List.of(EcsEnvironmentFileProperty.builder()
.type("type")
.value("value")
.build()))
.memory(123)
.memoryReservation(123)
.name("name")
.resourceRequirements(List.of(EcsResourceRequirementProperty.builder()
.type("type")
.value("value")
.build()))
.build()))
.cpu("cpu")
.ephemeralStorage(EcsEphemeralStorageProperty.builder()
.sizeInGiB(123)
.build())
.executionRoleArn("executionRoleArn")
.inferenceAcceleratorOverrides(List.of(EcsInferenceAcceleratorOverrideProperty.builder()
.deviceName("deviceName")
.deviceType("deviceType")
.build()))
.memory("memory")
.taskRoleArn("taskRoleArn")
.build())
.placementConstraints(List.of(PlacementConstraintProperty.builder()
.expression("expression")
.type("type")
.build()))
.placementStrategy(List.of(PlacementStrategyProperty.builder()
.field("field")
.type("type")
.build()))
.platformVersion("platformVersion")
.propagateTags("propagateTags")
.referenceId("referenceId")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.taskCount(123)
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Pipes;
var pipeTargetEcsTaskParametersProperty = new PipeTargetEcsTaskParametersProperty {
TaskDefinitionArn = "taskDefinitionArn",
// the properties below are optional
CapacityProviderStrategy = new [] { new CapacityProviderStrategyItemProperty {
CapacityProvider = "capacityProvider",
// the properties below are optional
Base = 123,
Weight = 123
} },
EnableEcsManagedTags = false,
EnableExecuteCommand = false,
Group = "group",
LaunchType = "launchType",
NetworkConfiguration = new NetworkConfigurationProperty {
AwsvpcConfiguration = new AwsVpcConfigurationProperty {
Subnets = new [] { "subnets" },
// the properties below are optional
AssignPublicIp = "assignPublicIp",
SecurityGroups = new [] { "securityGroups" }
}
},
Overrides = new EcsTaskOverrideProperty {
ContainerOverrides = new [] { new EcsContainerOverrideProperty {
Command = new [] { "command" },
Cpu = 123,
Environment = new [] { new EcsEnvironmentVariableProperty {
Name = "name",
Value = "value"
} },
EnvironmentFiles = new [] { new EcsEnvironmentFileProperty {
Type = "type",
Value = "value"
} },
Memory = 123,
MemoryReservation = 123,
Name = "name",
ResourceRequirements = new [] { new EcsResourceRequirementProperty {
Type = "type",
Value = "value"
} }
} },
Cpu = "cpu",
EphemeralStorage = new EcsEphemeralStorageProperty {
SizeInGiB = 123
},
ExecutionRoleArn = "executionRoleArn",
InferenceAcceleratorOverrides = new [] { new EcsInferenceAcceleratorOverrideProperty {
DeviceName = "deviceName",
DeviceType = "deviceType"
} },
Memory = "memory",
TaskRoleArn = "taskRoleArn"
},
PlacementConstraints = new [] { new PlacementConstraintProperty {
Expression = "expression",
Type = "type"
} },
PlacementStrategy = new [] { new PlacementStrategyProperty {
Field = "field",
Type = "type"
} },
PlatformVersion = "platformVersion",
PropagateTags = "propagateTags",
ReferenceId = "referenceId",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TaskCount = 123
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// 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"
pipeTargetEcsTaskParametersProperty := &PipeTargetEcsTaskParametersProperty{
TaskDefinitionArn: jsii.String("taskDefinitionArn"),
// the properties below are optional
CapacityProviderStrategy: []interface{}{
&CapacityProviderStrategyItemProperty{
CapacityProvider: jsii.String("capacityProvider"),
// the properties below are optional
Base: jsii.Number(123),
Weight: jsii.Number(123),
},
},
EnableEcsManagedTags: jsii.Boolean(false),
EnableExecuteCommand: jsii.Boolean(false),
Group: jsii.String("group"),
LaunchType: jsii.String("launchType"),
NetworkConfiguration: &NetworkConfigurationProperty{
AwsvpcConfiguration: &AwsVpcConfigurationProperty{
Subnets: []*string{
jsii.String("subnets"),
},
// the properties below are optional
AssignPublicIp: jsii.String("assignPublicIp"),
SecurityGroups: []*string{
jsii.String("securityGroups"),
},
},
},
Overrides: &EcsTaskOverrideProperty{
ContainerOverrides: []interface{}{
&EcsContainerOverrideProperty{
Command: []*string{
jsii.String("command"),
},
Cpu: jsii.Number(123),
Environment: []interface{}{
&EcsEnvironmentVariableProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
EnvironmentFiles: []interface{}{
&EcsEnvironmentFileProperty{
Type: jsii.String("type"),
Value: jsii.String("value"),
},
},
Memory: jsii.Number(123),
MemoryReservation: jsii.Number(123),
Name: jsii.String("name"),
ResourceRequirements: []interface{}{
&EcsResourceRequirementProperty{
Type: jsii.String("type"),
Value: jsii.String("value"),
},
},
},
},
Cpu: jsii.String("cpu"),
EphemeralStorage: &EcsEphemeralStorageProperty{
SizeInGiB: jsii.Number(123),
},
ExecutionRoleArn: jsii.String("executionRoleArn"),
InferenceAcceleratorOverrides: []interface{}{
&EcsInferenceAcceleratorOverrideProperty{
DeviceName: jsii.String("deviceName"),
DeviceType: jsii.String("deviceType"),
},
},
Memory: jsii.String("memory"),
TaskRoleArn: jsii.String("taskRoleArn"),
},
PlacementConstraints: []interface{}{
&PlacementConstraintProperty{
Expression: jsii.String("expression"),
Type: jsii.String("type"),
},
},
PlacementStrategy: []interface{}{
&PlacementStrategyProperty{
Field: jsii.String("field"),
Type: jsii.String("type"),
},
},
PlatformVersion: jsii.String("platformVersion"),
PropagateTags: jsii.String("propagateTags"),
ReferenceId: jsii.String("referenceId"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
TaskCount: jsii.Number(123),
}
Properties
capacityProviderStrategyoptionalIResolvable | IResolvable | CfnPipe.capacity_provider_strategyoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CapacityProviderStrategyItemProperty]]]capacityProviderStrategyoptionalIResolvableCapacityProviderStrategyoptionalIResolvableCapacityProviderStrategyoptionalinterface{} #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.
enableEcsManagedTagsoptionalboolean | IResolvableenable_ecs_managed_tagsoptionaltyping.Union[bool, IResolvable]enableEcsManagedTagsoptionalBooleanEnableEcsManagedTagsoptionalboolEnableEcsManagedTagsoptionalinterface{} = false #For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
enableExecuteCommandoptionalboolean | IResolvableenable_execute_commandoptionaltyping.Union[bool, IResolvable]enableExecuteCommandoptionalBooleanEnableExecuteCommandoptionalboolEnableExecuteCommandoptionalinterface{} = false #If true, this enables execute command functionality on all containers in the task.
The maximum length is 255 characters.
launchTypeoptionalstringlaunch_typeoptionalstrlaunchTypeoptionalStringLaunchTypeoptionalstringLaunchTypeoptional*string #notes
The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide .
networkConfigurationoptionalIResolvable | CfnPipe.network_configurationoptionaltyping.Union[IResolvable, NetworkConfigurationProperty]networkConfigurationoptionalIResolvableNetworkConfigurationoptionalIResolvableNetworkConfigurationoptionalinterface{} #notes
This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required if LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks.
If you specify NetworkConfiguration when the target ECS task does not use the awsvpc network mode, the task fails.
overridesoptionalIResolvable | CfnPipe.EcsTaskOverridePropertyoverridesoptionaltyping.Union[IResolvable, EcsTaskOverrideProperty]overridesoptionalIResolvableOverridesoptionalIResolvableOverridesoptionalinterface{} #placementConstraintsoptionalIResolvable | IResolvable | CfnPipe.placement_constraintsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PlacementConstraintProperty]]]placementConstraintsoptionalIResolvablePlacementConstraintsoptionalIResolvablePlacementConstraintsoptionalinterface{} #You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).
placementStrategyoptionalIResolvable | IResolvable | CfnPipe.placement_strategyoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PlacementStrategyProperty]]]placementStrategyoptionalIResolvablePlacementStrategyoptionalIResolvablePlacementStrategyoptionalinterface{} #You can specify a maximum of five strategy rules per task.
platformVersionoptionalstringplatform_versionoptionalstrplatformVersionoptionalStringPlatformVersionoptionalstringPlatformVersionoptional*string #notes
Specify only the numeric portion of the platform version, such as 1.1.0 .
This structure is used only if LaunchType is FARGATE . For more information about valid platform versions, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide .
propagateTagsoptionalstringpropagate_tagsoptionalstrpropagateTagsoptionalStringPropagateTagsoptionalstringPropagateTagsoptional*string #If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
referenceIdoptionalstringreference_idoptionalstrreferenceIdoptionalStringReferenceIdoptionalstringReferenceIdoptional*string #tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.
taskCountoptionalnumbertask_countoptionalint | floattaskCountoptionalNumberTaskCountoptionaldoubleTaskCountoptional*float64 #The default is 1.
taskDefinitionArnstringtask_definition_arnstrtaskDefinitionArnStringTaskDefinitionArnstringTaskDefinitionArn*string required #