Enum PropagatedTagSource

java.lang.Object
java.lang.Enum<PropagatedTagSource>
software.amazon.awscdk.services.ecs.PropagatedTagSource
All Implemented Interfaces:
Serializable, Comparable<PropagatedTagSource>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-03-14T22:21:54.799Z") @Stability(Stable) public enum PropagatedTagSource extends Enum<PropagatedTagSource>
Propagate tags from either service or task definition.

Example:

 IVpc vpc = Vpc.fromLookup(this, "Vpc", VpcLookupOptions.builder()
         .isDefault(true)
         .build());
 Cluster cluster = Cluster.Builder.create(this, "FargateCluster").vpc(vpc).build();
 TaskDefinition taskDefinition = TaskDefinition.Builder.create(this, "TD")
         .memoryMiB("512")
         .cpu("256")
         .compatibility(Compatibility.FARGATE)
         .build();
 ContainerDefinition containerDefinition = taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder()
         .image(ContainerImage.fromRegistry("foo/bar"))
         .memoryLimitMiB(256)
         .build());
 EcsRunTask runTask = EcsRunTask.Builder.create(this, "RunFargate")
         .integrationPattern(IntegrationPattern.RUN_JOB)
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .assignPublicIp(true)
         .containerOverrides(List.of(ContainerOverride.builder()
                 .containerDefinition(containerDefinition)
                 .environment(List.of(TaskEnvironmentVariable.builder().name("SOME_KEY").value(JsonPath.stringAt("$.SomeKey")).build()))
                 .build()))
         .launchTarget(new EcsFargateLaunchTarget())
         .propagatedTagSource(PropagatedTagSource.TASK_DEFINITION)
         .build();
 
  • Enum Constant Details

    • SERVICE

      @Stability(Stable) public static final PropagatedTagSource SERVICE
      Propagate tags from service.
    • TASK_DEFINITION

      @Stability(Stable) public static final PropagatedTagSource TASK_DEFINITION
      Propagate tags from task definition.
    • NONE

      @Stability(Stable) public static final PropagatedTagSource NONE
      Do not propagate.
  • Method Details

    • values

      public static PropagatedTagSource[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PropagatedTagSource valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null