class SourcedConfiguration (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppConfig.SourcedConfiguration |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappconfig#SourcedConfiguration |
![]() | software.amazon.awscdk.services.appconfig.SourcedConfiguration |
![]() | aws_cdk.aws_appconfig.SourcedConfiguration |
![]() | aws-cdk-lib » aws_appconfig » SourcedConfiguration |
Implements
IConstruct
, IDependable
, IConfiguration
, IExtensible
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.',
});
Initializer
new SourcedConfiguration(scope: Construct, id: string, props: SourcedConfigurationProps)
Parameters
- scope
Construct
- id
string
- props
Sourced
Configuration Props
Construct Props
Name | Type | Description |
---|---|---|
application | IApplication | The application associated with the configuration. |
location | Configuration | The location where the configuration is stored. |
deploy | IEnvironment [] | The list of environments to deploy the configuration to. |
deployment | IKey | The deployment key of the configuration. |
deployment | IDeployment | The deployment strategy for the configuration. |
description? | string | The description of the configuration. |
name? | string | The name of the configuration. |
retrieval | IRole | The IAM role to retrieve the configuration. |
type? | Configuration | The type of configuration. |
validators? | IValidator [] | The validators for the configuration. |
version | string | The version number of the sourced configuration to deploy. |
application
Type:
IApplication
The application associated with the configuration.
location
Type:
Configuration
The location where the configuration is stored.
deployTo?
Type:
IEnvironment
[]
(optional, default: None.)
The list of environments to deploy the configuration to.
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.
deploymentKey?
Type:
IKey
(optional, default: None.)
The deployment key of the configuration.
deploymentStrategy?
Type:
IDeployment
(optional, default: A deployment strategy with the rollout strategy set to
RolloutStrategy.CANARY_10_PERCENT_20_MINUTES)
The deployment strategy for the configuration.
description?
Type:
string
(optional, default: No description.)
The description of the configuration.
name?
Type:
string
(optional, default: A name is generated.)
The name of the configuration.
retrievalRole?
Type:
IRole
(optional, default: Auto generated if location type is not ConfigurationSourceType.CODE_PIPELINE otherwise no role specified.)
The IAM role to retrieve the configuration.
type?
Type:
Configuration
(optional, default: ConfigurationType.FREEFORM)
The type of configuration.
validators?
Type:
IValidator
[]
(optional, default: No validators.)
The validators for the configuration.
versionNumber?
Type:
string
(optional, default: None.)
The version number of the sourced configuration to deploy.
If this is not specified, then there will be no deployment.
Properties
Name | Type | Description |
---|---|---|
application | IApplication | The application associated with the configuration. |
application | string | |
configuration | string | The Amazon Resource Name (ARN) of the configuration profile. |
configuration | string | The ID of the configuration profile. |
extensible | Extensible | |
location | Configuration | The location where the configuration is stored. |
node | Node | The tree node. |
deploy | IEnvironment [] | The environments to deploy to. |
deployment | IKey | The deployment key for the configuration. |
deployment | IDeployment | The deployment strategy for the configuration. |
description? | string | The description of the configuration. |
name? | string | The name of the configuration. |
retrieval | IRole | The IAM role to retrieve the configuration. |
source | IKey | The key to decrypt the configuration if applicable. |
type? | Configuration | The configuration type. |
validators? | IValidator [] | The validators for the configuration. |
version | string | The version number of the configuration to deploy. |
application
Type:
IApplication
The application associated with the configuration.
applicationId
Type:
string
configurationProfileArn
Type:
string
The Amazon Resource Name (ARN) of the configuration profile.
configurationProfileId
Type:
string
The ID of the configuration profile.
extensible
Type:
Extensible
location
Type:
Configuration
The location where the configuration is stored.
node
Type:
Node
The tree node.
deployTo?
Type:
IEnvironment
[]
(optional)
The environments to deploy to.
deploymentKey?
Type:
IKey
(optional)
The deployment key for the configuration.
deploymentStrategy?
Type:
IDeployment
(optional)
The deployment strategy for the configuration.
description?
Type:
string
(optional)
The description of the configuration.
name?
Type:
string
(optional)
The name of the configuration.
retrievalRole?
Type:
IRole
(optional)
The IAM role to retrieve the configuration.
sourceKey?
Type:
IKey
(optional)
The key to decrypt the configuration if applicable.
This key can be used when storing configuration in AWS Secrets Manager, Systems Manager Parameter Store, or Amazon S3.
type?
Type:
Configuration
(optional)
The configuration type.
validators?
Type:
IValidator
[]
(optional)
The validators for the configuration.
versionNumber?
Type:
string
(optional)
The version number of the configuration to deploy.
Methods
Name | Description |
---|---|
add | Adds an extension association to the configuration profile. |
at | Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application. |
on(actionPoint, eventDestination, options?) | Adds an extension defined by the action point and event destination and also creates an extension association to the configuration profile. |
on | Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the configuration profile. |
on | Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the configuration profile. |
on | Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the configuration profile. |
on | Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the configuration profile. |
on | Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the configuration profile. |
pre | Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the configuration profile. |
pre | Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the configuration profile. |
to | Returns a string representation of this construct. |
protected add | |
protected deploy |
addExtension(extension)
public addExtension(extension: IExtension): void
Parameters
- extension
IExtension
— The extension to create an association for.
Adds an extension association to the configuration profile.
atDeploymentTick(eventDestination, options?)
public atDeploymentTick(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.
on(actionPoint, eventDestination, options?)
public on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- actionPoint
Action
— The action point which triggers the event.Point - eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an extension defined by the action point and event destination and also creates an extension association to the configuration profile.
onDeploymentBaking(eventDestination, options?)
public onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the configuration profile.
onDeploymentComplete(eventDestination, options?)
public onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the configuration profile.
onDeploymentRolledBack(eventDestination, options?)
public onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the configuration profile.
onDeploymentStart(eventDestination, options?)
public onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the configuration profile.
onDeploymentStep(eventDestination, options?)
public onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the configuration profile.
preCreateHostedConfigurationVersion(eventDestination, options?)
public preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the configuration profile.
preStartDeployment(eventDestination, options?)
public preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the configuration profile.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
protected addExistingEnvironmentsToApplication()
protected addExistingEnvironmentsToApplication(): void
protected deployConfigToEnvironments()
protected deployConfigToEnvironments(): void