class PropertyInjectors
| Language | Type name |
|---|---|
.NET | Amazon.CDK.PropertyInjectors |
Go | github.com/aws/aws-cdk-go/awscdk/v2#PropertyInjectors |
Java | software.amazon.awscdk.PropertyInjectors |
Python | aws_cdk.PropertyInjectors |
TypeScript (source) | aws-cdk-lib » PropertyInjectors |
This is a collection of ProjectInjectors assigned to this scope.
It is keyed by constructUniqueId. There can be only one ProjectInjector for a constructUniqueId.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const propertyInjectors = cdk.PropertyInjectors.of(this);
Properties
| Name | Type | Description |
|---|---|---|
| scope | IConstruct | The scope attached to Injectors. |
scope
Type:
IConstruct
The scope attached to Injectors.
Methods
| Name | Description |
|---|---|
| add(...propsInjectors) | Add a list of IPropertyInjectors to this collection of PropertyInjectors. |
| for(uniqueId) | Get the PropertyInjector that is registered to the Construct's uniqueId. |
| supported | This returns a list of the Constructs that are supporting by this PropertyInjectors. |
| static has | Return whether the given object has a PropertyInjectors property. |
| static of(scope) | Returns the PropertyInjectors object associated with a construct scope. |
add(...propsInjectors)
public add(...propsInjectors: IPropertyInjector[]): void
Parameters
- propsInjectors
IProperty— - a list of IPropertyInjector.Injector
Add a list of IPropertyInjectors to this collection of PropertyInjectors.
for(uniqueId)
public for(uniqueId: string): IPropertyInjector
Parameters
- uniqueId
string— - the construct uniqueId.
Returns
Get the PropertyInjector that is registered to the Construct's uniqueId.
supportedClasses()
public supportedClasses(): string[]
Returns
string[]
This returns a list of the Constructs that are supporting by this PropertyInjectors.
static hasPropertyInjectors(x)
public static hasPropertyInjectors(x: any): boolean
Parameters
- x
any
Returns
boolean
Return whether the given object has a PropertyInjectors property.
We do attribute detection since we can't reliably use 'instanceof'.
static of(scope)
public static of(scope: IConstruct): PropertyInjectors
Parameters
- scope
IConstruct— The scope for which these PropertyInjectors will apply.
Returns
Returns the PropertyInjectors object associated with a construct scope.
If PropertyInjectors object doesn't exist on this scope, then it creates one and attaches it to scope.

.NET
Go
Java
Python
TypeScript (