@aws-cdk_aws-servicecatalogappregistry-alpha.ApplicationAssociator

class ApplicationAssociator (construct) ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Servicecatalogappregistry.Alpha.ApplicationAssociator
Gogithub.com/aws/aws-cdk-go/awscdkservicecatalogappregistryalpha/v2#ApplicationAssociator
Javasoftware.amazon.awscdk.services.servicecatalogappregistry.alpha.ApplicationAssociator
Pythonaws_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 ApplicationAssociatorProps

Construct Props

NameTypeDescription
applications๐Ÿ”นTargetApplication[]Application associator properties.

applications๐Ÿ”น

Type: TargetApplication[]

Application associator properties.

Properties

NameTypeDescription
appRegistryApplication๐Ÿ”นIApplicationGet the AppRegistry application.
node๐Ÿ”นNodeThe tree node.

appRegistryApplication๐Ÿ”น

Type: IApplication

Get the AppRegistry application.


node๐Ÿ”น

Type: Node

The tree node.

Methods

NameDescription
associateStage(stage)๐Ÿ”นAssociate this application with the given stage.
isStageAssociated(stage)๐Ÿ”นValidates if a stage is already associated to the application.
toString()๐Ÿ”นReturns a string representation of this construct.

associateStage(stage)๐Ÿ”น

public associateStage(stage: Stage): Stage

Parameters

  • stage Stage

Returns

  • Stage

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.