HostedConfiguration

class aws_cdk.aws_appconfig.HostedConfiguration(scope, id, *, content, latest_version_number=None, version_label=None, application, deployment_key=None, deployment_strategy=None, deploy_to=None, description=None, name=None, type=None, validators=None)

Bases: Construct

A hosted configuration represents configuration stored in the AWS AppConfig hosted configuration store.

ExampleMetadata:

infused

Example:

app = appconfig.Application(self, "MyApp")
env = appconfig.Environment(self, "MyEnv",
    application=app
)

appconfig.HostedConfiguration(self, "MyHostedConfig",
    application=app,
    deploy_to=[env],
    content=appconfig.ConfigurationContent.from_inline_text("This is my configuration content.")
)
Parameters:
  • scope (Construct) –

  • id (str) –

  • content (ConfigurationContent) – The content of the hosted configuration.

  • latest_version_number (Union[int, float, None]) – The latest version number of the hosted configuration. Default: - None.

  • version_label (Optional[str]) – The version label of the hosted configuration. Default: - None.

  • application (IApplication) – The application associated with the configuration.

  • deployment_key (Optional[IKey]) – The deployment key of the configuration. Default: - None.

  • deployment_strategy (Optional[IDeploymentStrategy]) – The deployment strategy for the configuration. Default: - A deployment strategy with the rollout strategy set to RolloutStrategy.CANARY_10_PERCENT_20_MINUTES

  • deploy_to (Optional[Sequence[IEnvironment]]) – 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. Default: - None.

  • description (Optional[str]) – The description of the configuration. Default: - No description.

  • name (Optional[str]) – The name of the configuration. Default: - A name is generated.

  • type (Optional[ConfigurationType]) – The type of configuration. Default: ConfigurationType.FREEFORM

  • validators (Optional[Sequence[IValidator]]) – The validators for the configuration. Default: - No validators.

Methods

add_extension(extension)

Adds an extension association to the configuration profile.

Parameters:

extension (IExtension) – The extension to create an association for.

Return type:

None

on(action_point, event_destination, *, description=None, extension_name=None, latest_version_number=None, parameters=None)

Adds an extension defined by the action point and event destination and also creates an extension association to the configuration profile.

Parameters:
  • action_point (ActionPoint) – The action point which triggers the event.

  • event_destination (IEventDestination) – The event that occurs during the extension.

  • description (Optional[str]) – A description of the extension. Default: - No description.

  • extension_name (Optional[str]) – The name of the extension. Default: - A name is generated.

  • latest_version_number (Union[int, float, None]) – The latest version number of the extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field. Default: - None.

  • parameters (Optional[Sequence[Parameter]]) – The parameters accepted for the extension. Default: - None.

Return type:

None

on_deployment_baking(event_destination, *, description=None, extension_name=None, latest_version_number=None, parameters=None)

Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the configuration profile.

Parameters:
  • event_destination (IEventDestination) – The event that occurs during the extension.

  • description (Optional[str]) – A description of the extension. Default: - No description.

  • extension_name (Optional[str]) – The name of the extension. Default: - A name is generated.

  • latest_version_number (Union[int, float, None]) – The latest version number of the extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field. Default: - None.

  • parameters (Optional[Sequence[Parameter]]) – The parameters accepted for the extension. Default: - None.

Return type:

None

on_deployment_complete(event_destination, *, description=None, extension_name=None, latest_version_number=None, parameters=None)

Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the configuration profile.

Parameters:
  • event_destination (IEventDestination) – The event that occurs during the extension.

  • description (Optional[str]) – A description of the extension. Default: - No description.

  • extension_name (Optional[str]) – The name of the extension. Default: - A name is generated.

  • latest_version_number (Union[int, float, None]) – The latest version number of the extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field. Default: - None.

  • parameters (Optional[Sequence[Parameter]]) – The parameters accepted for the extension. Default: - None.

Return type:

None

on_deployment_rolled_back(event_destination, *, description=None, extension_name=None, latest_version_number=None, parameters=None)

Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the configuration profile.

Parameters:
  • event_destination (IEventDestination) – The event that occurs during the extension.

  • description (Optional[str]) – A description of the extension. Default: - No description.

  • extension_name (Optional[str]) – The name of the extension. Default: - A name is generated.

  • latest_version_number (Union[int, float, None]) – The latest version number of the extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field. Default: - None.

  • parameters (Optional[Sequence[Parameter]]) – The parameters accepted for the extension. Default: - None.

Return type:

None

on_deployment_start(event_destination, *, description=None, extension_name=None, latest_version_number=None, parameters=None)

Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the configuration profile.

Parameters:
  • event_destination (IEventDestination) – The event that occurs during the extension.

  • description (Optional[str]) – A description of the extension. Default: - No description.

  • extension_name (Optional[str]) – The name of the extension. Default: - A name is generated.

  • latest_version_number (Union[int, float, None]) – The latest version number of the extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field. Default: - None.

  • parameters (Optional[Sequence[Parameter]]) – The parameters accepted for the extension. Default: - None.

Return type:

None

on_deployment_step(event_destination, *, description=None, extension_name=None, latest_version_number=None, parameters=None)

Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the configuration profile.

Parameters:
  • event_destination (IEventDestination) – The event that occurs during the extension.

  • description (Optional[str]) – A description of the extension. Default: - No description.

  • extension_name (Optional[str]) – The name of the extension. Default: - A name is generated.

  • latest_version_number (Union[int, float, None]) – The latest version number of the extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field. Default: - None.

  • parameters (Optional[Sequence[Parameter]]) – The parameters accepted for the extension. Default: - None.

Return type:

None

pre_create_hosted_configuration_version(event_destination, *, description=None, extension_name=None, latest_version_number=None, parameters=None)

Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the configuration profile.

Parameters:
  • event_destination (IEventDestination) – The event that occurs during the extension.

  • description (Optional[str]) – A description of the extension. Default: - No description.

  • extension_name (Optional[str]) – The name of the extension. Default: - A name is generated.

  • latest_version_number (Union[int, float, None]) – The latest version number of the extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field. Default: - None.

  • parameters (Optional[Sequence[Parameter]]) – The parameters accepted for the extension. Default: - None.

Return type:

None

pre_start_deployment(event_destination, *, description=None, extension_name=None, latest_version_number=None, parameters=None)

Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the configuration profile.

Parameters:
  • event_destination (IEventDestination) – The event that occurs during the extension.

  • description (Optional[str]) – A description of the extension. Default: - No description.

  • extension_name (Optional[str]) – The name of the extension. Default: - A name is generated.

  • latest_version_number (Union[int, float, None]) – The latest version number of the extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field. Default: - None.

  • parameters (Optional[Sequence[Parameter]]) – The parameters accepted for the extension. Default: - None.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Attributes

application

The application associated with the configuration.

configuration_profile_arn

The Amazon Resource Name (ARN) of the configuration profile.

configuration_profile_id

The ID of the configuration profile.

content

The content of the hosted configuration.

content_type

The content type of the hosted configuration.

deploy_to

The environments to deploy to.

deployment_key

The deployment key for the configuration.

deployment_strategy

The deployment strategy for the configuration.

description

The description of the configuration.

hosted_configuration_version_arn

The Amazon Resource Name (ARN) of the hosted configuration version.

latest_version_number

The latest version number of the hosted configuration.

name

The name of the configuration.

node

The tree node.

type

The configuration type.

validators

The validators for the configuration.

version_label

The version label of the hosted configuration.

version_number

The version number of the hosted configuration.

Static Methods

classmethod is_construct(x)

Checks if x is a construct.

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:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.