PortfolioProductAssociation
The PortfolioProductAssociation resource allows you to associate a product with a portfolio in AWS Service Catalog. This resource is crucial for managing access to products within portfolios. For more information, refer to the AWS ServiceCatalog PortfolioProductAssociations documentation.
Minimal Example
Section titled “Minimal Example”Create a basic association between a portfolio and a product with required properties.
import AWS from "alchemy/aws/control";
const portfolioProductAssociation = await AWS.ServiceCatalog.PortfolioProductAssociation("basicAssociation", { PortfolioId: "portfolio-12345", ProductId: "product-67890", SourcePortfolioId: "source-portfolio-12345", // optional AcceptLanguage: "en" // optional});
Advanced Configuration
Section titled “Advanced Configuration”Configure an association while adopting an existing resource to avoid failure if it already exists.
const advancedPortfolioProductAssociation = await AWS.ServiceCatalog.PortfolioProductAssociation("advancedAssociation", { PortfolioId: "portfolio-54321", ProductId: "product-09876", SourcePortfolioId: "source-portfolio-54321", // optional AcceptLanguage: "fr", // optional adopt: true // adopt existing resource});
Adoption of Existing Resource
Section titled “Adoption of Existing Resource”Use the adopt option to ensure that the association will succeed even if the resource already exists.
const adoptedPortfolioProductAssociation = await AWS.ServiceCatalog.PortfolioProductAssociation("adoptedAssociation", { PortfolioId: "portfolio-11111", ProductId: "product-22222", adopt: true // true to adopt existing resource});
Multi-language Support
Section titled “Multi-language Support”Create an association while specifying a different language for the operation.
const multilingualPortfolioProductAssociation = await AWS.ServiceCatalog.PortfolioProductAssociation("multilingualAssociation", { PortfolioId: "portfolio-99999", ProductId: "product-88888", AcceptLanguage: "es" // Spanish});