# 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.

- Source: [`core/lib/prop-injectors.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/core/lib/prop-injectors.ts#L39)
- Type last changed: v2.196.0 · 16 May 2025

## 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);
```

## Properties

- `scope`: [IConstruct](/cdk/api/v2/docs/constructs.IConstruct.html) (required) — The scope attached to Injectors.

## Methods

- `add(...propsInjectors: IPropertyInjector[]): void` — Add a list of IPropertyInjectors to this collection of PropertyInjectors.

  **Parameters**

  - `propsInjectors` — - a list of IPropertyInjector.

- `for(uniqueId: string): IPropertyInjector` — Get the PropertyInjector that is registered to the Construct's uniqueId.

  **Parameters**

  - `uniqueId` — - the construct uniqueId.

  **Returns:** - the IPropertyInjector for that construct uniqueId

- `hasPropertyInjectors(x: any): boolean` (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` (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.

  **Parameters**

  - `scope` — The scope for which these PropertyInjectors will apply.

- `supportedClasses(): string[]` — This returns a list of the Constructs that are supporting by this PropertyInjectors.

  **Returns:** a list of string showing the supported Constructs.
