1. Packages
  2. AWS
  3. API Docs
  4. ssoadmin
  5. getPrincipalApplicationAssignments
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ssoadmin.getPrincipalApplicationAssignments

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Data source for viewing AWS SSO Admin Principal Application Assignments.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ssoadmin.getPrincipalApplicationAssignments({
        instanceArn: test.arns[0],
        principalId: testAwsIdentitystoreUser.userId,
        principalType: "USER",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssoadmin.get_principal_application_assignments(instance_arn=test["arns"],
        principal_id=test_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.GetPrincipalApplicationAssignments(ctx, &ssoadmin.GetPrincipalApplicationAssignmentsArgs{
    			InstanceArn:   test.Arns[0],
    			PrincipalId:   testAwsIdentitystoreUser.UserId,
    			PrincipalType: "USER",
    		}, nil)
    		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 = Aws.SsoAdmin.GetPrincipalApplicationAssignments.Invoke(new()
        {
            InstanceArn = test.Arns[0],
            PrincipalId = testAwsIdentitystoreUser.UserId,
            PrincipalType = "USER",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssoadmin.SsoadminFunctions;
    import com.pulumi.aws.ssoadmin.inputs.GetPrincipalApplicationAssignmentsArgs;
    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) {
            final var example = SsoadminFunctions.getPrincipalApplicationAssignments(GetPrincipalApplicationAssignmentsArgs.builder()
                .instanceArn(test.arns()[0])
                .principalId(testAwsIdentitystoreUser.userId())
                .principalType("USER")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:ssoadmin:getPrincipalApplicationAssignments
          Arguments:
            instanceArn: ${test.arns[0]}
            principalId: ${testAwsIdentitystoreUser.userId}
            principalType: USER
    

    Using getPrincipalApplicationAssignments

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPrincipalApplicationAssignments(args: GetPrincipalApplicationAssignmentsArgs, opts?: InvokeOptions): Promise<GetPrincipalApplicationAssignmentsResult>
    function getPrincipalApplicationAssignmentsOutput(args: GetPrincipalApplicationAssignmentsOutputArgs, opts?: InvokeOptions): Output<GetPrincipalApplicationAssignmentsResult>
    def get_principal_application_assignments(application_assignments: Optional[Sequence[GetPrincipalApplicationAssignmentsApplicationAssignment]] = None,
                                              instance_arn: Optional[str] = None,
                                              principal_id: Optional[str] = None,
                                              principal_type: Optional[str] = None,
                                              opts: Optional[InvokeOptions] = None) -> GetPrincipalApplicationAssignmentsResult
    def get_principal_application_assignments_output(application_assignments: Optional[pulumi.Input[Sequence[pulumi.Input[GetPrincipalApplicationAssignmentsApplicationAssignmentArgs]]]] = None,
                                              instance_arn: Optional[pulumi.Input[str]] = None,
                                              principal_id: Optional[pulumi.Input[str]] = None,
                                              principal_type: Optional[pulumi.Input[str]] = None,
                                              opts: Optional[InvokeOptions] = None) -> Output[GetPrincipalApplicationAssignmentsResult]
    func GetPrincipalApplicationAssignments(ctx *Context, args *GetPrincipalApplicationAssignmentsArgs, opts ...InvokeOption) (*GetPrincipalApplicationAssignmentsResult, error)
    func GetPrincipalApplicationAssignmentsOutput(ctx *Context, args *GetPrincipalApplicationAssignmentsOutputArgs, opts ...InvokeOption) GetPrincipalApplicationAssignmentsResultOutput

    > Note: This function is named GetPrincipalApplicationAssignments in the Go SDK.

    public static class GetPrincipalApplicationAssignments 
    {
        public static Task<GetPrincipalApplicationAssignmentsResult> InvokeAsync(GetPrincipalApplicationAssignmentsArgs args, InvokeOptions? opts = null)
        public static Output<GetPrincipalApplicationAssignmentsResult> Invoke(GetPrincipalApplicationAssignmentsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPrincipalApplicationAssignmentsResult> getPrincipalApplicationAssignments(GetPrincipalApplicationAssignmentsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ssoadmin/getPrincipalApplicationAssignments:getPrincipalApplicationAssignments
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceArn string
    ARN of the instance of IAM Identity Center.
    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.
    ApplicationAssignments List<GetPrincipalApplicationAssignmentsApplicationAssignment>
    List of principals assigned to the application. See the application_assignments attribute reference below.
    InstanceArn string
    ARN of the instance of IAM Identity Center.
    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.
    ApplicationAssignments []GetPrincipalApplicationAssignmentsApplicationAssignment
    List of principals assigned to the application. See the application_assignments attribute reference below.
    instanceArn String
    ARN of the instance of IAM Identity Center.
    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.
    applicationAssignments List<GetPrincipalApplicationAssignmentsApplicationAssignment>
    List of principals assigned to the application. See the application_assignments attribute reference below.
    instanceArn string
    ARN of the instance of IAM Identity Center.
    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.
    applicationAssignments GetPrincipalApplicationAssignmentsApplicationAssignment[]
    List of principals assigned to the application. See the application_assignments attribute reference below.
    instance_arn str
    ARN of the instance of IAM Identity Center.
    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.
    application_assignments Sequence[GetPrincipalApplicationAssignmentsApplicationAssignment]
    List of principals assigned to the application. See the application_assignments attribute reference below.
    instanceArn String
    ARN of the instance of IAM Identity Center.
    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.
    applicationAssignments List<Property Map>
    List of principals assigned to the application. See the application_assignments attribute reference below.

    getPrincipalApplicationAssignments Result

    The following output properties are available:

    Id string
    InstanceArn string
    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.
    ApplicationAssignments List<GetPrincipalApplicationAssignmentsApplicationAssignment>
    List of principals assigned to the application. See the application_assignments attribute reference below.
    Id string
    InstanceArn string
    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.
    ApplicationAssignments []GetPrincipalApplicationAssignmentsApplicationAssignment
    List of principals assigned to the application. See the application_assignments attribute reference below.
    id String
    instanceArn String
    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.
    applicationAssignments List<GetPrincipalApplicationAssignmentsApplicationAssignment>
    List of principals assigned to the application. See the application_assignments attribute reference below.
    id string
    instanceArn string
    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.
    applicationAssignments GetPrincipalApplicationAssignmentsApplicationAssignment[]
    List of principals assigned to the application. See the application_assignments attribute reference below.
    id str
    instance_arn str
    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.
    application_assignments Sequence[GetPrincipalApplicationAssignmentsApplicationAssignment]
    List of principals assigned to the application. See the application_assignments attribute reference below.
    id String
    instanceArn String
    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.
    applicationAssignments List<Property Map>
    List of principals assigned to the application. See the application_assignments attribute reference below.

    Supporting Types

    GetPrincipalApplicationAssignmentsApplicationAssignment

    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.

    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.60.0 published on Tuesday, Nov 19, 2024 by Pulumi