Package com.pulumi.aws.servicecatalog
Class PortfolioShare
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.servicecatalog.PortfolioShare
-
public class PortfolioShare extends com.pulumi.resources.CustomResourceManages 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 Using `pulumi import`, import `aws.servicecatalog.PortfolioShare` using the portfolio share ID. For example: ```sh $ pulumi import aws:servicecatalog/portfolioShare:PortfolioShare example port-12344321:ACCOUNT:123456789012 ```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.ArrayList; import java.util.Arrays; 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()); } }
-
-
Constructor Summary
Constructors Constructor Description PortfolioShare(java.lang.String name)PortfolioShare(java.lang.String name, PortfolioShareArgs args)PortfolioShare(java.lang.String name, PortfolioShareArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.Boolean>accepted()com.pulumi.core.Output<java.util.Optional<java.lang.String>>acceptLanguage()static PortfolioShareget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, PortfolioShareState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>portfolioId()com.pulumi.core.Output<java.lang.String>principalId()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>sharePrincipals()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>shareTagOptions()com.pulumi.core.Output<java.lang.String>type()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>waitForAcceptance()
-
-
-
Constructor Detail
-
PortfolioShare
public PortfolioShare(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
PortfolioShare
public PortfolioShare(java.lang.String name, PortfolioShareArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
PortfolioShare
public PortfolioShare(java.lang.String name, PortfolioShareArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
acceptLanguage
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> acceptLanguage()
- Returns:
- Language code. Valid values: `en` (English), `jp` (Japanese), `zh` (Chinese). Default value is `en`.
-
accepted
public com.pulumi.core.Output<java.lang.Boolean> accepted()
- Returns:
- 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.
-
portfolioId
public com.pulumi.core.Output<java.lang.String> portfolioId()
- Returns:
- Portfolio identifier.
-
principalId
public com.pulumi.core.Output<java.lang.String> principalId()
- Returns:
- Identifier of the principal with whom you will share the portfolio. Valid values AWS account IDs and ARNs of AWS Organizations and organizational units.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
sharePrincipals
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> sharePrincipals()
- Returns:
- Enables or disables Principal sharing when creating the portfolio share. If this flag is not provided, principal sharing is disabled.
-
shareTagOptions
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> shareTagOptions()
- Returns:
- Whether to enable sharing of `aws.servicecatalog.TagOption` resources when creating the portfolio share.
-
type
public com.pulumi.core.Output<java.lang.String> type()
- Returns:
- 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:
-
waitForAcceptance
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> waitForAcceptance()
- Returns:
- Whether to wait (up to the timeout) for the share to be accepted. Organizational shares are automatically accepted.
-
get
public static PortfolioShare get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable PortfolioShareState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-