interface GetContextValueOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.GetContextValueOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2#GetContextValueOptions |
Java | software.amazon.awscdk.GetContextValueOptions |
Python | aws_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
ignoreErrorOnMissingContext: false,
includeEnvironment: false,
props: {
propsKey: props,
},
};
Properties
Name | Type | Description |
---|---|---|
dummy | any | The value to return if the context value was not found and a missing context is reported. |
provider | string | The context provider to query. |
ignore | boolean | When True, the context provider will not throw an error if missing context is reported. |
include | boolean | Whether 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.
provider
Type:
string
The context provider to query.
ignoreErrorOnMissingContext?
Type:
boolean
(optional, default: false)
When True, the context provider will not throw an error if missing context is reported.
includeEnvironment?
Type:
boolean
(optional, default: true)
Whether to include the stack's account and region automatically.
props?
Type:
{ [string]: any }
(optional)
Provider-specific properties.