Class ConfigurationSource
Defines the integrated configuration sources.
Namespace: Amazon.CDK.AWS.AppConfig
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class ConfigurationSource : DeputyBase
Syntax (vb)
Public MustInherit Class ConfigurationSource Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
Application application;
Bucket bucket;
new SourcedConfiguration(this, "MySourcedConfiguration", new SourcedConfigurationProps {
Application = application,
Location = ConfigurationSource.FromBucket(bucket, "path/to/file.json"),
Type = ConfigurationType.FEATURE_FLAGS,
Name = "MyConfig",
Description = "This is my sourced configuration from CDK."
});
Synopsis
Constructors
ConfigurationSource() | Defines the integrated configuration sources. |
Properties
Key | The KMS Key that encrypts the configuration. |
LocationUri | The URI of the configuration source. |
Type | The type of the configuration source. |
Methods
FromBucket(IBucket, string, IKey?) | Defines configuration content from an Amazon S3 bucket. |
FromCfnDocument(CfnDocument) | Defines configuration content from a Systems Manager (SSM) document. |
FromParameter(IParameter, IKey?) | Defines configuration content from a Systems Manager (SSM) Parameter Store parameter. |
FromPipeline(IPipeline) | Defines configuration content from AWS CodePipeline. |
FromSecret(ISecret) | Defines configuration content from an AWS Secrets Manager secret. |
Constructors
ConfigurationSource()
Defines the integrated configuration sources.
protected ConfigurationSource()
Remarks
ExampleMetadata: infused
Examples
Application application;
Bucket bucket;
new SourcedConfiguration(this, "MySourcedConfiguration", new SourcedConfigurationProps {
Application = application,
Location = ConfigurationSource.FromBucket(bucket, "path/to/file.json"),
Type = ConfigurationType.FEATURE_FLAGS,
Name = "MyConfig",
Description = "This is my sourced configuration from CDK."
});
Properties
Key
The KMS Key that encrypts the configuration.
public abstract IKey? Key { get; }
Property Value
Remarks
ExampleMetadata: infused
LocationUri
The URI of the configuration source.
public abstract string LocationUri { get; }
Property Value
Remarks
ExampleMetadata: infused
Type
The type of the configuration source.
public abstract ConfigurationSourceType Type { get; }
Property Value
Remarks
ExampleMetadata: infused
Methods
FromBucket(IBucket, string, IKey?)
Defines configuration content from an Amazon S3 bucket.
public static ConfigurationSource FromBucket(IBucket bucket, string objectKey, IKey? key = null)
Parameters
- bucket IBucket
The S3 bucket where the configuration is stored.
- objectKey string
The path to the configuration.
- key IKey
The KMS Key that the bucket is encrypted with.
Returns
Remarks
ExampleMetadata: infused
FromCfnDocument(CfnDocument)
Defines configuration content from a Systems Manager (SSM) document.
public static ConfigurationSource FromCfnDocument(CfnDocument document)
Parameters
- document CfnDocument
The SSM document where the configuration is stored.
Returns
Remarks
ExampleMetadata: infused
FromParameter(IParameter, IKey?)
Defines configuration content from a Systems Manager (SSM) Parameter Store parameter.
public static ConfigurationSource FromParameter(IParameter parameter, IKey? key = null)
Parameters
- parameter IParameter
The parameter where the configuration is stored.
- key IKey
The KMS Key that the secure string is encrypted with.
Returns
Remarks
ExampleMetadata: infused
FromPipeline(IPipeline)
Defines configuration content from AWS CodePipeline.
public static ConfigurationSource FromPipeline(IPipeline pipeline)
Parameters
- pipeline IPipeline
The pipeline where the configuration is stored.
Returns
Remarks
ExampleMetadata: infused
FromSecret(ISecret)
Defines configuration content from an AWS Secrets Manager secret.
public static ConfigurationSource FromSecret(ISecret secret)
Parameters
- secret ISecret
The secret where the configuration is stored.
Returns
Remarks
ExampleMetadata: infused