aws-cdk-lib.aws_servicecatalog.IPortfolio

interface IPortfolio

LanguageType name
.NETAmazon.CDK.AWS.Servicecatalog.IPortfolio
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsservicecatalog#IPortfolio
Javasoftware.amazon.awscdk.services.servicecatalog.IPortfolio
Pythonaws_cdk.aws_servicecatalog.IPortfolio
TypeScript (source)aws-cdk-lib » aws_servicecatalog » IPortfolio

Implemented by Portfolio

Obtainable from Portfolio.fromPortfolioArn()

A Service Catalog portfolio.

Properties

NameTypeDescription
envResourceEnvironmentThe environment this resource belongs to.
nodeNodeThe tree node.
portfolioArnstringThe ARN of the portfolio.
portfolioIdstringThe ID of the portfolio.
stackStackThe stack in which this resource is defined.

env

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


node

Type: Node

The tree node.


portfolioArn

Type: string

The ARN of the portfolio.


portfolioId

Type: string

The ID of the portfolio.


stack

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
addProduct(product)Associate portfolio with the given product.
applyRemovalPolicy(policy)Apply the given removal policy to this resource.
associateTagOptions(tagOptions)Associate Tag Options.
constrainCloudFormationParameters(product, options)Set provisioning rules for the product.
constrainTagUpdates(product, options?)Add a Resource Update Constraint.
deployWithStackSets(product, options)Configure deployment options using AWS Cloudformation StackSets.
giveAccessToGroup(group)Associate portfolio with an IAM Group.
giveAccessToRole(role)Associate portfolio with an IAM Role.
giveAccessToUser(user)Associate portfolio with an IAM User.
notifyOnStackEvents(product, topic, options?)Add notifications for supplied topics on the provisioned product.
setLaunchRole(product, launchRole, options?)Force users to assume a certain role when launching a product.
setLocalLaunchRole(product, launchRole, options?)Force users to assume a certain role when launching a product.
setLocalLaunchRoleName(product, launchRoleName, options?)Force users to assume a certain role when launching a product.
shareWithAccount(accountId, options?)Initiate a portfolio share with another account.

addProduct(product)

public addProduct(product: IProduct): void

Parameters

  • product IProduct — A service catalog produt.

Associate portfolio with the given product.


applyRemovalPolicy(policy)

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

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).


associateTagOptions(tagOptions)

public associateTagOptions(tagOptions: TagOptions): void

Parameters

  • tagOptions TagOptions

Associate Tag Options.

A TagOption is a key-value pair managed in AWS Service Catalog. It is not an AWS tag, but serves as a template for creating an AWS tag based on the TagOption.


constrainCloudFormationParameters(product, options)

public constrainCloudFormationParameters(product: IProduct, options: CloudFormationRuleConstraintOptions): void

Parameters

  • product IProduct — A service catalog product.
  • options CloudFormationRuleConstraintOptions — options for the constraint.

Set provisioning rules for the product.


constrainTagUpdates(product, options?)

public constrainTagUpdates(product: IProduct, options?: TagUpdateConstraintOptions): void

Parameters

  • product IProduct
  • options TagUpdateConstraintOptions

Add a Resource Update Constraint.


deployWithStackSets(product, options)

public deployWithStackSets(product: IProduct, options: StackSetsConstraintOptions): void

Parameters

  • product IProduct — A service catalog product.
  • options StackSetsConstraintOptions — Configuration options for the constraint.

Configure deployment options using AWS Cloudformation StackSets.


giveAccessToGroup(group)

public giveAccessToGroup(group: IGroup): void

Parameters

  • group IGroup — an IAM Group.

Associate portfolio with an IAM Group.


giveAccessToRole(role)

public giveAccessToRole(role: IRole): void

Parameters

  • role IRole — an IAM role.

Associate portfolio with an IAM Role.


giveAccessToUser(user)

public giveAccessToUser(user: IUser): void

Parameters

  • user IUser — an IAM user.

Associate portfolio with an IAM User.


notifyOnStackEvents(product, topic, options?)

public notifyOnStackEvents(product: IProduct, topic: ITopic, options?: CommonConstraintOptions): void

Parameters

  • product IProduct — A service catalog product.
  • topic ITopic — A SNS Topic to receive notifications on events related to the provisioned product.
  • options CommonConstraintOptions

Add notifications for supplied topics on the provisioned product.


setLaunchRole(product, launchRole, options?)

public setLaunchRole(product: IProduct, launchRole: IRole, options?: CommonConstraintOptions): void

Parameters

  • product IProduct — A service catalog product.
  • launchRole IRole — The IAM role a user must assume when provisioning the product.
  • options CommonConstraintOptions — options for the constraint.

Force users to assume a certain role when launching a product.

This sets the launch role using the role arn which is tied to the account this role exists in. This is useful if you will be provisioning products from the account where this role exists. If you intend to share the portfolio across accounts, use a local launch role.


setLocalLaunchRole(product, launchRole, options?)

public setLocalLaunchRole(product: IProduct, launchRole: IRole, options?: CommonConstraintOptions): void

Parameters

  • product IProduct — A service catalog product.
  • launchRole IRole — The IAM role a user must assume when provisioning the product.
  • options CommonConstraintOptions — options for the constraint.

Force users to assume a certain role when launching a product.

The role name will be referenced by in the local account and must be set explicitly. This is useful when sharing the portfolio with multiple accounts.


setLocalLaunchRoleName(product, launchRoleName, options?)

public setLocalLaunchRoleName(product: IProduct, launchRoleName: string, options?: CommonConstraintOptions): IRole

Parameters

  • product IProduct — A service catalog product.
  • launchRoleName string — The name of the IAM role a user must assume when provisioning the product.
  • options CommonConstraintOptions — options for the constraint.

Returns

  • IRole

Force users to assume a certain role when launching a product.

The role will be referenced by name in the local account instead of a static role arn. A role with this name will automatically be created and assumable by Service Catalog in this account. This is useful when sharing the portfolio with multiple accounts.


shareWithAccount(accountId, options?)

public shareWithAccount(accountId: string, options?: PortfolioShareOptions): void

Parameters

  • accountId string — AWS account to share portfolio with.
  • options PortfolioShareOptions — Options for the initiate share.

Initiate a portfolio share with another account.