aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
42 lines (41 loc) • 1.2 kB
TypeScript
import type { IConstruct } from 'constructs';
/**
* Selects constructs from a construct tree.
*/
export interface IConstructSelector {
/**
* Selects constructs from the given scope based on the selector's criteria.
*/
select(scope: IConstruct): IConstruct[];
}
/**
* Selects constructs from a construct tree based on various criteria.
*/
export declare class ConstructSelector {
/**
* Selects all constructs in the tree.
*/
static all(): IConstructSelector;
/**
* Selects CfnResource constructs or the default CfnResource child.
*/
static cfnResource(): IConstructSelector;
/**
* Selects only the provided construct.
*/
static onlyItself(): IConstructSelector;
/**
* Selects constructs of a specific type.
*/
static resourcesOfType(...types: string[]): IConstructSelector;
/**
* Selects constructs whose construct IDs match a pattern.
* Uses glob like matching.
*/
static byId(pattern: string): IConstructSelector;
/**
* Selects constructs whose construct paths match a pattern.
* Uses glob like matching.
*/
static byPath(pattern: string): IConstructSelector;
}