Skip to content
v2.277.0

GetContextKeyOptions Struct ​

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

declare const props: any;
const getContextKeyOptions: cdk.GetContextKeyOptions = {
  provider: 'provider',

  // the properties below are optional
  additionalCacheKey: 'additionalCacheKey',
  includeEnvironment: false,
  props: {
    propsKey: props,
  },
};
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

# props: Any

get_context_key_options = cdk.GetContextKeyOptions(
    provider="provider",

    # the properties below are optional
    additional_cache_key="additionalCacheKey",
    include_environment=False,
    props={
        "props_key": props
    }
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

Object props;

GetContextKeyOptions getContextKeyOptions = GetContextKeyOptions.builder()
        .provider("provider")

        // the properties below are optional
        .additionalCacheKey("additionalCacheKey")
        .includeEnvironment(false)
        .props(Map.of(
                "propsKey", props))
        .build();
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 props;

var getContextKeyOptions = new GetContextKeyOptions {
    Provider = "provider",

    // the properties below are optional
    AdditionalCacheKey = "additionalCacheKey",
    IncludeEnvironment = false,
    Props = new Dictionary<string, object> {
        { "propsKey", props }
    }
};
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"

var props interface{}

getContextKeyOptions := &GetContextKeyOptions{
	Provider: jsii.String("provider"),

	// the properties below are optional
	AdditionalCacheKey: jsii.String("additionalCacheKey"),
	IncludeEnvironment: jsii.Boolean(false),
	Props: map[string]interface{}{
		"propsKey": props,
	},
}

Properties ​

additionalCacheKeyoptionalstringadditional_cache_keyoptionalstradditionalCacheKeyoptionalStringAdditionalCacheKeyoptionalstringAdditionalCacheKeyoptional*string#
Adds an additional discriminator to the `cdk.context.json` cache key.

Default: no additional cache key

includeEnvironmentoptionalbooleaninclude_environmentoptionalboolincludeEnvironmentoptionalBooleanIncludeEnvironmentoptionalboolIncludeEnvironmentoptional*bool= true#
Whether to include the stack's account and region automatically.
propsoptional{ [key: string]: any }propsoptionaltyping.Mapping[str, Any]propsoptionalMap<String, Object>PropsoptionalIDictionary<string, object>Propsoptional*map[string]interface{}#
Provider-specific properties.
providerstringproviderstrproviderStringProviderstringProvider*stringrequired#
The context provider to query.