awscdkservicecatalogappregistryalpha

package module
v2.222.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

README

AWS ServiceCatalogAppRegistry Construct Library

---

The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


AWS Service Catalog App Registry enables organizations to create and manage repositories of applications and associated resources.

Table Of Contents

The @aws-cdk/aws-servicecatalogappregistry-alpha package contains resources that enable users to automate governance and management of their AWS resources at scale.

import appreg "github.com/aws/aws-cdk-go/awscdkservicecatalogappregistryalpha"

Application

An AppRegistry application enables you to define your applications and associated resources. The application name must be unique at the account level and it's immutable.

application := appreg.NewApplication(this, jsii.String("MyFirstApplication"), &ApplicationProps{
	ApplicationName: jsii.String("MyFirstApplicationName"),
	Description: jsii.String("description for my application"),
})

An application that has been created outside of the stack can be imported into your CDK app. Applications can be imported by their ARN via the Application.fromApplicationArn() API:

importedApplication := appreg.Application_FromApplicationArn(this, jsii.String("MyImportedApplication"), jsii.String("arn:aws:servicecatalog:us-east-1:012345678910:/applications/0aqmvxvgmry0ecc4mjhwypun6i"))

Application-Associator

ApplicationAssociator defines an AppRegistry application to contain all the stacks in deployed through your cdk package. This helps to manage all the cdk deployed resources.

Create a new application to associate all the stacks in the cdk.App scope

If you want to create an Application named MyAssociatedApplication in account 123456789012 and region us-east-1 and want to associate all stacks in the App scope to MyAssociatedApplication, then use as shown in the example below:

app := awscdk.NewApp()
associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			ApplicationName: jsii.String("MyAssociatedApplication"),
			// 'Application containing stacks deployed via CDK.' is the default
			ApplicationDescription: jsii.String("Associated Application description"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
			// AWS Account and Region that are implied by the current CLI configuration is the default
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})

This will create a stack MyAssociatedApplicationStack containing an application MyAssociatedApplication with the TagKey as managedBy and TagValue as CDK_Application_Associator.

By default, the stack will have System Managed Application Manager console URL as its output for the application created. If you want to remove the output, then use as shown in the example below:

app := awscdk.NewApp()
associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			ApplicationName: jsii.String("MyAssociatedApplication"),
			// 'Application containing stacks deployed via CDK.' is the default
			ApplicationDescription: jsii.String("Associated Application description"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
			// Disables emitting Application Manager url as output
			EmitApplicationManagerUrlAsOutput: jsii.Boolean(false),
			// AWS Account and Region that are implied by the current CLI configuration is the default
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})
Import existing application to associate all the stacks in the cdk.App scope

If you want to re-use an existing Application with ARN: arn:aws:servicecatalog:us-east-1:123456789012:/applications/applicationId and want to associate all stacks in the App scope to your imported application, then use as shown in the example below:

app := awscdk.NewApp()
associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_ExistingApplicationFromArn(&ExistingTargetApplicationOptions{
			ApplicationArnValue: jsii.String("arn:aws:servicecatalog:us-east-1:123456789012:/applications/applicationId"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
		}),
	},
})
Associate attribute group to the application used by ApplicationAssociator

If you want to associate an Attribute Group with application created by ApplicationAssociator, then use as shown in the example below:

import cdk "github.com/aws/aws-cdk-go/awscdk"


app := awscdk.NewApp()

associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			ApplicationName: jsii.String("MyAssociatedApplication"),
			// 'Application containing stacks deployed via CDK.' is the default
			ApplicationDescription: jsii.String("Associated Application description"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
			// AWS Account and Region that are implied by the current CLI configuration is the default
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})

// Associate application to the attribute group.
associatedApp.appRegistryApplication.AddAttributeGroup(jsii.String("MyAttributeGroup"), &AttributeGroupAssociationProps{
	AttributeGroupName: jsii.String("MyAttributeGroupName"),
	Description: jsii.String("Test attribute group"),
	Attributes: map[string]interface{}{
	},
})
Associate stacks deployed by CDK pipelines

If you are using CDK Pipelines to deploy your application, the application stacks will be inside Stages, and ApplicationAssociator will not be able to find them. Call associateStage on each Stage object before adding it to the Pipeline, as shown in the example below:

import "github.com/aws/aws-cdk-go/awscdk"
import codepipeline "github.com/aws/aws-cdk-go/awscdk"
import codecommit "github.com/aws/aws-cdk-go/awscdk"
var repo Repository
var pipeline CodePipeline
var beta Stage

type applicationPipelineStack struct {
	Stack
}

func newApplicationPipelineStack(scope App, id *string, props applicationPipelineStackProps) *applicationPipelineStack {
	this := &applicationPipelineStack{}
	cdk.NewStack_Override(this, scope, id, props)

	//associate the stage to application associator.
	*props.application.AssociateStage(beta)
	pipeline.AddStage(beta)
	return this
}

type applicationPipelineStackProps struct {
	StackProps
	application ApplicationAssociator
}

app := awscdk.NewApp()
associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			ApplicationName: jsii.String("MyPipelineAssociatedApplication"),
			StackName: jsii.String("MyPipelineAssociatedApplicationStack"),
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})

cdkPipeline := NewApplicationPipelineStack(app, jsii.String("CDKApplicationPipelineStack"), &applicationPipelineStackProps{
	application: associatedApp,
	env: &Environment{
		Account: jsii.String("123456789012"),
		Region: jsii.String("us-east-1"),
	},
})
Associate cross-account stack

By default, ApplicationAssociator will not perform cross-account stack associations with the target Application, to avoid deployment failures for accounts which have not been setup for cross-account associations. To enable cross-account stack associations, make sure all accounts are in the same organization as the target Application's account and that resource sharing is enabled within the organization. If you wish to turn on cross-account sharing and associations, set the associateCrossAccountStacks field to true, as shown in the example below:

app := awscdk.NewApp()
associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			AssociateCrossAccountStacks: jsii.Boolean(true),
			ApplicationName: jsii.String("MyAssociatedApplication"),
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})
Associate cross-region stack

Currently, cross-region stack association is not supported.

Attribute Group

An AppRegistry attribute group acts as a container for user-defined attributes for an application. Metadata is attached in a machine-readable format to integrate with automated workflows and tools. The attribute group name must be unique at the account level and it's immutable.

attributeGroup := appreg.NewAttributeGroup(this, jsii.String("MyFirstAttributeGroup"), &AttributeGroupProps{
	AttributeGroupName: jsii.String("MyFirstAttributeGroupName"),
	Description: jsii.String("description for my attribute group"),
	 // the description is optional,
	Attributes: map[string]interface{}{
		"project": jsii.String("foo"),
		"team": []interface{}{
			jsii.String("member1"),
			jsii.String("member2"),
			jsii.String("member3"),
		},
		"public": jsii.Boolean(false),
		"stages": map[string]*string{
			"alpha": jsii.String("complete"),
			"beta": jsii.String("incomplete"),
			"release": jsii.String("not started"),
		},
	},
})

An attribute group that has been created outside of the stack can be imported into your CDK app. Attribute groups can be imported by their ARN via the AttributeGroup.fromAttributeGroupArn() API:

importedAttributeGroup := appreg.AttributeGroup_FromAttributeGroupArn(this, jsii.String("MyImportedAttrGroup"), jsii.String("arn:aws:servicecatalog:us-east-1:012345678910:/attribute-groups/0aqmvxvgmry0ecc4mjhwypun6i"))

Associations

You can associate your appregistry application with attribute groups and resources. Resources are CloudFormation stacks that you can associate with an application to group relevant stacks together to enable metadata rich insights into your applications and resources. A Cloudformation stack can only be associated with one appregistry application. If a stack is associated with multiple applications in your app or is already associated with one, CDK will fail at deploy time.

Associating application with a new attribute group

You can create and associate an attribute group to an application with the addAttributeGroup() API:

var application Application
var attributeGroup AttributeGroup

application.addAttributeGroup(jsii.String("MyAttributeGroupId"), &AttributeGroupAssociationProps{
	AttributeGroupName: jsii.String("MyAttributeGroupName"),
	Description: jsii.String("Test attribute group"),
	Attributes: map[string]interface{}{
	},
})
Associating an attribute group with application

You can associate an application with an attribute group with associateWith:

var application Application
var attributeGroup AttributeGroup

attributeGroup.associateWith(application)
Associating application with a Stack

You can associate a stack with an application with the associateApplicationWithStack() API:

var application Application
app := awscdk.NewApp()
myStack := awscdk.Newstack(app, jsii.String("MyStack"))
application.associateApplicationWithStack(myStack)

Sharing

You can share your AppRegistry applications and attribute groups with AWS Organizations, Organizational Units (OUs), AWS accounts within an organization, as well as IAM roles and users. AppRegistry requires that AWS Organizations is enabled in an account before deploying a share of an application or attribute group.

Sharing an application
import iam "github.com/aws/aws-cdk-go/awscdk"
var application Application
var myRole IRole
var myUser IUser

application.shareApplication(jsii.String("MyShareId"), &ShareOptions{
	Name: jsii.String("MyShare"),
	Accounts: []*string{
		jsii.String("123456789012"),
	},
	OrganizationArns: []*string{
		jsii.String("arn:aws:organizations::123456789012:organization/o-my-org-id"),
	},
	Roles: []IRole{
		myRole,
	},
	Users: []IUser{
		myUser,
	},
})

E.g., sharing an application with multiple accounts and allowing the accounts to associate resources to the application.

import iam "github.com/aws/aws-cdk-go/awscdk"
var application Application

application.shareApplication(jsii.String("MyShareId"), &ShareOptions{
	Name: jsii.String("MyShare"),
	Accounts: []*string{
		jsii.String("123456789012"),
		jsii.String("234567890123"),
	},
	SharePermission: appreg.SharePermission_ALLOW_ACCESS,
})
Sharing an attribute group
import iam "github.com/aws/aws-cdk-go/awscdk"
var attributeGroup AttributeGroup
var myRole IRole
var myUser IUser

attributeGroup.shareAttributeGroup(jsii.String("MyShareId"), &ShareOptions{
	Name: jsii.String("MyShare"),
	Accounts: []*string{
		jsii.String("123456789012"),
	},
	OrganizationArns: []*string{
		jsii.String("arn:aws:organizations::123456789012:organization/o-my-org-id"),
	},
	Roles: []IRole{
		myRole,
	},
	Users: []IUser{
		myUser,
	},
})

E.g., sharing an application with multiple accounts and allowing the accounts to associate applications to the attribute group.

import iam "github.com/aws/aws-cdk-go/awscdk"
var attributeGroup AttributeGroup

attributeGroup.shareAttributeGroup(jsii.String("MyShareId"), &ShareOptions{
	Name: jsii.String("MyShare"),
	Accounts: []*string{
		jsii.String("123456789012"),
		jsii.String("234567890123"),
	},
	SharePermission: appreg.SharePermission_ALLOW_ACCESS,
})

Documentation

Overview

The CDK Construct Library for AWS::ServiceCatalogAppRegistry

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationAssociator_IsConstruct

func ApplicationAssociator_IsConstruct(x interface{}) *bool

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.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func Application_IsConstruct

func Application_IsConstruct(x interface{}) *bool

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.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func Application_IsOwnedResource

func Application_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func Application_IsResource

func Application_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Application_PROPERTY_INJECTION_ID

func Application_PROPERTY_INJECTION_ID() *string

func AttributeGroup_IsConstruct

func AttributeGroup_IsConstruct(x interface{}) *bool

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.

Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.

func AttributeGroup_IsOwnedResource

func AttributeGroup_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise. Experimental.

func AttributeGroup_IsResource

func AttributeGroup_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func AttributeGroup_PROPERTY_INJECTION_ID

func AttributeGroup_PROPERTY_INJECTION_ID() *string

func NewApplicationAssociator_Override

func NewApplicationAssociator_Override(a ApplicationAssociator, scope awscdk.App, id *string, props *ApplicationAssociatorProps)

Experimental.

func NewApplication_Override

func NewApplication_Override(a Application, scope constructs.Construct, id *string, props *ApplicationProps)

Experimental.

func NewAttributeGroup_Override

func NewAttributeGroup_Override(a AttributeGroup, scope constructs.Construct, id *string, props *AttributeGroupProps)

Experimental.

func NewTargetApplication_Override

func NewTargetApplication_Override(t TargetApplication)

Experimental.

Types

type Application

type Application interface {
	awscdk.Resource
	IApplication
	// The ARN of the application.
	// Experimental.
	ApplicationArn() *string
	// The ID of the application.
	// Experimental.
	ApplicationId() *string
	// Application manager URL for the Application.
	// Experimental.
	ApplicationManagerUrl() *string
	// The name of the application.
	// Experimental.
	ApplicationName() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed in a Stack (those created by
	// creating new class instances like `new Role()`, `new Bucket()`, etc.), this
	// is always the same as the environment of the stack they belong to.
	//
	// For referenced resources (those obtained from referencing methods like
	// `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
	// different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Create an attribute group and associate this application with the created attribute group.
	// Experimental.
	AddAttributeGroup(id *string, attributeGroupProps *AttributeGroupAssociationProps) IAttributeGroup
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Associate all stacks present in construct's aspect with application, including cross-account stacks.
	//
	// NOTE: This method won't automatically register stacks under pipeline stages,
	// and requires association of each pipeline stage by calling this method with stage Construct.
	// Experimental.
	AssociateAllStacksInScope(construct constructs.Construct)
	// Associate stack with the application in the stack passed as parameter.
	//
	// A stack can only be associated with one application.
	// Experimental.
	AssociateApplicationWithStack(stack awscdk.Stack)
	// Associate an attribute group with application If the attribute group is already associated, it will ignore duplicate request.
	// Deprecated: Use `AttributeGroup.associateWith` instead.
	AssociateAttributeGroup(attributeGroup IAttributeGroup)
	// Associate a stack with the application If the resource is already associated, it will ignore duplicate request.
	//
	// A stack can only be associated with one application.
	// Deprecated: Use `associateApplicationWithStack` instead.
	AssociateStack(stack awscdk.Stack)
	// Experimental.
	GeneratePhysicalName() *string
	// Create a unique id.
	// Experimental.
	GenerateUniqueHash(resourceAddress *string) *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Share an application with accounts, organizations and OUs, and IAM roles and users.
	//
	// The application will become available to end users within those principals.
	// Experimental.
	ShareApplication(id *string, shareOptions *ShareOptions)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A Service Catalog AppRegistry Application.

Example:

application := appreg.NewApplication(this, jsii.String("MyFirstApplication"), &ApplicationProps{
	ApplicationName: jsii.String("MyFirstApplicationName"),
	Description: jsii.String("description for my application"),
})

Experimental.

func NewApplication

func NewApplication(scope constructs.Construct, id *string, props *ApplicationProps) Application

Experimental.

type ApplicationAssociator

type ApplicationAssociator interface {
	constructs.Construct
	// Get the AppRegistry application.
	// Experimental.
	AppRegistryApplication() IApplication
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Associate this application with the given stage.
	// Experimental.
	AssociateStage(stage awscdk.Stage) awscdk.Stage
	// Validates if a stage is already associated to the application.
	// Experimental.
	IsStageAssociated(stage awscdk.Stage) *bool
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

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 cdk "github.com/aws/aws-cdk-go/awscdk"

app := awscdk.NewApp()

associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			ApplicationName: jsii.String("MyAssociatedApplication"),
			// 'Application containing stacks deployed via CDK.' is the default
			ApplicationDescription: jsii.String("Associated Application description"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
			// AWS Account and Region that are implied by the current CLI configuration is the default
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})

// Associate application to the attribute group.
associatedApp.appRegistryApplication.AddAttributeGroup(jsii.String("MyAttributeGroup"), &AttributeGroupAssociationProps{
	AttributeGroupName: jsii.String("MyAttributeGroupName"),
	Description: jsii.String("Test attribute group"),
	Attributes: map[string]interface{}{
	},
})

Experimental.

func NewApplicationAssociator

func NewApplicationAssociator(scope awscdk.App, id *string, props *ApplicationAssociatorProps) ApplicationAssociator

Experimental.

type ApplicationAssociatorProps

type ApplicationAssociatorProps struct {
	// Application associator properties.
	// Default: - Empty array.
	//
	// Experimental.
	Applications *[]TargetApplication `field:"required" json:"applications" yaml:"applications"`
}

Properties for Service Catalog AppRegistry Application Associator.

Example:

import cdk "github.com/aws/aws-cdk-go/awscdk"

app := awscdk.NewApp()

associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			ApplicationName: jsii.String("MyAssociatedApplication"),
			// 'Application containing stacks deployed via CDK.' is the default
			ApplicationDescription: jsii.String("Associated Application description"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
			// AWS Account and Region that are implied by the current CLI configuration is the default
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})

// Associate application to the attribute group.
associatedApp.appRegistryApplication.AddAttributeGroup(jsii.String("MyAttributeGroup"), &AttributeGroupAssociationProps{
	AttributeGroupName: jsii.String("MyAttributeGroupName"),
	Description: jsii.String("Test attribute group"),
	Attributes: map[string]interface{}{
	},
})

Experimental.

type ApplicationProps

type ApplicationProps struct {
	// Enforces a particular physical application name.
	// Experimental.
	ApplicationName *string `field:"required" json:"applicationName" yaml:"applicationName"`
	// Description for application.
	// Default: - No description provided.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
}

Properties for a Service Catalog AppRegistry Application.

Example:

application := appreg.NewApplication(this, jsii.String("MyFirstApplication"), &ApplicationProps{
	ApplicationName: jsii.String("MyFirstApplicationName"),
	Description: jsii.String("description for my application"),
})

Experimental.

type AttributeGroup

type AttributeGroup interface {
	awscdk.Resource
	IAttributeGroup
	// The ARN of the attribute group.
	// Experimental.
	AttributeGroupArn() *string
	// The ID of the attribute group.
	// Experimental.
	AttributeGroupId() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed in a Stack (those created by
	// creating new class instances like `new Role()`, `new Bucket()`, etc.), this
	// is always the same as the environment of the stack they belong to.
	//
	// For referenced resources (those obtained from referencing methods like
	// `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
	// different than the stack they were imported into.
	// Experimental.
	Env() *awscdk.ResourceEnvironment
	// The tree node.
	// Experimental.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	// Experimental.
	PhysicalName() *string
	// The stack in which this resource is defined.
	// Experimental.
	Stack() awscdk.Stack
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	// Experimental.
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Associate an application with attribute group If the attribute group is already associated, it will ignore duplicate request.
	// Experimental.
	AssociateWith(application IApplication)
	// Experimental.
	GeneratePhysicalName() *string
	// Create a unique hash.
	// Experimental.
	GenerateUniqueHash(resourceAddress *string) *string
	// Get the correct permission ARN based on the SharePermission.
	// Experimental.
	GetAttributeGroupSharePermissionARN(shareOptions *ShareOptions) *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	// Experimental.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	// Experimental.
	GetResourceNameAttribute(nameAttr *string) *string
	// Share the attribute group resource with other IAM entities, accounts, or OUs.
	// Experimental.
	ShareAttributeGroup(id *string, shareOptions *ShareOptions)
	// Returns a string representation of this construct.
	// Experimental.
	ToString() *string
}

A Service Catalog AppRegistry Attribute Group.

Example:

attributeGroup := appreg.NewAttributeGroup(this, jsii.String("MyFirstAttributeGroup"), &AttributeGroupProps{
	AttributeGroupName: jsii.String("MyFirstAttributeGroupName"),
	Description: jsii.String("description for my attribute group"),
	 // the description is optional,
	Attributes: map[string]interface{}{
		"project": jsii.String("foo"),
		"team": []interface{}{
			jsii.String("member1"),
			jsii.String("member2"),
			jsii.String("member3"),
		},
		"public": jsii.Boolean(false),
		"stages": map[string]*string{
			"alpha": jsii.String("complete"),
			"beta": jsii.String("incomplete"),
			"release": jsii.String("not started"),
		},
	},
})

Experimental.

func NewAttributeGroup

func NewAttributeGroup(scope constructs.Construct, id *string, props *AttributeGroupProps) AttributeGroup

Experimental.

type AttributeGroupAssociationProps

type AttributeGroupAssociationProps struct {
	// Name for attribute group.
	// Experimental.
	AttributeGroupName *string `field:"required" json:"attributeGroupName" yaml:"attributeGroupName"`
	// A JSON of nested key-value pairs that represent the attributes in the group.
	//
	// Attributes maybe an empty JSON '{}', but must be explicitly stated.
	// Experimental.
	Attributes *map[string]interface{} `field:"required" json:"attributes" yaml:"attributes"`
	// Description for attribute group.
	// Default: - No description provided.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
}

Properties for a Service Catalog AppRegistry Attribute Group.

Example:

import cdk "github.com/aws/aws-cdk-go/awscdk"

app := awscdk.NewApp()

associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			ApplicationName: jsii.String("MyAssociatedApplication"),
			// 'Application containing stacks deployed via CDK.' is the default
			ApplicationDescription: jsii.String("Associated Application description"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
			// AWS Account and Region that are implied by the current CLI configuration is the default
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})

// Associate application to the attribute group.
associatedApp.appRegistryApplication.AddAttributeGroup(jsii.String("MyAttributeGroup"), &AttributeGroupAssociationProps{
	AttributeGroupName: jsii.String("MyAttributeGroupName"),
	Description: jsii.String("Test attribute group"),
	Attributes: map[string]interface{}{
	},
})

Experimental.

type AttributeGroupProps

type AttributeGroupProps struct {
	// Enforces a particular physical attribute group name.
	// Experimental.
	AttributeGroupName *string `field:"required" json:"attributeGroupName" yaml:"attributeGroupName"`
	// A JSON of nested key-value pairs that represent the attributes in the group.
	//
	// Attributes maybe an empty JSON '{}', but must be explicitly stated.
	// Experimental.
	Attributes *map[string]interface{} `field:"required" json:"attributes" yaml:"attributes"`
	// Description for attribute group.
	// Default: - No description provided.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
}

Properties for a Service Catalog AppRegistry Attribute Group.

Example:

attributeGroup := appreg.NewAttributeGroup(this, jsii.String("MyFirstAttributeGroup"), &AttributeGroupProps{
	AttributeGroupName: jsii.String("MyFirstAttributeGroupName"),
	Description: jsii.String("description for my attribute group"),
	 // the description is optional,
	Attributes: map[string]interface{}{
		"project": jsii.String("foo"),
		"team": []interface{}{
			jsii.String("member1"),
			jsii.String("member2"),
			jsii.String("member3"),
		},
		"public": jsii.Boolean(false),
		"stages": map[string]*string{
			"alpha": jsii.String("complete"),
			"beta": jsii.String("incomplete"),
			"release": jsii.String("not started"),
		},
	},
})

Experimental.

type BindTargetApplicationResult

type BindTargetApplicationResult struct {
	// Created or imported application.
	// Experimental.
	Application IApplication `field:"required" json:"application" yaml:"application"`
	// Enables cross-account associations with the target application.
	// Experimental.
	AssociateCrossAccountStacks *bool `field:"required" json:"associateCrossAccountStacks" yaml:"associateCrossAccountStacks"`
}

Properties for Service Catalog AppRegistry Application Associator to work with.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import servicecatalogappregistry_alpha "github.com/aws/aws-cdk-go/awscdkservicecatalogappregistryalpha"

var application Application

bindTargetApplicationResult := &BindTargetApplicationResult{
	Application: application,
	AssociateCrossAccountStacks: jsii.Boolean(false),
}

Experimental.

type CreateTargetApplicationOptions

type CreateTargetApplicationOptions struct {
	// Include runtime versioning information in this Stack.
	// Default: `analyticsReporting` setting of containing `App`, or value of
	// 'aws:cdk:version-reporting' context key.
	//
	// Experimental.
	AnalyticsReporting *bool `field:"optional" json:"analyticsReporting" yaml:"analyticsReporting"`
	// Enable this flag to allow native cross region stack references.
	//
	// Enabling this will create a CloudFormation custom resource
	// in both the producing stack and consuming stack in order to perform the export/import
	//
	// This feature is currently experimental.
	// Default: false.
	//
	// Experimental.
	CrossRegionReferences *bool `field:"optional" json:"crossRegionReferences" yaml:"crossRegionReferences"`
	// A description of the stack.
	// Default: - No description.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The AWS environment (account/region) where this stack will be deployed.
	//
	// Set the `region`/`account` fields of `env` to either a concrete value to
	// select the indicated environment (recommended for production stacks), or to
	// the values of environment variables
	// `CDK_DEFAULT_REGION`/`CDK_DEFAULT_ACCOUNT` to let the target environment
	// depend on the AWS credentials/configuration that the CDK CLI is executed
	// under (recommended for development stacks).
	//
	// If the `Stack` is instantiated inside a `Stage`, any undefined
	// `region`/`account` fields from `env` will default to the same field on the
	// encompassing `Stage`, if configured there.
	//
	// If either `region` or `account` are not set nor inherited from `Stage`, the
	// Stack will be considered "*environment-agnostic*"". Environment-agnostic
	// stacks can be deployed to any environment but may not be able to take
	// advantage of all features of the CDK. For example, they will not be able to
	// use environmental context lookups such as `ec2.Vpc.fromLookup` and will not
	// automatically translate Service Principals to the right format based on the
	// environment's AWS partition, and other such enhancements.
	//
	// Example:
	//   // Use a concrete account and region to deploy this stack to:
	//   // `.account` and `.region` will simply return these values.
	//   new Stack(app, 'Stack1', {
	//     env: {
	//       account: '123456789012',
	//       region: 'us-east-1'
	//     },
	//   });
	//
	//   // Use the CLI's current credentials to determine the target environment:
	//   // `.account` and `.region` will reflect the account+region the CLI
	//   // is configured to use (based on the user CLI credentials)
	//   new Stack(app, 'Stack2', {
	//     env: {
	//       account: process.env.CDK_DEFAULT_ACCOUNT,
	//       region: process.env.CDK_DEFAULT_REGION
	//     },
	//   });
	//
	//   // Define multiple stacks stage associated with an environment
	//   const myStage = new Stage(app, 'MyStage', {
	//     env: {
	//       account: '123456789012',
	//       region: 'us-east-1'
	//     }
	//   });
	//
	//   // both of these stacks will use the stage's account/region:
	//   // `.account` and `.region` will resolve to the concrete values as above
	//   new MyStack(myStage, 'Stack1');
	//   new YourStack(myStage, 'Stack2');
	//
	//   // Define an environment-agnostic stack:
	//   // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
	//   // which will only resolve to actual values by CloudFormation during deployment.
	//   new MyStack(app, 'Stack1');
	//
	// Default: - The environment of the containing `Stage` if available,
	// otherwise create the stack will be environment-agnostic.
	//
	// Experimental.
	Env *awscdk.Environment `field:"optional" json:"env" yaml:"env"`
	// SNS Topic ARNs that will receive stack events.
	// Default: - no notification arns.
	//
	// Experimental.
	NotificationArns *[]*string `field:"optional" json:"notificationArns" yaml:"notificationArns"`
	// Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
	// Default: - no permissions boundary is applied.
	//
	// Experimental.
	PermissionsBoundary awscdk.PermissionsBoundary `field:"optional" json:"permissionsBoundary" yaml:"permissionsBoundary"`
	// A list of IPropertyInjector attached to this Stack.
	// Default: - no PropertyInjectors.
	//
	// Experimental.
	PropertyInjectors *[]awscdk.IPropertyInjector `field:"optional" json:"propertyInjectors" yaml:"propertyInjectors"`
	// Name to deploy the stack with.
	// Default: - Derived from construct path.
	//
	// Experimental.
	StackName *string `field:"optional" json:"stackName" yaml:"stackName"`
	// Enable this flag to suppress indentation in generated CloudFormation templates.
	//
	// If not specified, the value of the `@aws-cdk/core:suppressTemplateIndentation`
	// context key will be used. If that is not specified, then the
	// default value `false` will be used.
	// Default: - the value of `@aws-cdk/core:suppressTemplateIndentation`, or `false` if that is not set.
	//
	// Experimental.
	SuppressTemplateIndentation *bool `field:"optional" json:"suppressTemplateIndentation" yaml:"suppressTemplateIndentation"`
	// Synthesis method to use while deploying this stack.
	//
	// The Stack Synthesizer controls aspects of synthesis and deployment,
	// like how assets are referenced and what IAM roles to use. For more
	// information, see the README of the main CDK package.
	//
	// If not specified, the `defaultStackSynthesizer` from `App` will be used.
	// If that is not specified, `DefaultStackSynthesizer` is used if
	// `@aws-cdk/core:newStyleStackSynthesis` is set to `true` or the CDK major
	// version is v2. In CDK v1 `LegacyStackSynthesizer` is the default if no
	// other synthesizer is specified.
	// Default: - The synthesizer specified on `App`, or `DefaultStackSynthesizer` otherwise.
	//
	// Experimental.
	Synthesizer awscdk.IStackSynthesizer `field:"optional" json:"synthesizer" yaml:"synthesizer"`
	// Tags that will be applied to the Stack.
	//
	// These tags are applied to the CloudFormation Stack itself. They will not
	// appear in the CloudFormation template.
	//
	// However, at deployment time, CloudFormation will apply these tags to all
	// resources in the stack that support tagging. You will not be able to exempt
	// resources from tagging (using the `excludeResourceTypes` property of
	// `Tags.of(...).add()`) for tags applied in this way.
	// Default: {}.
	//
	// Experimental.
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
	// Whether to enable termination protection for this stack.
	// Default: false.
	//
	// Experimental.
	TerminationProtection *bool `field:"optional" json:"terminationProtection" yaml:"terminationProtection"`
	// Determines whether any cross-account stacks defined in the CDK app definition should be associated with the target application.
	//
	// If set to `true`, the application will first be shared with the accounts that own the stacks.
	// Default: - false.
	//
	// Experimental.
	AssociateCrossAccountStacks *bool `field:"optional" json:"associateCrossAccountStacks" yaml:"associateCrossAccountStacks"`
	// Stack ID in which application will be created or imported.
	//
	// The id of a stack is also the identifier that you use to
	// refer to it in the [AWS CDK Toolkit](https://docs.aws.amazon.com/cdk/v2/guide/cli.html).
	// Default: - The value of `stackName` will be used as stack id.
	//
	// Deprecated: - Use `stackName` instead to control the name and id of the stack.
	StackId *string `field:"optional" json:"stackId" yaml:"stackId"`
	// Enforces a particular physical application name.
	// Experimental.
	ApplicationName *string `field:"required" json:"applicationName" yaml:"applicationName"`
	// Application description.
	// Default: - Application containing stacks deployed via CDK.
	//
	// Experimental.
	ApplicationDescription *string `field:"optional" json:"applicationDescription" yaml:"applicationDescription"`
	// Whether create cloudFormation Output for application manager URL.
	// Default: - true.
	//
	// Experimental.
	EmitApplicationManagerUrlAsOutput *bool `field:"optional" json:"emitApplicationManagerUrlAsOutput" yaml:"emitApplicationManagerUrlAsOutput"`
}

Properties used to define New TargetApplication.

Example:

import cdk "github.com/aws/aws-cdk-go/awscdk"

app := awscdk.NewApp()

associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			ApplicationName: jsii.String("MyAssociatedApplication"),
			// 'Application containing stacks deployed via CDK.' is the default
			ApplicationDescription: jsii.String("Associated Application description"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
			// AWS Account and Region that are implied by the current CLI configuration is the default
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})

// Associate application to the attribute group.
associatedApp.appRegistryApplication.AddAttributeGroup(jsii.String("MyAttributeGroup"), &AttributeGroupAssociationProps{
	AttributeGroupName: jsii.String("MyAttributeGroupName"),
	Description: jsii.String("Test attribute group"),
	Attributes: map[string]interface{}{
	},
})

Experimental.

type ExistingTargetApplicationOptions

type ExistingTargetApplicationOptions struct {
	// Include runtime versioning information in this Stack.
	// Default: `analyticsReporting` setting of containing `App`, or value of
	// 'aws:cdk:version-reporting' context key.
	//
	// Experimental.
	AnalyticsReporting *bool `field:"optional" json:"analyticsReporting" yaml:"analyticsReporting"`
	// Enable this flag to allow native cross region stack references.
	//
	// Enabling this will create a CloudFormation custom resource
	// in both the producing stack and consuming stack in order to perform the export/import
	//
	// This feature is currently experimental.
	// Default: false.
	//
	// Experimental.
	CrossRegionReferences *bool `field:"optional" json:"crossRegionReferences" yaml:"crossRegionReferences"`
	// A description of the stack.
	// Default: - No description.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The AWS environment (account/region) where this stack will be deployed.
	//
	// Set the `region`/`account` fields of `env` to either a concrete value to
	// select the indicated environment (recommended for production stacks), or to
	// the values of environment variables
	// `CDK_DEFAULT_REGION`/`CDK_DEFAULT_ACCOUNT` to let the target environment
	// depend on the AWS credentials/configuration that the CDK CLI is executed
	// under (recommended for development stacks).
	//
	// If the `Stack` is instantiated inside a `Stage`, any undefined
	// `region`/`account` fields from `env` will default to the same field on the
	// encompassing `Stage`, if configured there.
	//
	// If either `region` or `account` are not set nor inherited from `Stage`, the
	// Stack will be considered "*environment-agnostic*"". Environment-agnostic
	// stacks can be deployed to any environment but may not be able to take
	// advantage of all features of the CDK. For example, they will not be able to
	// use environmental context lookups such as `ec2.Vpc.fromLookup` and will not
	// automatically translate Service Principals to the right format based on the
	// environment's AWS partition, and other such enhancements.
	//
	// Example:
	//   // Use a concrete account and region to deploy this stack to:
	//   // `.account` and `.region` will simply return these values.
	//   new Stack(app, 'Stack1', {
	//     env: {
	//       account: '123456789012',
	//       region: 'us-east-1'
	//     },
	//   });
	//
	//   // Use the CLI's current credentials to determine the target environment:
	//   // `.account` and `.region` will reflect the account+region the CLI
	//   // is configured to use (based on the user CLI credentials)
	//   new Stack(app, 'Stack2', {
	//     env: {
	//       account: process.env.CDK_DEFAULT_ACCOUNT,
	//       region: process.env.CDK_DEFAULT_REGION
	//     },
	//   });
	//
	//   // Define multiple stacks stage associated with an environment
	//   const myStage = new Stage(app, 'MyStage', {
	//     env: {
	//       account: '123456789012',
	//       region: 'us-east-1'
	//     }
	//   });
	//
	//   // both of these stacks will use the stage's account/region:
	//   // `.account` and `.region` will resolve to the concrete values as above
	//   new MyStack(myStage, 'Stack1');
	//   new YourStack(myStage, 'Stack2');
	//
	//   // Define an environment-agnostic stack:
	//   // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
	//   // which will only resolve to actual values by CloudFormation during deployment.
	//   new MyStack(app, 'Stack1');
	//
	// Default: - The environment of the containing `Stage` if available,
	// otherwise create the stack will be environment-agnostic.
	//
	// Experimental.
	Env *awscdk.Environment `field:"optional" json:"env" yaml:"env"`
	// SNS Topic ARNs that will receive stack events.
	// Default: - no notification arns.
	//
	// Experimental.
	NotificationArns *[]*string `field:"optional" json:"notificationArns" yaml:"notificationArns"`
	// Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
	// Default: - no permissions boundary is applied.
	//
	// Experimental.
	PermissionsBoundary awscdk.PermissionsBoundary `field:"optional" json:"permissionsBoundary" yaml:"permissionsBoundary"`
	// A list of IPropertyInjector attached to this Stack.
	// Default: - no PropertyInjectors.
	//
	// Experimental.
	PropertyInjectors *[]awscdk.IPropertyInjector `field:"optional" json:"propertyInjectors" yaml:"propertyInjectors"`
	// Name to deploy the stack with.
	// Default: - Derived from construct path.
	//
	// Experimental.
	StackName *string `field:"optional" json:"stackName" yaml:"stackName"`
	// Enable this flag to suppress indentation in generated CloudFormation templates.
	//
	// If not specified, the value of the `@aws-cdk/core:suppressTemplateIndentation`
	// context key will be used. If that is not specified, then the
	// default value `false` will be used.
	// Default: - the value of `@aws-cdk/core:suppressTemplateIndentation`, or `false` if that is not set.
	//
	// Experimental.
	SuppressTemplateIndentation *bool `field:"optional" json:"suppressTemplateIndentation" yaml:"suppressTemplateIndentation"`
	// Synthesis method to use while deploying this stack.
	//
	// The Stack Synthesizer controls aspects of synthesis and deployment,
	// like how assets are referenced and what IAM roles to use. For more
	// information, see the README of the main CDK package.
	//
	// If not specified, the `defaultStackSynthesizer` from `App` will be used.
	// If that is not specified, `DefaultStackSynthesizer` is used if
	// `@aws-cdk/core:newStyleStackSynthesis` is set to `true` or the CDK major
	// version is v2. In CDK v1 `LegacyStackSynthesizer` is the default if no
	// other synthesizer is specified.
	// Default: - The synthesizer specified on `App`, or `DefaultStackSynthesizer` otherwise.
	//
	// Experimental.
	Synthesizer awscdk.IStackSynthesizer `field:"optional" json:"synthesizer" yaml:"synthesizer"`
	// Tags that will be applied to the Stack.
	//
	// These tags are applied to the CloudFormation Stack itself. They will not
	// appear in the CloudFormation template.
	//
	// However, at deployment time, CloudFormation will apply these tags to all
	// resources in the stack that support tagging. You will not be able to exempt
	// resources from tagging (using the `excludeResourceTypes` property of
	// `Tags.of(...).add()`) for tags applied in this way.
	// Default: {}.
	//
	// Experimental.
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
	// Whether to enable termination protection for this stack.
	// Default: false.
	//
	// Experimental.
	TerminationProtection *bool `field:"optional" json:"terminationProtection" yaml:"terminationProtection"`
	// Determines whether any cross-account stacks defined in the CDK app definition should be associated with the target application.
	//
	// If set to `true`, the application will first be shared with the accounts that own the stacks.
	// Default: - false.
	//
	// Experimental.
	AssociateCrossAccountStacks *bool `field:"optional" json:"associateCrossAccountStacks" yaml:"associateCrossAccountStacks"`
	// Stack ID in which application will be created or imported.
	//
	// The id of a stack is also the identifier that you use to
	// refer to it in the [AWS CDK Toolkit](https://docs.aws.amazon.com/cdk/v2/guide/cli.html).
	// Default: - The value of `stackName` will be used as stack id.
	//
	// Deprecated: - Use `stackName` instead to control the name and id of the stack.
	StackId *string `field:"optional" json:"stackId" yaml:"stackId"`
	// Enforces a particular application arn.
	// Experimental.
	ApplicationArnValue *string `field:"required" json:"applicationArnValue" yaml:"applicationArnValue"`
}

Properties used to define Existing TargetApplication.

Example:

app := awscdk.NewApp()
associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_ExistingApplicationFromArn(&ExistingTargetApplicationOptions{
			ApplicationArnValue: jsii.String("arn:aws:servicecatalog:us-east-1:123456789012:/applications/applicationId"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
		}),
	},
})

Experimental.

type IApplication

type IApplication interface {
	awscdk.IResource
	// Create an attribute group and associate this application with the created attribute group.
	// Experimental.
	AddAttributeGroup(id *string, attributeGroupProps *AttributeGroupAssociationProps) IAttributeGroup
	// Associate this application with all stacks under the construct node.
	//
	// NOTE: This method won't automatically register stacks under pipeline stages,
	// and requires association of each pipeline stage by calling this method with stage Construct.
	// Experimental.
	AssociateAllStacksInScope(construct constructs.Construct)
	// Associate a Cloudformation stack with the application in the given stack.
	// Experimental.
	AssociateApplicationWithStack(stack awscdk.Stack)
	// Associate this application with an attribute group.
	// Experimental.
	AssociateAttributeGroup(attributeGroup IAttributeGroup)
	// Associate this application with a CloudFormation stack.
	// Deprecated: Use `associateApplicationWithStack` instead.
	AssociateStack(stack awscdk.Stack)
	// Share this application with other IAM entities, accounts, or OUs.
	// Experimental.
	ShareApplication(id *string, shareOptions *ShareOptions)
	// The ARN of the application.
	// Experimental.
	ApplicationArn() *string
	// The ID of the application.
	// Experimental.
	ApplicationId() *string
	// The name of the application.
	// Experimental.
	ApplicationName() *string
}

A Service Catalog AppRegistry Application. Experimental.

func Application_FromApplicationArn

func Application_FromApplicationArn(scope constructs.Construct, id *string, applicationArn *string) IApplication

Imports an Application construct that represents an external application. Experimental.

type IAttributeGroup

type IAttributeGroup interface {
	awscdk.IResource
	// Associate an application with attribute group If the attribute group is already associated, it will ignore duplicate request.
	// Experimental.
	AssociateWith(application IApplication)
	// Share the attribute group resource with other IAM entities, accounts, or OUs.
	// Experimental.
	ShareAttributeGroup(id *string, shareOptions *ShareOptions)
	// The ARN of the attribute group.
	// Experimental.
	AttributeGroupArn() *string
	// The ID of the attribute group.
	// Experimental.
	AttributeGroupId() *string
}

A Service Catalog AppRegistry Attribute Group. Experimental.

func AttributeGroup_FromAttributeGroupArn

func AttributeGroup_FromAttributeGroupArn(scope constructs.Construct, id *string, attributeGroupArn *string) IAttributeGroup

Imports an attribute group construct that represents an external attribute group. Experimental.

type ShareOptions

type ShareOptions struct {
	// Name of the share.
	// Experimental.
	Name *string `field:"required" json:"name" yaml:"name"`
	// A list of AWS accounts that the application will be shared with.
	// Default: - No accounts specified for share.
	//
	// Experimental.
	Accounts *[]*string `field:"optional" json:"accounts" yaml:"accounts"`
	// A list of AWS Organization or Organizational Units (OUs) ARNs that the application will be shared with.
	// Default: - No AWS Organizations or OUs specified for share.
	//
	// Experimental.
	OrganizationArns *[]*string `field:"optional" json:"organizationArns" yaml:"organizationArns"`
	// A list of AWS IAM roles that the application will be shared with.
	// Default: - No IAM roles specified for share.
	//
	// Experimental.
	Roles *[]awsiam.IRole `field:"optional" json:"roles" yaml:"roles"`
	// An option to manage access to the application or attribute group.
	// Default: - Principals will be assigned read only permissions on the application or attribute group.
	//
	// Experimental.
	SharePermission interface{} `field:"optional" json:"sharePermission" yaml:"sharePermission"`
	// A list of AWS IAM users that the application will be shared with.
	// Default: - No IAM Users specified for share.
	//
	// Experimental.
	Users *[]awsiam.IUser `field:"optional" json:"users" yaml:"users"`
}

The options that are passed into a share of an Application or Attribute Group.

Example:

import iam "github.com/aws/aws-cdk-go/awscdk"
var application Application
var myRole IRole
var myUser IUser

application.shareApplication(jsii.String("MyShareId"), &ShareOptions{
	Name: jsii.String("MyShare"),
	Accounts: []*string{
		jsii.String("123456789012"),
	},
	OrganizationArns: []*string{
		jsii.String("arn:aws:organizations::123456789012:organization/o-my-org-id"),
	},
	Roles: []IRole{
		myRole,
	},
	Users: []IUser{
		myUser,
	},
})

Experimental.

type SharePermission

type SharePermission string

Supported permissions for sharing applications or attribute groups with principals using AWS RAM.

Example:

import iam "github.com/aws/aws-cdk-go/awscdk"
var application Application

application.shareApplication(jsii.String("MyShareId"), &ShareOptions{
	Name: jsii.String("MyShare"),
	Accounts: []*string{
		jsii.String("123456789012"),
		jsii.String("234567890123"),
	},
	SharePermission: appreg.SharePermission_ALLOW_ACCESS,
})

Experimental.

const (
	// Allows principals in the share to only view the application or attribute group.
	// Experimental.
	SharePermission_READ_ONLY SharePermission = "READ_ONLY"
	// Allows principals in the share to associate resources and attribute groups with applications.
	// Experimental.
	SharePermission_ALLOW_ACCESS SharePermission = "ALLOW_ACCESS"
)

type TargetApplication

type TargetApplication interface {
	// Called when the ApplicationAssociator is initialized.
	// Experimental.
	Bind(scope constructs.Construct) *BindTargetApplicationResult
}

Contains static factory methods with which you can build the input needed for application associator to work.

Example:

import cdk "github.com/aws/aws-cdk-go/awscdk"

app := awscdk.NewApp()

associatedApp := appreg.NewApplicationAssociator(app, jsii.String("AssociatedApplication"), &ApplicationAssociatorProps{
	Applications: []TargetApplication{
		appreg.TargetApplication_CreateApplicationStack(&CreateTargetApplicationOptions{
			ApplicationName: jsii.String("MyAssociatedApplication"),
			// 'Application containing stacks deployed via CDK.' is the default
			ApplicationDescription: jsii.String("Associated Application description"),
			StackName: jsii.String("MyAssociatedApplicationStack"),
			// AWS Account and Region that are implied by the current CLI configuration is the default
			Env: &Environment{
				Account: jsii.String("123456789012"),
				Region: jsii.String("us-east-1"),
			},
		}),
	},
})

// Associate application to the attribute group.
associatedApp.appRegistryApplication.AddAttributeGroup(jsii.String("MyAttributeGroup"), &AttributeGroupAssociationProps{
	AttributeGroupName: jsii.String("MyAttributeGroupName"),
	Description: jsii.String("Test attribute group"),
	Attributes: map[string]interface{}{
	},
})

Experimental.

func TargetApplication_CreateApplicationStack

func TargetApplication_CreateApplicationStack(options *CreateTargetApplicationOptions) TargetApplication

Factory method to build the input using the provided application name and stack props. Experimental.

func TargetApplication_ExistingApplicationFromArn

func TargetApplication_ExistingApplicationFromArn(options *ExistingTargetApplicationOptions) TargetApplication

Factory method to build the input using the provided application ARN. Experimental.

type TargetApplicationCommonOptions

type TargetApplicationCommonOptions struct {
	// Include runtime versioning information in this Stack.
	// Default: `analyticsReporting` setting of containing `App`, or value of
	// 'aws:cdk:version-reporting' context key.
	//
	// Experimental.
	AnalyticsReporting *bool `field:"optional" json:"analyticsReporting" yaml:"analyticsReporting"`
	// Enable this flag to allow native cross region stack references.
	//
	// Enabling this will create a CloudFormation custom resource
	// in both the producing stack and consuming stack in order to perform the export/import
	//
	// This feature is currently experimental.
	// Default: false.
	//
	// Experimental.
	CrossRegionReferences *bool `field:"optional" json:"crossRegionReferences" yaml:"crossRegionReferences"`
	// A description of the stack.
	// Default: - No description.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// The AWS environment (account/region) where this stack will be deployed.
	//
	// Set the `region`/`account` fields of `env` to either a concrete value to
	// select the indicated environment (recommended for production stacks), or to
	// the values of environment variables
	// `CDK_DEFAULT_REGION`/`CDK_DEFAULT_ACCOUNT` to let the target environment
	// depend on the AWS credentials/configuration that the CDK CLI is executed
	// under (recommended for development stacks).
	//
	// If the `Stack` is instantiated inside a `Stage`, any undefined
	// `region`/`account` fields from `env` will default to the same field on the
	// encompassing `Stage`, if configured there.
	//
	// If either `region` or `account` are not set nor inherited from `Stage`, the
	// Stack will be considered "*environment-agnostic*"". Environment-agnostic
	// stacks can be deployed to any environment but may not be able to take
	// advantage of all features of the CDK. For example, they will not be able to
	// use environmental context lookups such as `ec2.Vpc.fromLookup` and will not
	// automatically translate Service Principals to the right format based on the
	// environment's AWS partition, and other such enhancements.
	//
	// Example:
	//   // Use a concrete account and region to deploy this stack to:
	//   // `.account` and `.region` will simply return these values.
	//   new Stack(app, 'Stack1', {
	//     env: {
	//       account: '123456789012',
	//       region: 'us-east-1'
	//     },
	//   });
	//
	//   // Use the CLI's current credentials to determine the target environment:
	//   // `.account` and `.region` will reflect the account+region the CLI
	//   // is configured to use (based on the user CLI credentials)
	//   new Stack(app, 'Stack2', {
	//     env: {
	//       account: process.env.CDK_DEFAULT_ACCOUNT,
	//       region: process.env.CDK_DEFAULT_REGION
	//     },
	//   });
	//
	//   // Define multiple stacks stage associated with an environment
	//   const myStage = new Stage(app, 'MyStage', {
	//     env: {
	//       account: '123456789012',
	//       region: 'us-east-1'
	//     }
	//   });
	//
	//   // both of these stacks will use the stage's account/region:
	//   // `.account` and `.region` will resolve to the concrete values as above
	//   new MyStack(myStage, 'Stack1');
	//   new YourStack(myStage, 'Stack2');
	//
	//   // Define an environment-agnostic stack:
	//   // `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
	//   // which will only resolve to actual values by CloudFormation during deployment.
	//   new MyStack(app, 'Stack1');
	//
	// Default: - The environment of the containing `Stage` if available,
	// otherwise create the stack will be environment-agnostic.
	//
	// Experimental.
	Env *awscdk.Environment `field:"optional" json:"env" yaml:"env"`
	// SNS Topic ARNs that will receive stack events.
	// Default: - no notification arns.
	//
	// Experimental.
	NotificationArns *[]*string `field:"optional" json:"notificationArns" yaml:"notificationArns"`
	// Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
	// Default: - no permissions boundary is applied.
	//
	// Experimental.
	PermissionsBoundary awscdk.PermissionsBoundary `field:"optional" json:"permissionsBoundary" yaml:"permissionsBoundary"`
	// A list of IPropertyInjector attached to this Stack.
	// Default: - no PropertyInjectors.
	//
	// Experimental.
	PropertyInjectors *[]awscdk.IPropertyInjector `field:"optional" json:"propertyInjectors" yaml:"propertyInjectors"`
	// Name to deploy the stack with.
	// Default: - Derived from construct path.
	//
	// Experimental.
	StackName *string `field:"optional" json:"stackName" yaml:"stackName"`
	// Enable this flag to suppress indentation in generated CloudFormation templates.
	//
	// If not specified, the value of the `@aws-cdk/core:suppressTemplateIndentation`
	// context key will be used. If that is not specified, then the
	// default value `false` will be used.
	// Default: - the value of `@aws-cdk/core:suppressTemplateIndentation`, or `false` if that is not set.
	//
	// Experimental.
	SuppressTemplateIndentation *bool `field:"optional" json:"suppressTemplateIndentation" yaml:"suppressTemplateIndentation"`
	// Synthesis method to use while deploying this stack.
	//
	// The Stack Synthesizer controls aspects of synthesis and deployment,
	// like how assets are referenced and what IAM roles to use. For more
	// information, see the README of the main CDK package.
	//
	// If not specified, the `defaultStackSynthesizer` from `App` will be used.
	// If that is not specified, `DefaultStackSynthesizer` is used if
	// `@aws-cdk/core:newStyleStackSynthesis` is set to `true` or the CDK major
	// version is v2. In CDK v1 `LegacyStackSynthesizer` is the default if no
	// other synthesizer is specified.
	// Default: - The synthesizer specified on `App`, or `DefaultStackSynthesizer` otherwise.
	//
	// Experimental.
	Synthesizer awscdk.IStackSynthesizer `field:"optional" json:"synthesizer" yaml:"synthesizer"`
	// Tags that will be applied to the Stack.
	//
	// These tags are applied to the CloudFormation Stack itself. They will not
	// appear in the CloudFormation template.
	//
	// However, at deployment time, CloudFormation will apply these tags to all
	// resources in the stack that support tagging. You will not be able to exempt
	// resources from tagging (using the `excludeResourceTypes` property of
	// `Tags.of(...).add()`) for tags applied in this way.
	// Default: {}.
	//
	// Experimental.
	Tags *map[string]*string `field:"optional" json:"tags" yaml:"tags"`
	// Whether to enable termination protection for this stack.
	// Default: false.
	//
	// Experimental.
	TerminationProtection *bool `field:"optional" json:"terminationProtection" yaml:"terminationProtection"`
	// Determines whether any cross-account stacks defined in the CDK app definition should be associated with the target application.
	//
	// If set to `true`, the application will first be shared with the accounts that own the stacks.
	// Default: - false.
	//
	// Experimental.
	AssociateCrossAccountStacks *bool `field:"optional" json:"associateCrossAccountStacks" yaml:"associateCrossAccountStacks"`
	// Stack ID in which application will be created or imported.
	//
	// The id of a stack is also the identifier that you use to
	// refer to it in the [AWS CDK Toolkit](https://docs.aws.amazon.com/cdk/v2/guide/cli.html).
	// Default: - The value of `stackName` will be used as stack id.
	//
	// Deprecated: - Use `stackName` instead to control the name and id of the stack.
	StackId *string `field:"optional" json:"stackId" yaml:"stackId"`
}

Properties used to define targetapplication.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import servicecatalogappregistry_alpha "github.com/aws/aws-cdk-go/awscdkservicecatalogappregistryalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"

var permissionsBoundary PermissionsBoundary
var propertyInjector IPropertyInjector
var stackSynthesizer StackSynthesizer

targetApplicationCommonOptions := &TargetApplicationCommonOptions{
	AnalyticsReporting: jsii.Boolean(false),
	AssociateCrossAccountStacks: jsii.Boolean(false),
	CrossRegionReferences: jsii.Boolean(false),
	Description: jsii.String("description"),
	Env: &Environment{
		Account: jsii.String("account"),
		Region: jsii.String("region"),
	},
	NotificationArns: []*string{
		jsii.String("notificationArns"),
	},
	PermissionsBoundary: permissionsBoundary,
	PropertyInjectors: []IPropertyInjector{
		propertyInjector,
	},
	StackId: jsii.String("stackId"),
	StackName: jsii.String("stackName"),
	SuppressTemplateIndentation: jsii.Boolean(false),
	Synthesizer: stackSynthesizer,
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
	TerminationProtection: jsii.Boolean(false),
}

Experimental.

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL