SourcedConfiguration
A sourced configuration represents configuration stored in an Amazon S3 bucket, AWS Secrets Manager secret, Systems Manager (SSM) Parameter Store parameter, SSM document, or AWS CodePipeline.
Example
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.',
});
# 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."
)
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();
// 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."
});
// 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
new SourcedConfiguration(scope: Construct, id: string, props: SourcedConfigurationProps)
SourcedConfiguration(scope: Construct, id: str, props: SourcedConfigurationProps)
new SourcedConfiguration(Construct scope, String id, SourcedConfigurationProps props)
new SourcedConfiguration(Construct scope, string id, SourcedConfigurationProps props)
NewSourcedConfiguration(Scope Construct, Id *string, Props SourcedConfigurationProps)
Construct Props
applicationIApplicationapplicationIApplicationapplicationIApplicationApplicationIApplicationApplicationIApplicationrequired#deletionProtectionCheckDeletionProtectionCheckdeletion_protection_checkDeletionProtectionCheckdeletionProtectionCheckDeletionProtectionCheckDeletionProtectionCheckDeletionProtectionCheckDeletionProtectionCheckDeletionProtectionCheck#Default: DeletionProtectionCheck.ACCOUNT_DEFAULT
Deletion protection prevents a user from deleting a configuration profile if your application has called either GetLatestConfiguration or GetConfiguration for the configuration profile during the specified interval.
deploymentStrategyIDeploymentStrategyRefdeployment_strategyIDeploymentStrategyRefdeploymentStrategyIDeploymentStrategyRefDeploymentStrategyIDeploymentStrategyRefDeploymentStrategyIDeploymentStrategyRef#Default: A deployment strategy with the rollout strategy set to RolloutStrategy.CANARY_10_PERCENT_20_MINUTES
deployToIEnvironment[]deploy_totyping.List[IEnvironment]deployToList<IEnvironment>DeployToIEnvironment[]DeployTo*[]IEnvironment= None.#If this parameter is not specified, then there will be no deployment created alongside this configuration.
Deployments can be added later using the IEnvironment.addDeployment or IEnvironment.addDeployments methods.
Default: No description.
locationConfigurationSourcelocationConfigurationSourcelocationConfigurationSourceLocationConfigurationSourceLocationConfigurationSourcerequired#Default: A name is generated.
retrievalRoleIRoleRefretrieval_roleIRoleRefretrievalRoleIRoleRefRetrievalRoleIRoleRefRetrievalRoleIRoleRef#Default: Auto generated if location type is not ConfigurationSourceType.CODE_PIPELINE otherwise no role specified.
typeConfigurationTypetypeConfigurationTypetypeConfigurationTypeTypeConfigurationTypeTypeConfigurationType= ConfigurationType.FREEFORM#validatorsIValidator[]validatorstyping.List[IValidator]validatorsList<IValidator>ValidatorsIValidator[]Validators*[]IValidator#Default: No validators.
versionNumberstringversion_numberstrversionNumberStringVersionNumberstringVersionNumber*string= None.#If this is not specified, then there will be no deployment.
Properties
applicationIApplicationapplicationIApplicationapplicationIApplicationApplicationIApplicationApplicationIApplicationrequired#configurationProfileArnstringconfiguration_profile_arnstrconfigurationProfileArnStringConfigurationProfileArnstringConfigurationProfileArn*stringrequired#configurationProfileIdstringconfiguration_profile_idstrconfigurationProfileIdStringConfigurationProfileIdstringConfigurationProfileId*stringrequired#deploymentStrategyIDeploymentStrategydeployment_strategyIDeploymentStrategydeploymentStrategyIDeploymentStrategyDeploymentStrategyIDeploymentStrategyDeploymentStrategyIDeploymentStrategy#deployToIEnvironment[]deploy_totyping.List[IEnvironment]deployToList<IEnvironment>DeployToIEnvironment[]DeployTo*[]IEnvironment#locationConfigurationSourcelocationConfigurationSourcelocationConfigurationSourceLocationConfigurationSourceLocationConfigurationSourcerequired#This key can be used when storing configuration in AWS Secrets Manager, Systems Manager Parameter Store, or Amazon S3.
typeConfigurationTypetypeConfigurationTypetypeConfigurationTypeTypeConfigurationTypeTypeConfigurationType#validatorsIValidator[]validatorstyping.List[IValidator]validatorsList<IValidator>ValidatorsIValidator[]Validators*[]IValidator#Methods
addExtension(extension: IExtension): voiddef add_extension(self, extension: IExtension) -> Nonepublic void addExtension(IExtension extension)public void AddExtension(IExtension extension)func AddExtension(Extension IExtension)#1 parameter
Parameters
extensionextensionextensionextensionExtension— The extension to create an association for.
atDeploymentTick(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef at_deployment_tick(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void atDeploymentTick(IEventDestination eventDestination, ExtensionOptions options)public void AtDeploymentTick(IEventDestination eventDestination, ExtensionOptions? options = null)func AtDeploymentTick(EventDestination IEventDestination, Options ExtensionOptions)#2 parameters
Parameters
eventDestinationevent_destinationeventDestinationeventDestinationEventDestination— The event that occurs during the extension.optionsoptionsoptionsoptionsOptions— Options for the extension.
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on(self, action_point: ActionPoint, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void on(ActionPoint actionPoint, IEventDestination eventDestination, ExtensionOptions options)public void On(ActionPoint actionPoint, IEventDestination eventDestination, ExtensionOptions? options = null)func On(ActionPoint ActionPoint, EventDestination IEventDestination, Options ExtensionOptions)#3 parameters
Parameters
actionPointaction_pointactionPointactionPointActionPoint— The action point which triggers the event.eventDestinationevent_destinationeventDestinationeventDestinationEventDestination— The event that occurs during the extension.optionsoptionsoptionsoptionsOptions— Options for the extension.
onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_baking(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentBaking(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentBaking(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentBaking(EventDestination IEventDestination, Options ExtensionOptions)#2 parameters
Parameters
eventDestinationevent_destinationeventDestinationeventDestinationEventDestination— The event that occurs during the extension.optionsoptionsoptionsoptionsOptions— Options for the extension.
onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_complete(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentComplete(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentComplete(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentComplete(EventDestination IEventDestination, Options ExtensionOptions)#2 parameters
Parameters
eventDestinationevent_destinationeventDestinationeventDestinationEventDestination— The event that occurs during the extension.optionsoptionsoptionsoptionsOptions— Options for the extension.
onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_rolled_back(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentRolledBack(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentRolledBack(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentRolledBack(EventDestination IEventDestination, Options ExtensionOptions)#2 parameters
Parameters
eventDestinationevent_destinationeventDestinationeventDestinationEventDestination— The event that occurs during the extension.optionsoptionsoptionsoptionsOptions— Options for the extension.
onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_start(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentStart(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentStart(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentStart(EventDestination IEventDestination, Options ExtensionOptions)#2 parameters
Parameters
eventDestinationevent_destinationeventDestinationeventDestinationEventDestination— The event that occurs during the extension.optionsoptionsoptionsoptionsOptions— Options for the extension.
onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_step(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentStep(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentStep(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentStep(EventDestination IEventDestination, Options ExtensionOptions)#2 parameters
Parameters
eventDestinationevent_destinationeventDestinationeventDestinationEventDestination— The event that occurs during the extension.optionsoptionsoptionsoptionsOptions— Options for the extension.
preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef pre_create_hosted_configuration_version(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void preCreateHostedConfigurationVersion(IEventDestination eventDestination, ExtensionOptions options)public void PreCreateHostedConfigurationVersion(IEventDestination eventDestination, ExtensionOptions? options = null)func PreCreateHostedConfigurationVersion(EventDestination IEventDestination, Options ExtensionOptions)#2 parameters
Parameters
eventDestinationevent_destinationeventDestinationeventDestinationEventDestination— The event that occurs during the extension.optionsoptionsoptionsoptionsOptions— Options for the extension.
preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef pre_start_deployment(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void preStartDeployment(IEventDestination eventDestination, ExtensionOptions options)public void PreStartDeployment(IEventDestination eventDestination, ExtensionOptions? options = null)func PreStartDeployment(EventDestination IEventDestination, Options ExtensionOptions)#2 parameters
Parameters
eventDestinationevent_destinationeventDestinationeventDestinationEventDestination— The event that occurs during the extension.optionsoptionsoptionsoptionsOptions— Options for the extension.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.
1 parameter · returns
Parameters
mixinsmixinsmixinsmixinsMixins— The mixins to apply.
Returns: This construct for chaining