1. Packages
  2. AWS
  3. API Docs
  4. servicecatalog
  5. PrincipalPortfolioAssociation
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.servicecatalog.PrincipalPortfolioAssociation

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages a Service Catalog Principal Portfolio Association.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.servicecatalog.PrincipalPortfolioAssociation("example", {
        portfolioId: "port-68656c6c6f",
        principalArn: "arn:aws:iam::123456789012:user/Eleanor",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.servicecatalog.PrincipalPortfolioAssociation("example",
        portfolio_id="port-68656c6c6f",
        principal_arn="arn:aws:iam::123456789012:user/Eleanor")
    
    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.NewPrincipalPortfolioAssociation(ctx, "example", &servicecatalog.PrincipalPortfolioAssociationArgs{
    			PortfolioId:  pulumi.String("port-68656c6c6f"),
    			PrincipalArn: pulumi.String("arn:aws:iam::123456789012:user/Eleanor"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.ServiceCatalog.PrincipalPortfolioAssociation("example", new()
        {
            PortfolioId = "port-68656c6c6f",
            PrincipalArn = "arn:aws:iam::123456789012:user/Eleanor",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.servicecatalog.PrincipalPortfolioAssociation;
    import com.pulumi.aws.servicecatalog.PrincipalPortfolioAssociationArgs;
    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 PrincipalPortfolioAssociation("example", PrincipalPortfolioAssociationArgs.builder()
                .portfolioId("port-68656c6c6f")
                .principalArn("arn:aws:iam::123456789012:user/Eleanor")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:servicecatalog:PrincipalPortfolioAssociation
        properties:
          portfolioId: port-68656c6c6f
          principalArn: arn:aws:iam::123456789012:user/Eleanor
    

    Create PrincipalPortfolioAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PrincipalPortfolioAssociation(name: string, args: PrincipalPortfolioAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def PrincipalPortfolioAssociation(resource_name: str,
                                      args: PrincipalPortfolioAssociationArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrincipalPortfolioAssociation(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      portfolio_id: Optional[str] = None,
                                      principal_arn: Optional[str] = None,
                                      accept_language: Optional[str] = None,
                                      principal_type: Optional[str] = None)
    func NewPrincipalPortfolioAssociation(ctx *Context, name string, args PrincipalPortfolioAssociationArgs, opts ...ResourceOption) (*PrincipalPortfolioAssociation, error)
    public PrincipalPortfolioAssociation(string name, PrincipalPortfolioAssociationArgs args, CustomResourceOptions? opts = null)
    public PrincipalPortfolioAssociation(String name, PrincipalPortfolioAssociationArgs args)
    public PrincipalPortfolioAssociation(String name, PrincipalPortfolioAssociationArgs args, CustomResourceOptions options)
    
    type: aws:servicecatalog:PrincipalPortfolioAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PrincipalPortfolioAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PrincipalPortfolioAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PrincipalPortfolioAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrincipalPortfolioAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrincipalPortfolioAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var principalPortfolioAssociationResource = new Aws.ServiceCatalog.PrincipalPortfolioAssociation("principalPortfolioAssociationResource", new()
    {
        PortfolioId = "string",
        PrincipalArn = "string",
        AcceptLanguage = "string",
        PrincipalType = "string",
    });
    
    example, err := servicecatalog.NewPrincipalPortfolioAssociation(ctx, "principalPortfolioAssociationResource", &servicecatalog.PrincipalPortfolioAssociationArgs{
    	PortfolioId:    pulumi.String("string"),
    	PrincipalArn:   pulumi.String("string"),
    	AcceptLanguage: pulumi.String("string"),
    	PrincipalType:  pulumi.String("string"),
    })
    
    var principalPortfolioAssociationResource = new PrincipalPortfolioAssociation("principalPortfolioAssociationResource", PrincipalPortfolioAssociationArgs.builder()
        .portfolioId("string")
        .principalArn("string")
        .acceptLanguage("string")
        .principalType("string")
        .build());
    
    principal_portfolio_association_resource = aws.servicecatalog.PrincipalPortfolioAssociation("principalPortfolioAssociationResource",
        portfolio_id="string",
        principal_arn="string",
        accept_language="string",
        principal_type="string")
    
    const principalPortfolioAssociationResource = new aws.servicecatalog.PrincipalPortfolioAssociation("principalPortfolioAssociationResource", {
        portfolioId: "string",
        principalArn: "string",
        acceptLanguage: "string",
        principalType: "string",
    });
    
    type: aws:servicecatalog:PrincipalPortfolioAssociation
    properties:
        acceptLanguage: string
        portfolioId: string
        principalArn: string
        principalType: string
    

    PrincipalPortfolioAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PrincipalPortfolioAssociation resource accepts the following input properties:

    PortfolioId string
    Portfolio identifier.
    PrincipalArn string

    Principal ARN.

    The following arguments are optional:

    AcceptLanguage string
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    PrincipalType string
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    PortfolioId string
    Portfolio identifier.
    PrincipalArn string

    Principal ARN.

    The following arguments are optional:

    AcceptLanguage string
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    PrincipalType string
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    portfolioId String
    Portfolio identifier.
    principalArn String

    Principal ARN.

    The following arguments are optional:

    acceptLanguage String
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    principalType String
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    portfolioId string
    Portfolio identifier.
    principalArn string

    Principal ARN.

    The following arguments are optional:

    acceptLanguage string
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    principalType string
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    portfolio_id str
    Portfolio identifier.
    principal_arn str

    Principal ARN.

    The following arguments are optional:

    accept_language str
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    principal_type str
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    portfolioId String
    Portfolio identifier.
    principalArn String

    Principal ARN.

    The following arguments are optional:

    acceptLanguage String
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    principalType String
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PrincipalPortfolioAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PrincipalPortfolioAssociation Resource

    Get an existing PrincipalPortfolioAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PrincipalPortfolioAssociationState, opts?: CustomResourceOptions): PrincipalPortfolioAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accept_language: Optional[str] = None,
            portfolio_id: Optional[str] = None,
            principal_arn: Optional[str] = None,
            principal_type: Optional[str] = None) -> PrincipalPortfolioAssociation
    func GetPrincipalPortfolioAssociation(ctx *Context, name string, id IDInput, state *PrincipalPortfolioAssociationState, opts ...ResourceOption) (*PrincipalPortfolioAssociation, error)
    public static PrincipalPortfolioAssociation Get(string name, Input<string> id, PrincipalPortfolioAssociationState? state, CustomResourceOptions? opts = null)
    public static PrincipalPortfolioAssociation get(String name, Output<String> id, PrincipalPortfolioAssociationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AcceptLanguage string
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    PortfolioId string
    Portfolio identifier.
    PrincipalArn string

    Principal ARN.

    The following arguments are optional:

    PrincipalType string
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    AcceptLanguage string
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    PortfolioId string
    Portfolio identifier.
    PrincipalArn string

    Principal ARN.

    The following arguments are optional:

    PrincipalType string
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    acceptLanguage String
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    portfolioId String
    Portfolio identifier.
    principalArn String

    Principal ARN.

    The following arguments are optional:

    principalType String
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    acceptLanguage string
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    portfolioId string
    Portfolio identifier.
    principalArn string

    Principal ARN.

    The following arguments are optional:

    principalType string
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    accept_language str
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    portfolio_id str
    Portfolio identifier.
    principal_arn str

    Principal ARN.

    The following arguments are optional:

    principal_type str
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.
    acceptLanguage String
    Language code. Valid values: en (English), jp (Japanese), zh (Chinese). Default value is en.
    portfolioId String
    Portfolio identifier.
    principalArn String

    Principal ARN.

    The following arguments are optional:

    principalType String
    Principal type. Setting this argument empty (e.g., principal_type = "") will result in an error. Valid values are IAM and IAM_PATTERN. Default is IAM.

    Import

    Using pulumi import, import aws_servicecatalog_principal_portfolio_association using accept_language, principal_arn, portfolio_id, and principal_type separated by a comma. For example:

    $ pulumi import aws:servicecatalog/principalPortfolioAssociation:PrincipalPortfolioAssociation example en,arn:aws:iam::123456789012:user/Eleanor,port-68656c6c6f,IAM
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi