interface IPortfolio
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Servicecatalog.IPortfolio |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsservicecatalog#IPortfolio |
Java | software.amazon.awscdk.services.servicecatalog.IPortfolio |
Python | aws_cdk.aws_servicecatalog.IPortfolio |
TypeScript (source) | aws-cdk-lib » aws_servicecatalog » IPortfolio |
Implemented by
Portfolio
Obtainable from
Portfolio.fromPortfolioArn()
A Service Catalog portfolio.
Properties
| Name | Type | Description |
|---|---|---|
| env | Resource | The environment this resource belongs to. |
| node | Node | The tree node. |
| portfolio | string | The ARN of the portfolio. |
| portfolio | string | The ID of the portfolio. |
| stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
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.
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
| Name | Description |
|---|---|
| add | Associate portfolio with the given product. |
| apply | Apply the given removal policy to this resource. |
| associate | Associate Tag Options. |
| constrain | Set provisioning rules for the product. |
| constrain | Add a Resource Update Constraint. |
| deploy | Configure deployment options using AWS Cloudformation StackSets. |
| give | Associate portfolio with an IAM Group. |
| give | Associate portfolio with an IAM Role. |
| give | Associate portfolio with an IAM User. |
| notify | Add notifications for supplied topics on the provisioned product. |
| set | Force users to assume a certain role when launching a product. |
| set | Force users to assume a certain role when launching a product. |
| set | Force users to assume a certain role when launching a product. |
| share | 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
Cloud— options for the constraint.Formation Rule Constraint Options
Set provisioning rules for the product.
constrainTagUpdates(product, options?)
public constrainTagUpdates(product: IProduct, options?: TagUpdateConstraintOptions): void
Parameters
- product
IProduct - options
TagUpdate Constraint Options
Add a Resource Update Constraint.
deployWithStackSets(product, options)
public deployWithStackSets(product: IProduct, options: StackSetsConstraintOptions): void
Parameters
- product
IProduct— A service catalog product. - options
Stack— Configuration options for the constraint.Sets Constraint Options
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
CommonConstraint Options
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
Common— options for the constraint.Constraint Options
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
Common— options for the constraint.Constraint Options
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
Common— options for the constraint.Constraint Options
Returns
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
Portfolio— Options for the initiate share.Share Options
Initiate a portfolio share with another account.

.NET
Go
Java
Python
TypeScript (