PortfolioShare

class PortfolioShare : KotlinCustomResource

Manages a Service Catalog Portfolio Share. Shares the specified portfolio with the specified account or organization node. You can share portfolios to an organization, an organizational unit, or a specific account. If the portfolio share with the specified account or organization node already exists, using this resource to re-create the share will have no effect and will not return an error. You can then use this resource to update the share.

NOTE: Shares to an organization node can only be created by the management account of an organization or by a delegated administrator. If a delegated admin is de-registered, they can no longer create portfolio shares. NOTE: AWSOrganizationsAccess must be enabled in order to create a portfolio share to an organization node. NOTE: You can't share a shared resource, including portfolios that contain a shared product.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.servicecatalog.PortfolioShare("example", {
principalId: "012128675309",
portfolioId: exampleAwsServicecatalogPortfolio.id,
type: "ACCOUNT",
});
import pulumi
import pulumi_aws as aws
example = aws.servicecatalog.PortfolioShare("example",
principal_id="012128675309",
portfolio_id=example_aws_servicecatalog_portfolio["id"],
type="ACCOUNT")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.ServiceCatalog.PortfolioShare("example", new()
{
PrincipalId = "012128675309",
PortfolioId = exampleAwsServicecatalogPortfolio.Id,
Type = "ACCOUNT",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicecatalog"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicecatalog.NewPortfolioShare(ctx, "example", &servicecatalog.PortfolioShareArgs{
PrincipalId: pulumi.String("012128675309"),
PortfolioId: pulumi.Any(exampleAwsServicecatalogPortfolio.Id),
Type: pulumi.String("ACCOUNT"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.servicecatalog.PortfolioShare;
import com.pulumi.aws.servicecatalog.PortfolioShareArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new PortfolioShare("example", PortfolioShareArgs.builder()
.principalId("012128675309")
.portfolioId(exampleAwsServicecatalogPortfolio.id())
.type("ACCOUNT")
.build());
}
}
resources:
example:
type: aws:servicecatalog:PortfolioShare
properties:
principalId: '012128675309'
portfolioId: ${exampleAwsServicecatalogPortfolio.id}
type: ACCOUNT

Import

Using pulumi import, import aws_servicecatalog_portfolio_share using the portfolio share ID. For example:

$ pulumi import aws:servicecatalog/portfolioShare:PortfolioShare example port-12344321:ACCOUNT:123456789012

Properties

Link copied to clipboard
val accepted: Output<Boolean>

Whether the shared portfolio is imported by the recipient account. If the recipient is organizational, the share is automatically imported, and the field is always set to true.

Link copied to clipboard
val acceptLanguage: Output<String>?

Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val portfolioId: Output<String>

Portfolio identifier.

Link copied to clipboard
val principalId: Output<String>

Identifier of the principal with whom you will share the portfolio. Valid values AWS account IDs and ARNs of AWS Organizations and organizational units.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sharePrincipals: Output<Boolean>?

Enables or disables Principal sharing when creating the portfolio share. If this flag is not provided, principal sharing is disabled.

Link copied to clipboard
val shareTagOptions: Output<Boolean>?

Whether to enable sharing of aws.servicecatalog.TagOption resources when creating the portfolio share.

Link copied to clipboard
val type: Output<String>

Type of portfolio share. Valid values are ACCOUNT (an external account), ORGANIZATION (a share to every account in an organization), ORGANIZATIONAL_UNIT, ORGANIZATION_MEMBER_ACCOUNT (a share to an account in an organization). The following arguments are optional:

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Whether to wait (up to the timeout) for the share to be accepted. Organizational shares are automatically accepted.