PropertyInjectors Class
This is a collection of ProjectInjectors assigned to this scope.
It is keyed by constructUniqueId. There can be only one ProjectInjector for a constructUniqueId.
| Source | core/lib/prop-injectors.ts |
|---|---|
| Type last changed |
Example
ts
// 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);
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
property_injectors = cdk.PropertyInjectors.of(self)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
PropertyInjectors propertyInjectors = PropertyInjectors.of(this);
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var propertyInjectors = PropertyInjectors.Of(this);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
propertyInjectors := cdk.PropertyInjectors_Of(this)
Properties
The scope attached to Injectors.
Methods
add(...propsInjectors: IPropertyInjector[]): voiddef add(self, props_injectors: IPropertyInjector) -> Nonepublic void add(IPropertyInjector propsInjectors)public void Add(IPropertyInjector propsInjectors)func Add(PropsInjectors IPropertyInjector) #Add a list of IPropertyInjectors to this collection of PropertyInjectors.
1 parameter
Parameters
propsInjectorsprops_injectorspropsInjectorspropsInjectorsPropsInjectors— - a list of IPropertyInjector.
for(uniqueId: string): IPropertyInjectordef for(self, unique_id: str) -> IPropertyInjectorpublic IPropertyInjector for(String uniqueId)public IPropertyInjector For(string uniqueId)func For(UniqueId *string) IPropertyInjector #Get the PropertyInjector that is registered to the Construct's uniqueId.
1 parameter · returns
Parameters
uniqueIdunique_iduniqueIduniqueIdUniqueId— - the construct uniqueId.
Returns: - the IPropertyInjector for that construct uniqueId
hasPropertyInjectors(x: any): boolean@staticmethod def has_property_injectors(x: Any) -> boolpublic static Boolean hasPropertyInjectors(Object x)public static bool HasPropertyInjectors(object x)func HasPropertyInjectors(X interface{}) *bool static #Return whether the given object has a PropertyInjectors property.
We do attribute detection since we can't reliably use 'instanceof'.
of(scope: IConstruct): PropertyInjectors // chainable@staticmethod def of(scope: IConstruct) -> PropertyInjectorspublic static PropertyInjectors of(IConstruct scope)public static PropertyInjectors Of(IConstruct scope)func Of(Scope IConstruct) PropertyInjectors static #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.
1 parameter
Parameters
scopescopescopescopeScope— The scope for which these PropertyInjectors will apply.
supportedClasses(): string[]def supported_classes(self, ) -> typing.List[str]public List<String> supportedClasses()public string[] SupportedClasses()func SupportedClasses() *[]*string #This returns a list of the Constructs that are supporting by this PropertyInjectors.
returns
Returns: a list of string showing the supported Constructs.