class ApplicationAssociator (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Servicecatalogappregistry.Alpha.ApplicationAssociator |
Go | github.com/aws/aws-cdk-go/awscdkservicecatalogappregistryalpha/v2#ApplicationAssociator |
Java | software.amazon.awscdk.services.servicecatalogappregistry.alpha.ApplicationAssociator |
Python | aws_cdk.aws_servicecatalogappregistry_alpha.ApplicationAssociator |
TypeScript (source) | @aws-cdk/aws-servicecatalogappregistry-alpha ยป ApplicationAssociator |
Implements
IConstruct, IDependable
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 Pipeline stack, stage underneath the pipeline will not automatically be associated and
needs to be associated separately.
If cross account stack is detected and associateCrossAccountStacks in TargetApplicationOptions is true,
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.
Example
import * as cdk from "aws-cdk-lib";
const app = new App();
const associatedApp = new appreg.ApplicationAssociator(app, 'AssociatedApplication', {
applications: [appreg.TargetApplication.createApplicationStack({
applicationName: 'MyAssociatedApplication',
// 'Application containing stacks deployed via CDK.' is the default
applicationDescription: 'Associated Application description',
stackName: 'MyAssociatedApplicationStack',
// AWS Account and Region that are implied by the current CLI configuration is the default
env: { account: '123456789012', region: 'us-east-1' },
})],
});
// Associate application to the attribute group.
associatedApp.appRegistryApplication.addAttributeGroup('MyAttributeGroup' , {
attributeGroupName: 'MyAttributeGroupName',
description: 'Test attribute group',
attributes: {},
});
Initializer
new ApplicationAssociator(scope: App, id: string, props: ApplicationAssociatorProps)
Parameters
- scope
App - id
string - props
ApplicationAssociator Props
Construct Props
| Name | Type | Description |
|---|---|---|
| applications | Target[] | Application associator properties. |
applications
Type:
Target[]
Application associator properties.
Properties
| Name | Type | Description |
|---|---|---|
| app | IApplication | Get the AppRegistry application. |
| node | Node | The tree node. |
appRegistryApplication
Type:
IApplication
Get the AppRegistry application.
node
Type:
Node
The tree node.
Methods
| Name | Description |
|---|---|
| associate | Associate this application with the given stage. |
| is | Validates if a stage is already associated to the application. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
associateStage(stage)
public associateStage(stage: Stage): Stage
Parameters
- stage
Stage
Returns
Associate this application with the given stage.
isStageAssociated(stage)
public isStageAssociated(stage: Stage): boolean
Parameters
- stage
Stage
Returns
boolean
Validates if a stage is already associated to the application.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
Parameters
- mixins
IMixinโ The mixins to apply.
Returns
Applies one or more mixins to this construct.
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.

.NET
Go
Java
Python
TypeScript (