class PropagateTags
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Lambda.PropagateTags |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambda#PropagateTags |
Java | software.amazon.awscdk.services.lambda.PropagateTags |
Python | aws_cdk.aws_lambda.PropagateTags |
TypeScript (source) | aws-cdk-lib » aws_lambda » PropagateTags |
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
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
| Name | Type | Description |
|---|---|---|
| mode | string | The propagation mode. |
| explicit | { [string]: string } | The explicit tags to propagate (only for Explicit mode). |
mode
Type:
string
The propagation mode.
explicitTags?
Type:
{ [string]: string }
(optional)
The explicit tags to propagate (only for Explicit mode).
Methods
| Name | Description |
|---|---|
| static explicit(tags) | Propagate the specified tags to all managed resources. |
| static none() | No tag propagation to managed resources. |
static explicit(tags)
public static explicit(tags: { [string]: string }): PropagateTags
Parameters
- tags
{ [string]: string }— A map of tag keys to values to propagate.
Returns
Propagate the specified tags to all managed resources.
static none()
public static none(): PropagateTags
Returns
No tag propagation to managed resources.

.NET
Go
Java
Python
TypeScript (