aws-cdk-lib.GetContextValueOptions

interface GetContextValueOptions

LanguageType name
.NETAmazon.CDK.GetContextValueOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2#GetContextValueOptions
Javasoftware.amazon.awscdk.GetContextValueOptions
Pythonaws_cdk.GetContextValueOptions
TypeScript (source)aws-cdk-lib » GetContextValueOptions

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';

declare const dummyValue: any;
declare const props: any;
const getContextValueOptions: cdk.GetContextValueOptions = {
  dummyValue: dummyValue,
  provider: 'provider',

  // the properties below are optional
  includeEnvironment: false,
  props: {
    propsKey: props,
  },
};

Properties

NameTypeDescription
dummyValueanyThe value to return if the context value was not found and a missing context is reported.
providerstringThe context provider to query.
includeEnvironment?booleanWhether to include the stack's account and region automatically.
props?{ [string]: any }Provider-specific properties.

dummyValue

Type: any

The value to return if the context value was not found and a missing context is reported.

This should be a dummy value that should preferably fail during deployment since it represents an invalid state.


provider

Type: string

The context provider to query.


includeEnvironment?

Type: boolean (optional, default: true)

Whether to include the stack's account and region automatically.


props?

Type: { [string]: any } (optional)

Provider-specific properties.