Skip to content
v2.275.0

InjectionContext Struct ​

This defines the values needed for Injection.

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';
import * as constructs from 'constructs';

declare const construct: constructs.Construct;
const injectionContext: cdk.InjectionContext = {
  id: 'id',
  scope: construct,
};

Properties ​

idstringidstridStringIdstringId*stringrequired#
id from the Construct constructor.
scopeConstructscopeConstructscopeConstructScopeConstructScopeConstructrequired#
scope from the constructor.