Skip to content
v2.275.0

PropagateTags Class ​

Configuration for propagating tags to managed resources created by a capacity provider.

Use static factory methods to create instances:

propagateTags: lambda.PropagateTags.explicit({ env: 'prod', team: 'platform' })

Example ​

ts
import * as ec2 from 'aws-cdk-lib/aws-ec2';

const vpc = new ec2.Vpc(this, 'MyVpc');
const securityGroup = new ec2.SecurityGroup(this, 'SecurityGroup', { vpc });

const capacityProvider = new lambda.CapacityProvider(this, 'MyCapacityProvider', {
  subnets: vpc.privateSubnets,
  securityGroups: [securityGroup],
  propagateTags: lambda.PropagateTags.explicit({
    CostCenter: 'Engineering',
    Project: 'MyProject',
  }),
});

Properties ​

explicitTagsmay be undefined{ [key: string]: string }explicit_tagsmay be undefinedtyping.Mapping[str, str]explicitTagsmay be undefinedMap<String, String>ExplicitTagsmay be undefinedIDictionary<string, string>ExplicitTagsmay be undefined*map[string]*string#
The explicit tags to propagate (only for Explicit mode).
modestringmodestrmodeStringModestringMode*string#
The propagation mode.

Methods ​

explicit(tags: { [key: string]: string }): PropagateTags // chainable@staticmethod def explicit(tags: typing.Mapping[str, str]) -> PropagateTagspublic static PropagateTags explicit(Map<String, String> tags)public static PropagateTags Explicit(IDictionary<string, string> tags)func Explicit(Tags *map[string]*string) PropagateTagsstatic#
Propagate the specified tags to all managed resources.
1 parameter

Parameters

  • tagstagstagstagsTags — A map of tag keys to values to propagate.
none(): PropagateTags // chainable@staticmethod def none() -> PropagateTagspublic static PropagateTags none()public static PropagateTags None()func None() PropagateTagsstatic#
No tag propagation to managed resources.