Class PropagatedTagSource
Propagate tags from either service or task definition.
Inheritance
System.Object
PropagatedTagSource
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class PropagatedTagSource : Enum
Syntax (vb)
Public NotInheritable Class PropagatedTagSource
Inherits
Enum
Remarks
ExampleMetadata: infused
Examples
var vpc = Vpc.FromLookup(this, "Vpc", new VpcLookupOptions {
IsDefault = true
});
var cluster = new Cluster(this, "FargateCluster", new ClusterProps { Vpc = vpc });
var taskDefinition = new TaskDefinition(this, "TD", new TaskDefinitionProps {
MemoryMiB = "512",
Cpu = "256",
Compatibility = Compatibility.FARGATE
});
var containerDefinition = taskDefinition.AddContainer("TheContainer", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("foo/bar"),
MemoryLimitMiB = 256
});
var runTask = new EcsRunTask(this, "RunFargate", new EcsRunTaskProps {
IntegrationPattern = IntegrationPattern.RUN_JOB,
Cluster = cluster,
TaskDefinition = taskDefinition,
AssignPublicIp = true,
ContainerOverrides = new [] { new ContainerOverride {
ContainerDefinition = containerDefinition,
Environment = new [] { new TaskEnvironmentVariable { Name = "SOME_KEY", Value = JsonPath.StringAt("$.SomeKey") } }
} },
LaunchTarget = new EcsFargateLaunchTarget(),
PropagatedTagSource = PropagatedTagSource.TASK_DEFINITION
});
Synopsis
Fields
NONE | Do not propagate. |
SERVICE | Propagate tags from service. |
TASK_DEFINITION | Propagate tags from task definition. |
value__ |
Fields
NONE
Do not propagate.
public const PropagatedTagSource NONE
Field Value
Type | Description |
---|---|
PropagatedTagSource |
SERVICE
Propagate tags from service.
public const PropagatedTagSource SERVICE
Field Value
Type | Description |
---|---|
PropagatedTagSource |
TASK_DEFINITION
Propagate tags from task definition.
public const PropagatedTagSource TASK_DEFINITION
Field Value
Type | Description |
---|---|
PropagatedTagSource |
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |