ConfigurationSource Class
Defines the integrated configuration sources.
| Source | aws-appconfig/lib/configuration.ts |
|---|---|
| Type last changed |
Example
ts
declare const application: appconfig.Application;
declare const bucket: s3.Bucket;
new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', {
application,
location: appconfig.ConfigurationSource.fromBucket(bucket, 'path/to/file.json'),
type: appconfig.ConfigurationType.FEATURE_FLAGS,
name: 'MyConfig',
description: 'This is my sourced configuration from CDK.',
});
python
# application: appconfig.Application
# bucket: s3.Bucket
appconfig.SourcedConfiguration(self, "MySourcedConfiguration",
application=application,
location=appconfig.ConfigurationSource.from_bucket(bucket, "path/to/file.json"),
type=appconfig.ConfigurationType.FEATURE_FLAGS,
name="MyConfig",
description="This is my sourced configuration from CDK."
)
java
Application application;
Bucket bucket;
SourcedConfiguration.Builder.create(this, "MySourcedConfiguration")
.application(application)
.location(ConfigurationSource.fromBucket(bucket, "path/to/file.json"))
.type(ConfigurationType.FEATURE_FLAGS)
.name("MyConfig")
.description("This is my sourced configuration from CDK.")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
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."
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var application Application
var bucket Bucket
appconfig.NewSourcedConfiguration(this, jsii.String("MySourcedConfiguration"), &SourcedConfigurationProps{
Application: Application,
Location: appconfig.ConfigurationSource_FromBucket(bucket, jsii.String("path/to/file.json")),
Type: appconfig.ConfigurationType_FEATURE_FLAGS,
Name: jsii.String("MyConfig"),
Description: jsii.String("This is my sourced configuration from CDK."),
})
Initializer
ts
new ConfigurationSource()
python
ConfigurationSource()
java
new ConfigurationSource()
csharp
new ConfigurationSource()
go
NewConfigurationSource()
Properties
keymay be undefinedIKeykeymay be undefinedIKeykeymay be undefinedIKeyKeymay be undefinedIKeyKeymay be undefinedIKey #The KMS Key that encrypts the configuration.
The URI of the configuration source.
typeConfigurationSourceTypetypeConfigurationSourceTypetypeConfigurationSourceTypeTypeConfigurationSourceTypeTypeConfigurationSourceType #The type of the configuration source.
Methods
fromBucket(bucket: IBucket, objectKey: string, key?: IKey): ConfigurationSource // chainable@staticmethod def from_bucket(bucket: IBucket, object_key: str, key: typing.Optional[IKey] = None) -> ConfigurationSourcepublic static ConfigurationSource fromBucket(IBucket bucket, String objectKey, IKey key)public static ConfigurationSource FromBucket(IBucket bucket, string objectKey, IKey? key = null)func FromBucket(Bucket IBucket, ObjectKey *string, Key IKey) ConfigurationSource static #Defines configuration content from an Amazon S3 bucket.
3 parameters
Parameters
bucketbucketbucketbucketBucket— The S3 bucket where the configuration is stored.objectKeyobject_keyobjectKeyobjectKeyObjectKey— The path to the configuration.keykeykeykeyKey— The KMS Key that the bucket is encrypted with.
fromCfnDocument(document: CfnDocument): ConfigurationSource // chainable@staticmethod def from_cfn_document(document: CfnDocument) -> ConfigurationSourcepublic static ConfigurationSource fromCfnDocument(CfnDocument document)public static ConfigurationSource FromCfnDocument(CfnDocument document)func FromCfnDocument(Document CfnDocument) ConfigurationSource static #Defines configuration content from a Systems Manager (SSM) document.
1 parameter
Parameters
documentdocumentdocumentdocumentDocument— The SSM document where the configuration is stored.
fromParameter(parameter: IParameter, key?: IKey): ConfigurationSource // chainable@staticmethod def from_parameter(parameter: IParameter, key: typing.Optional[IKey] = None) -> ConfigurationSourcepublic static ConfigurationSource fromParameter(IParameter parameter, IKey key)public static ConfigurationSource FromParameter(IParameter parameter, IKey? key = null)func FromParameter(Parameter IParameter, Key IKey) ConfigurationSource static #Defines configuration content from a Systems Manager (SSM) Parameter Store parameter.
2 parameters
Parameters
parameterparameterparameterparameterParameter— The parameter where the configuration is stored.keykeykeykeyKey— The KMS Key that the secure string is encrypted with.
fromPipeline(pipeline: IPipelineRef): ConfigurationSource // chainable@staticmethod def from_pipeline(pipeline: IPipelineRef) -> ConfigurationSourcepublic static ConfigurationSource fromPipeline(IPipelineRef pipeline)public static ConfigurationSource FromPipeline(IPipelineRef pipeline)func FromPipeline(Pipeline IPipelineRef) ConfigurationSource static #Defines configuration content from AWS CodePipeline.
1 parameter
Parameters
pipelinepipelinepipelinepipelinePipeline— The pipeline where the configuration is stored.
fromSecret(secret: ISecret): ConfigurationSource // chainable@staticmethod def from_secret(secret: ISecret) -> ConfigurationSourcepublic static ConfigurationSource fromSecret(ISecret secret)public static ConfigurationSource FromSecret(ISecret secret)func FromSecret(Secret ISecret) ConfigurationSource static #Defines configuration content from an AWS Secrets Manager secret.
1 parameter
Parameters
secretsecretsecretsecretSecret— The secret where the configuration is stored.