Table of Contents

Class GetContextValueOptions

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll
public class GetContextValueOptions : IGetContextValueOptions, IGetContextKeyOptions
Inheritance
GetContextValueOptions
Implements
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;

            var dummyValue;
            var props;
            var getContextValueOptions = new GetContextValueOptions {
                DummyValue = dummyValue,
                Provider = "provider",

                // the properties below are optional
                IncludeEnvironment = false,
                Props = new Dictionary<string, object> {
                    { "propsKey", props }
                }
            };

Remarks

ExampleMetadata: fixture=_generated

Constructors

GetContextValueOptions()

public GetContextValueOptions()

Properties

DummyValue

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

public object DummyValue { get; set; }

Property Value

object

Remarks

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

IncludeEnvironment

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

public bool? IncludeEnvironment { get; set; }

Property Value

bool?

Remarks

Default: true

Props

Provider-specific properties.

public IDictionary<string, object>? Props { get; set; }

Property Value

IDictionary<string, object>

Provider

The context provider to query.

public string Provider { get; set; }

Property Value

string