java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.servicecatalog.Portfolio
All Implemented Interfaces:
IConstruct, IDependable, IResource, IPortfolio, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.794Z") @Stability(Stable) public class Portfolio extends Resource implements IPortfolio
A Service Catalog portfolio.

Example:

 Portfolio.Builder.create(this, "Portfolio")
         .displayName("MyPortfolio")
         .providerName("MyTeam")
         .build();
 
  • Constructor Details

    • Portfolio

      protected Portfolio(software.amazon.jsii.JsiiObjectRef objRef)
    • Portfolio

      protected Portfolio(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Portfolio

      @Stability(Stable) public Portfolio(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PortfolioProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromPortfolioArn

      @Stability(Stable) @NotNull public static IPortfolio fromPortfolioArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String portfolioArn)
      Creates a Portfolio construct that represents an external portfolio.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      portfolioArn - the Amazon Resource Name of the existing portfolio. This parameter is required.
    • addProduct

      @Stability(Stable) public void addProduct(@NotNull IProduct product)
      Associate portfolio with the given product.

      Specified by:
      addProduct in interface IPortfolio
      Parameters:
      product - This parameter is required.
    • associateTagOptions

      @Stability(Stable) public void associateTagOptions(@NotNull 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.

      Specified by:
      associateTagOptions in interface IPortfolio
      Parameters:
      tagOptions - This parameter is required.
    • constrainCloudFormationParameters

      @Stability(Stable) public void constrainCloudFormationParameters(@NotNull IProduct product, @NotNull CloudFormationRuleConstraintOptions options)
      Set provisioning rules for the product.

      Specified by:
      constrainCloudFormationParameters in interface IPortfolio
      Parameters:
      product - This parameter is required.
      options - This parameter is required.
    • constrainTagUpdates

      @Stability(Stable) public void constrainTagUpdates(@NotNull IProduct product, @Nullable TagUpdateConstraintOptions options)
      Add a Resource Update Constraint.

      Specified by:
      constrainTagUpdates in interface IPortfolio
      Parameters:
      product - This parameter is required.
      options -
    • constrainTagUpdates

      @Stability(Stable) public void constrainTagUpdates(@NotNull IProduct product)
      Add a Resource Update Constraint.

      Specified by:
      constrainTagUpdates in interface IPortfolio
      Parameters:
      product - This parameter is required.
    • deployWithStackSets

      @Stability(Stable) public void deployWithStackSets(@NotNull IProduct product, @NotNull StackSetsConstraintOptions options)
      Configure deployment options using AWS Cloudformation StackSets.

      Specified by:
      deployWithStackSets in interface IPortfolio
      Parameters:
      product - This parameter is required.
      options - This parameter is required.
    • generateUniqueHash

      @Stability(Stable) @NotNull protected String generateUniqueHash(@NotNull String value)
      Create a unique id based off the L1 CfnPortfolio or the arn of an imported portfolio.

      Parameters:
      value - This parameter is required.
    • giveAccessToGroup

      @Stability(Stable) public void giveAccessToGroup(@NotNull IGroup group)
      Associate portfolio with an IAM Group.

      Specified by:
      giveAccessToGroup in interface IPortfolio
      Parameters:
      group - This parameter is required.
    • giveAccessToRole

      @Stability(Stable) public void giveAccessToRole(@NotNull IRole role)
      Associate portfolio with an IAM Role.

      Specified by:
      giveAccessToRole in interface IPortfolio
      Parameters:
      role - This parameter is required.
    • giveAccessToUser

      @Stability(Stable) public void giveAccessToUser(@NotNull IUser user)
      Associate portfolio with an IAM User.

      Specified by:
      giveAccessToUser in interface IPortfolio
      Parameters:
      user - This parameter is required.
    • notifyOnStackEvents

      @Stability(Stable) public void notifyOnStackEvents(@NotNull IProduct product, @NotNull ITopic topic, @Nullable CommonConstraintOptions options)
      Add notifications for supplied topics on the provisioned product.

      Specified by:
      notifyOnStackEvents in interface IPortfolio
      Parameters:
      product - This parameter is required.
      topic - This parameter is required.
      options -
    • notifyOnStackEvents

      @Stability(Stable) public void notifyOnStackEvents(@NotNull IProduct product, @NotNull ITopic topic)
      Add notifications for supplied topics on the provisioned product.

      Specified by:
      notifyOnStackEvents in interface IPortfolio
      Parameters:
      product - This parameter is required.
      topic - This parameter is required.
    • setLaunchRole

      @Stability(Stable) public void setLaunchRole(@NotNull IProduct product, @NotNull IRole launchRole, @Nullable CommonConstraintOptions 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.

      Specified by:
      setLaunchRole in interface IPortfolio
      Parameters:
      product - This parameter is required.
      launchRole - This parameter is required.
      options -
    • setLaunchRole

      @Stability(Stable) public void setLaunchRole(@NotNull IProduct product, @NotNull IRole launchRole)
      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.

      Specified by:
      setLaunchRole in interface IPortfolio
      Parameters:
      product - This parameter is required.
      launchRole - This parameter is required.
    • setLocalLaunchRole

      @Stability(Stable) public void setLocalLaunchRole(@NotNull IProduct product, @NotNull IRole launchRole, @Nullable CommonConstraintOptions 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.

      Specified by:
      setLocalLaunchRole in interface IPortfolio
      Parameters:
      product - This parameter is required.
      launchRole - This parameter is required.
      options -
    • setLocalLaunchRole

      @Stability(Stable) public void setLocalLaunchRole(@NotNull IProduct product, @NotNull IRole launchRole)
      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.

      Specified by:
      setLocalLaunchRole in interface IPortfolio
      Parameters:
      product - This parameter is required.
      launchRole - This parameter is required.
    • setLocalLaunchRoleName

      @Stability(Stable) @NotNull public IRole setLocalLaunchRoleName(@NotNull IProduct product, @NotNull String launchRoleName, @Nullable CommonConstraintOptions options)
      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.

      Specified by:
      setLocalLaunchRoleName in interface IPortfolio
      Parameters:
      product - This parameter is required.
      launchRoleName - This parameter is required.
      options -
    • setLocalLaunchRoleName

      @Stability(Stable) @NotNull public IRole setLocalLaunchRoleName(@NotNull IProduct product, @NotNull String launchRoleName)
      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.

      Specified by:
      setLocalLaunchRoleName in interface IPortfolio
      Parameters:
      product - This parameter is required.
      launchRoleName - This parameter is required.
    • shareWithAccount

      @Stability(Stable) public void shareWithAccount(@NotNull String accountId, @Nullable PortfolioShareOptions options)
      Initiate a portfolio share with another account.

      Specified by:
      shareWithAccount in interface IPortfolio
      Parameters:
      accountId - This parameter is required.
      options -
    • shareWithAccount

      @Stability(Stable) public void shareWithAccount(@NotNull String accountId)
      Initiate a portfolio share with another account.

      Specified by:
      shareWithAccount in interface IPortfolio
      Parameters:
      accountId - This parameter is required.
    • getPortfolioArn

      @Stability(Stable) @NotNull public String getPortfolioArn()
      The ARN of the portfolio.
      Specified by:
      getPortfolioArn in interface IPortfolio
    • getPortfolioId

      @Stability(Stable) @NotNull public String getPortfolioId()
      The ID of the portfolio.
      Specified by:
      getPortfolioId in interface IPortfolio