1. Packages
  2. AWS Classic
  3. API Docs
  4. ssoadmin
  5. ApplicationAssignment

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

aws.ssoadmin.ApplicationAssignment

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

    Resource for managing an AWS SSO Admin Application Assignment.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ssoadmin.ApplicationAssignment("example", {
        applicationArn: exampleAwsSsoadminApplication.applicationArn,
        principalId: exampleAwsIdentitystoreUser.userId,
        principalType: "USER",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssoadmin.ApplicationAssignment("example",
        application_arn=example_aws_ssoadmin_application["applicationArn"],
        principal_id=example_aws_identitystore_user["userId"],
        principal_type="USER")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssoadmin.NewApplicationAssignment(ctx, "example", &ssoadmin.ApplicationAssignmentArgs{
    			ApplicationArn: pulumi.Any(exampleAwsSsoadminApplication.ApplicationArn),
    			PrincipalId:    pulumi.Any(exampleAwsIdentitystoreUser.UserId),
    			PrincipalType:  pulumi.String("USER"),
    		})
    		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.SsoAdmin.ApplicationAssignment("example", new()
        {
            ApplicationArn = exampleAwsSsoadminApplication.ApplicationArn,
            PrincipalId = exampleAwsIdentitystoreUser.UserId,
            PrincipalType = "USER",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssoadmin.ApplicationAssignment;
    import com.pulumi.aws.ssoadmin.ApplicationAssignmentArgs;
    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 ApplicationAssignment("example", ApplicationAssignmentArgs.builder()        
                .applicationArn(exampleAwsSsoadminApplication.applicationArn())
                .principalId(exampleAwsIdentitystoreUser.userId())
                .principalType("USER")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ssoadmin:ApplicationAssignment
        properties:
          applicationArn: ${exampleAwsSsoadminApplication.applicationArn}
          principalId: ${exampleAwsIdentitystoreUser.userId}
          principalType: USER
    

    Group Type

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ssoadmin.ApplicationAssignment("example", {
        applicationArn: exampleAwsSsoadminApplication.applicationArn,
        principalId: exampleAwsIdentitystoreGroup.groupId,
        principalType: "GROUP",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssoadmin.ApplicationAssignment("example",
        application_arn=example_aws_ssoadmin_application["applicationArn"],
        principal_id=example_aws_identitystore_group["groupId"],
        principal_type="GROUP")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssoadmin.NewApplicationAssignment(ctx, "example", &ssoadmin.ApplicationAssignmentArgs{
    			ApplicationArn: pulumi.Any(exampleAwsSsoadminApplication.ApplicationArn),
    			PrincipalId:    pulumi.Any(exampleAwsIdentitystoreGroup.GroupId),
    			PrincipalType:  pulumi.String("GROUP"),
    		})
    		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.SsoAdmin.ApplicationAssignment("example", new()
        {
            ApplicationArn = exampleAwsSsoadminApplication.ApplicationArn,
            PrincipalId = exampleAwsIdentitystoreGroup.GroupId,
            PrincipalType = "GROUP",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssoadmin.ApplicationAssignment;
    import com.pulumi.aws.ssoadmin.ApplicationAssignmentArgs;
    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 ApplicationAssignment("example", ApplicationAssignmentArgs.builder()        
                .applicationArn(exampleAwsSsoadminApplication.applicationArn())
                .principalId(exampleAwsIdentitystoreGroup.groupId())
                .principalType("GROUP")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ssoadmin:ApplicationAssignment
        properties:
          applicationArn: ${exampleAwsSsoadminApplication.applicationArn}
          principalId: ${exampleAwsIdentitystoreGroup.groupId}
          principalType: GROUP
    

    Create ApplicationAssignment Resource

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

    Constructor syntax

    new ApplicationAssignment(name: string, args: ApplicationAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def ApplicationAssignment(resource_name: str,
                              args: ApplicationAssignmentArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApplicationAssignment(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              application_arn: Optional[str] = None,
                              principal_id: Optional[str] = None,
                              principal_type: Optional[str] = None)
    func NewApplicationAssignment(ctx *Context, name string, args ApplicationAssignmentArgs, opts ...ResourceOption) (*ApplicationAssignment, error)
    public ApplicationAssignment(string name, ApplicationAssignmentArgs args, CustomResourceOptions? opts = null)
    public ApplicationAssignment(String name, ApplicationAssignmentArgs args)
    public ApplicationAssignment(String name, ApplicationAssignmentArgs args, CustomResourceOptions options)
    
    type: aws:ssoadmin:ApplicationAssignment
    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 ApplicationAssignmentArgs
    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 ApplicationAssignmentArgs
    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 ApplicationAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApplicationAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApplicationAssignmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var applicationAssignmentResource = new Aws.SsoAdmin.ApplicationAssignment("applicationAssignmentResource", new()
    {
        ApplicationArn = "string",
        PrincipalId = "string",
        PrincipalType = "string",
    });
    
    example, err := ssoadmin.NewApplicationAssignment(ctx, "applicationAssignmentResource", &ssoadmin.ApplicationAssignmentArgs{
    	ApplicationArn: pulumi.String("string"),
    	PrincipalId:    pulumi.String("string"),
    	PrincipalType:  pulumi.String("string"),
    })
    
    var applicationAssignmentResource = new ApplicationAssignment("applicationAssignmentResource", ApplicationAssignmentArgs.builder()        
        .applicationArn("string")
        .principalId("string")
        .principalType("string")
        .build());
    
    application_assignment_resource = aws.ssoadmin.ApplicationAssignment("applicationAssignmentResource",
        application_arn="string",
        principal_id="string",
        principal_type="string")
    
    const applicationAssignmentResource = new aws.ssoadmin.ApplicationAssignment("applicationAssignmentResource", {
        applicationArn: "string",
        principalId: "string",
        principalType: "string",
    });
    
    type: aws:ssoadmin:ApplicationAssignment
    properties:
        applicationArn: string
        principalId: string
        principalType: string
    

    ApplicationAssignment 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 ApplicationAssignment resource accepts the following input properties:

    ApplicationArn string
    ARN of the application.
    PrincipalId string
    An identifier for an object in IAM Identity Center, such as a user or group.
    PrincipalType string
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    ApplicationArn string
    ARN of the application.
    PrincipalId string
    An identifier for an object in IAM Identity Center, such as a user or group.
    PrincipalType string
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    applicationArn String
    ARN of the application.
    principalId String
    An identifier for an object in IAM Identity Center, such as a user or group.
    principalType String
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    applicationArn string
    ARN of the application.
    principalId string
    An identifier for an object in IAM Identity Center, such as a user or group.
    principalType string
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    application_arn str
    ARN of the application.
    principal_id str
    An identifier for an object in IAM Identity Center, such as a user or group.
    principal_type str
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    applicationArn String
    ARN of the application.
    principalId String
    An identifier for an object in IAM Identity Center, such as a user or group.
    principalType String
    Entity type for which the assignment will be created. Valid values are USER or GROUP.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApplicationAssignment 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 ApplicationAssignment Resource

    Get an existing ApplicationAssignment 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?: ApplicationAssignmentState, opts?: CustomResourceOptions): ApplicationAssignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_arn: Optional[str] = None,
            principal_id: Optional[str] = None,
            principal_type: Optional[str] = None) -> ApplicationAssignment
    func GetApplicationAssignment(ctx *Context, name string, id IDInput, state *ApplicationAssignmentState, opts ...ResourceOption) (*ApplicationAssignment, error)
    public static ApplicationAssignment Get(string name, Input<string> id, ApplicationAssignmentState? state, CustomResourceOptions? opts = null)
    public static ApplicationAssignment get(String name, Output<String> id, ApplicationAssignmentState 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:
    ApplicationArn string
    ARN of the application.
    PrincipalId string
    An identifier for an object in IAM Identity Center, such as a user or group.
    PrincipalType string
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    ApplicationArn string
    ARN of the application.
    PrincipalId string
    An identifier for an object in IAM Identity Center, such as a user or group.
    PrincipalType string
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    applicationArn String
    ARN of the application.
    principalId String
    An identifier for an object in IAM Identity Center, such as a user or group.
    principalType String
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    applicationArn string
    ARN of the application.
    principalId string
    An identifier for an object in IAM Identity Center, such as a user or group.
    principalType string
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    application_arn str
    ARN of the application.
    principal_id str
    An identifier for an object in IAM Identity Center, such as a user or group.
    principal_type str
    Entity type for which the assignment will be created. Valid values are USER or GROUP.
    applicationArn String
    ARN of the application.
    principalId String
    An identifier for an object in IAM Identity Center, such as a user or group.
    principalType String
    Entity type for which the assignment will be created. Valid values are USER or GROUP.

    Import

    Using pulumi import, import SSO Admin Application Assignment using the id. For example:

    $ pulumi import aws:ssoadmin/applicationAssignment:ApplicationAssignment example arn:aws:sso::012345678901:application/id-12345678,abcd1234,USER
    

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi