ApplicationAssociator
- class aws_cdk.aws_servicecatalogappregistry_alpha.ApplicationAssociator(scope, id, *, applications)
Bases:
Construct(experimental) An AppRegistry construct to automatically create an application with the given name and description.
The application name must be unique at the account level per region and it’s immutable. This construct will automatically associate all stacks in the given scope, however in case of a
Pipelinestack, stage underneath the pipeline will not automatically be associated and needs to be associated separately.If cross account stack is detected and
associateCrossAccountStacksinTargetApplicationOptionsistrue, then the application will automatically be shared with the consumer accounts to allow associations. Otherwise, the application will not be shared. Cross account feature will only work for non environment agnostic stacks.- Stability:
experimental
- ExampleMetadata:
infused
Example:
import aws_cdk as cdk app = App() associated_app = appreg.ApplicationAssociator(app, "AssociatedApplication", applications=[appreg.TargetApplication.create_application_stack( application_name="MyAssociatedApplication", # 'Application containing stacks deployed via CDK.' is the default application_description="Associated Application description", stack_name="MyAssociatedApplicationStack", # AWS Account and Region that are implied by the current CLI configuration is the default env=cdk.Environment(account="123456789012", region="us-east-1") )] ) # Associate application to the attribute group. associated_app.app_registry_application.add_attribute_group("MyAttributeGroup", attribute_group_name="MyAttributeGroupName", description="Test attribute group", attributes={} )
- Parameters:
scope (
App)id (
str)applications (
Sequence[TargetApplication]) – (experimental) Application associator properties. Default: - Empty array.
- Stability:
experimental
Methods
- associate_stage(stage)
(experimental) Associate this application with the given stage.
- is_stage_associated(stage)
(experimental) Validates if a stage is already associated to the application.
- Parameters:
stage (
Stage)- Stability:
experimental
- Return type:
bool
- to_string()
Returns a string representation of this construct.
- Return type:
str
Attributes
- app_registry_application
(experimental) Get the AppRegistry application.
- Stability:
experimental
- node
The tree node.
Static Methods
- classmethod is_construct(x)
Checks if
xis a construct.Use this method instead of
instanceofto properly detectConstructinstances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructslibrary on disk are seen as independent, completely different libraries. As a consequence, the classConstructin each copy of theconstructslibrary is seen as a different class, and an instance of one class will not test asinstanceofthe other class.npm installwill not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructslibrary can be accidentally installed, andinstanceofwill behave unpredictably. It is safest to avoid usinginstanceof, and using this type-testing method instead.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsConstruct.