Class GetContextValueOptions.Jsii$Proxy
- All Implemented Interfaces:
GetContextKeyOptions,GetContextValueOptions,software.amazon.jsii.JsiiSerializable
- Enclosing interface:
GetContextValueOptions
GetContextValueOptions-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.GetContextValueOptions
GetContextValueOptions.Builder, GetContextValueOptions.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJsii$Proxy(GetContextValueOptions.Builder builder) Constructor that initializes the object based on literal property values passed by theGetContextValueOptions.Builder.protectedJsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef) Constructor that initializes the object based on values retrieved from the JsiiObject. -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNodefinal booleanfinal StringAdds an additional discriminator to thecdk.context.jsoncache key.final ObjectThe value to return if the lookup has not yet been performed.final Boolean(deprecated) Ignore a lookup failure and return thedummyValueinstead.final BooleanWhether to include the stack's account and region automatically.final BooleanWhether the resource must exist.getProps()Provider-specific properties.final StringThe context provider to query.final inthashCode()Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
Constructor Details
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef) Constructor that initializes the object based on values retrieved from the JsiiObject.- Parameters:
objRef- Reference to the JSII managed object.
-
Jsii$Proxy
Constructor that initializes the object based on literal property values passed by theGetContextValueOptions.Builder.
-
-
Method Details
-
getDummyValue
Description copied from interface:GetContextValueOptionsThe value to return if the lookup has not yet been performed.Upon first synthesis, the lookups has not yet been performed. The
getValue()operation returns this value instead, so that synthesis can proceed. After synthesis completes the first time, the actual lookup will be performed and synthesis will run again with the real value.Dummy values should preferably have valid shapes so that downstream consumers of lookup values don't throw validation exceptions if they encounter a dummy value (or all possible downstream consumers need to effectively check for the well-known shape of the dummy value); throwing an exception would error out the synthesis operation and prevent the lookup and the second, real, synthesis from happening.
Connection to mustExist
dummyValueis also used as the official value to return if the lookup has failed andmustExist == false.- Specified by:
getDummyValuein interfaceGetContextValueOptions
-
getIgnoreErrorOnMissingContext
Description copied from interface:GetContextValueOptions(deprecated) Ignore a lookup failure and return thedummyValueinstead.mustExistis the recommended alias for this deprecated property (note that its value is reversed).Default: false
- Specified by:
getIgnoreErrorOnMissingContextin interfaceGetContextValueOptions
-
getMustExist
Description copied from interface:GetContextValueOptionsWhether the resource must exist.If this is set (the default), the query fails if the value or resource we tried to look up doesn't exist.
If this is
falseand the value we tried to look up could not be found, the failure is suppressed anddummyValueis officially returned instead.When this happens,
dummyValueis encoded into cached context and it will never be refreshed anymore until the user runscdk context --reset <key>.Note that it is not possible for the CDK app code to make a distinction between "the lookup has not been performed yet" and "the lookup didn't find anything and we returned a default value instead".
Context providers
This feature must explicitly be supported by context providers. It is currently supported by:
- KMS key provider
- SSM parameter provider
Note to implementors
The dummy value should not be returned for all SDK lookup failures. For example, "no network" or "no credentials" or "malformed query" should not lead to the dummy value being returned. Only the case of "no such resource" should.
Default: true
- Specified by:
getMustExistin interfaceGetContextValueOptions
-
getProvider
Description copied from interface:GetContextKeyOptionsThe context provider to query.- Specified by:
getProviderin interfaceGetContextKeyOptions
-
getAdditionalCacheKey
Description copied from interface:GetContextKeyOptionsAdds an additional discriminator to thecdk.context.jsoncache key.Default: - no additional cache key
- Specified by:
getAdditionalCacheKeyin interfaceGetContextKeyOptions
-
getIncludeEnvironment
Description copied from interface:GetContextKeyOptionsWhether to include the stack's account and region automatically.Default: true
- Specified by:
getIncludeEnvironmentin interfaceGetContextKeyOptions
-
getProps
Description copied from interface:GetContextKeyOptionsProvider-specific properties.- Specified by:
getPropsin interfaceGetContextKeyOptions
-
$jsii$toJson
@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()- Specified by:
$jsii$toJsonin interfacesoftware.amazon.jsii.JsiiSerializable
-
equals
-
hashCode
public final int hashCode()
-