HostedConfiguration
A hosted configuration represents configuration stored in the AWS AppConfig hosted configuration store.
Example
declare const application: appconfig.Application;
declare const fn: lambda.Function;
new appconfig.HostedConfiguration(this, 'MyHostedConfiguration', {
application,
content: appconfig.ConfigurationContent.fromInlineText('This is my configuration content.'),
validators: [
appconfig.JsonSchemaValidator.fromFile('schema.json'),
appconfig.LambdaValidator.fromFunction(fn),
],
});
# application: appconfig.Application
# fn: lambda.Function
appconfig.HostedConfiguration(self, "MyHostedConfiguration",
application=application,
content=appconfig.ConfigurationContent.from_inline_text("This is my configuration content."),
validators=[
appconfig.JsonSchemaValidator.from_file("schema.json"),
appconfig.LambdaValidator.from_function(fn)
]
)
Application application;
Function fn;
HostedConfiguration.Builder.create(this, "MyHostedConfiguration")
.application(application)
.content(ConfigurationContent.fromInlineText("This is my configuration content."))
.validators(List.of(JsonSchemaValidator.fromFile("schema.json"), LambdaValidator.fromFunction(fn)))
.build();
// Install: dotnet add package Amazon.CDK.Lib
Application application;
Function fn;
new HostedConfiguration(this, "MyHostedConfiguration", new HostedConfigurationProps {
Application = application,
Content = ConfigurationContent.FromInlineText("This is my configuration content."),
Validators = new [] { JsonSchemaValidator.FromFile("schema.json"), LambdaValidator.FromFunction(fn) }
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var application Application
var fn Function
appconfig.NewHostedConfiguration(this, jsii.String("MyHostedConfiguration"), &HostedConfigurationProps{
Application: Application,
Content: appconfig.ConfigurationContent_FromInlineText(jsii.String("This is my configuration content.")),
Validators: []IValidator{
appconfig.JsonSchemaValidator_FromFile(jsii.String("schema.json")),
appconfig.LambdaValidator_FromFunction(fn),
},
})
Initializer
new HostedConfiguration(scope: Construct, id: string, props: HostedConfigurationProps)
HostedConfiguration(scope: Construct, id: str, props: HostedConfigurationProps)
new HostedConfiguration(Construct scope, String id, HostedConfigurationProps props)
new HostedConfiguration(Construct scope, string id, HostedConfigurationProps props)
NewHostedConfiguration(Scope Construct, Id *string, Props HostedConfigurationProps)
Construct Props
applicationIApplicationapplicationIApplicationapplicationIApplicationApplicationIApplicationApplicationIApplicationrequired#contentConfigurationContentcontentConfigurationContentcontentConfigurationContentContentConfigurationContentContentConfigurationContentrequired#deletionProtectionCheckoptionalDeletionProtectionCheckdeletion_protection_checkoptionalDeletionProtectionCheckdeletionProtectionCheckoptionalDeletionProtectionCheckDeletionProtectionCheckoptionalDeletionProtectionCheckDeletionProtectionCheckoptionalDeletionProtectionCheck#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.
deploymentKeyoptionalIKeydeployment_keyoptionalIKeydeploymentKeyoptionalIKeyDeploymentKeyoptionalIKeyDeploymentKeyoptionalIKey= None.#deploymentStrategyoptionalIDeploymentStrategyRefdeployment_strategyoptionalIDeploymentStrategyRefdeploymentStrategyoptionalIDeploymentStrategyRefDeploymentStrategyoptionalIDeploymentStrategyRefDeploymentStrategyoptionalIDeploymentStrategyRef#Default: A deployment strategy with the rollout strategy set to RolloutStrategy.CANARY_10_PERCENT_20_MINUTES
deployTooptionalIEnvironment[]deploy_tooptionaltyping.List[IEnvironment]deployTooptionalList<IEnvironment>DeployTooptionalIEnvironment[]DeployTooptional*[]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.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#Default: No description.
kmsKeyoptionalIKeyRefkms_keyoptionalIKeyRefkmsKeyoptionalIKeyRefKmsKeyoptionalIKeyRefKmsKeyoptionalIKeyRef= None#latestVersionNumberoptionalnumberlatest_version_numberoptionalint | floatlatestVersionNumberoptionalNumberLatestVersionNumberoptionaldoubleLatestVersionNumberoptional*float64= None.#Default: A name is generated.
typeoptionalConfigurationTypetypeoptionalConfigurationTypetypeoptionalConfigurationTypeTypeoptionalConfigurationTypeTypeoptionalConfigurationType= ConfigurationType.FREEFORM#validatorsoptionalIValidator[]validatorsoptionaltyping.List[IValidator]validatorsoptionalList<IValidator>ValidatorsoptionalIValidator[]Validatorsoptional*[]IValidator#Default: No validators.
versionLabeloptionalstringversion_labeloptionalstrversionLabeloptionalStringVersionLabeloptionalstringVersionLabeloptional*string= None.#Properties
applicationIApplicationapplicationIApplicationapplicationIApplicationApplicationIApplicationApplicationIApplicationrequired#configurationProfileArnstringconfiguration_profile_arnstrconfigurationProfileArnStringConfigurationProfileArnstringConfigurationProfileArn*stringrequired#configurationProfileIdstringconfiguration_profile_idstrconfigurationProfileIdStringConfigurationProfileIdstringConfigurationProfileId*stringrequired#contentTypemay be undefinedstringcontent_typemay be undefinedstrcontentTypemay be undefinedStringContentTypemay be undefinedstringContentTypemay be undefined*string#For an up-to-date list of valid MIME types, see: https://www.iana.org/assignments/media-types/media-types.xhtml
deploymentKeymay be undefinedIKeydeployment_keymay be undefinedIKeydeploymentKeymay be undefinedIKeyDeploymentKeymay be undefinedIKeyDeploymentKeymay be undefinedIKey#deploymentStrategymay be undefinedIDeploymentStrategydeployment_strategymay be undefinedIDeploymentStrategydeploymentStrategymay be undefinedIDeploymentStrategyDeploymentStrategymay be undefinedIDeploymentStrategyDeploymentStrategymay be undefinedIDeploymentStrategy#deployTomay be undefinedIEnvironment[]deploy_tomay be undefinedtyping.List[IEnvironment]deployTomay be undefinedList<IEnvironment>DeployTomay be undefinedIEnvironment[]DeployTomay be undefined*[]IEnvironment#descriptionmay be undefinedstringdescriptionmay be undefinedstrdescriptionmay be undefinedStringDescriptionmay be undefinedstringDescriptionmay be undefined*string#hostedConfigurationVersionArnstringhosted_configuration_version_arnstrhostedConfigurationVersionArnStringHostedConfigurationVersionArnstringHostedConfigurationVersionArn*stringrequired#latestVersionNumbermay be undefinednumberlatest_version_numbermay be undefinedint | floatlatestVersionNumbermay be undefinedNumberLatestVersionNumbermay be undefineddoubleLatestVersionNumbermay be undefined*float64#namemay be undefinedstringnamemay be undefinedstrnamemay be undefinedStringNamemay be undefinedstringNamemay be undefined*string#typemay be undefinedConfigurationTypetypemay be undefinedConfigurationTypetypemay be undefinedConfigurationTypeTypemay be undefinedConfigurationTypeTypemay be undefinedConfigurationType#validatorsmay be undefinedIValidator[]validatorsmay be undefinedtyping.List[IValidator]validatorsmay be undefinedList<IValidator>Validatorsmay be undefinedIValidator[]Validatorsmay be undefined*[]IValidator#versionLabelmay be undefinedstringversion_labelmay be undefinedstrversionLabelmay be undefinedStringVersionLabelmay be undefinedstringVersionLabelmay be undefined*string#versionNumbermay be undefinedstringversion_numbermay be undefinedstrversionNumbermay be undefinedStringVersionNumbermay be undefinedstringVersionNumbermay be undefined*string#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