enum IgnoreMode
Language | Type name |
---|---|
.NET | Amazon.CDK.IgnoreMode |
Go | github.com/aws/aws-cdk-go/awscdk/v2#IgnoreMode |
Java | software.amazon.awscdk.IgnoreMode |
Python | aws_cdk.IgnoreMode |
TypeScript (source) | aws-cdk-lib » IgnoreMode |
Determines the ignore behavior to use.
Example
new lambda.Function(this, 'Function', {
code: lambda.Code.fromAsset(path.join(__dirname, 'my-python-handler'), {
exclude: ['*.ignore'],
ignoreMode: IgnoreMode.DOCKER, // Default is IgnoreMode.GLOB
}),
runtime: lambda.Runtime.PYTHON_3_9,
handler: 'index.handler',
});
Members
Name | Description |
---|---|
GLOB | Ignores file paths based on simple glob patterns. |
GIT | Ignores file paths based on the .gitignore specification . |
DOCKER | Ignores file paths based on the .dockerignore specification . |
GLOB
Ignores file paths based on simple glob patterns.
This is the default for file assets.
It is also the default for Docker image assets, unless the '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport' context flag is set.
GIT
Ignores file paths based on the .gitignore specification
.
DOCKER
Ignores file paths based on the .dockerignore specification
.
This is the default for Docker image assets if the '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport' context flag is set.