1. Packages
  2. AWS
  3. API Docs
  4. ssoadmin
  5. ApplicationAssignment
AWS v6.77.1 published on Friday, Apr 18, 2025 by Pulumi

aws.ssoadmin.ApplicationAssignment

Explore with Pulumi AI

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
resources:
  example:
    type: aws:ssoadmin:ApplicationAssignment
    properties:
      applicationArn: ${exampleAwsSsoadminApplication.applicationArn}
      principalId: ${exampleAwsIdentitystoreUser.userId}
      principalType: USER
Copy

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
resources:
  example:
    type: aws:ssoadmin:ApplicationAssignment
    properties:
      applicationArn: ${exampleAwsSsoadminApplication.applicationArn}
      principalId: ${exampleAwsIdentitystoreGroup.groupId}
      principalType: GROUP
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. ApplicationAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. ApplicationAssignmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ApplicationAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ApplicationAssignmentArgs
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 applicationAssignmentResource = new Aws.SsoAdmin.ApplicationAssignment("applicationAssignmentResource", new()
{
    ApplicationArn = "string",
    PrincipalId = "string",
    PrincipalType = "string",
});
Copy
example, err := ssoadmin.NewApplicationAssignment(ctx, "applicationAssignmentResource", &ssoadmin.ApplicationAssignmentArgs{
	ApplicationArn: pulumi.String("string"),
	PrincipalId:    pulumi.String("string"),
	PrincipalType:  pulumi.String("string"),
})
Copy
var applicationAssignmentResource = new ApplicationAssignment("applicationAssignmentResource", ApplicationAssignmentArgs.builder()
    .applicationArn("string")
    .principalId("string")
    .principalType("string")
    .build());
Copy
application_assignment_resource = aws.ssoadmin.ApplicationAssignment("applicationAssignmentResource",
    application_arn="string",
    principal_id="string",
    principal_type="string")
Copy
const applicationAssignmentResource = new aws.ssoadmin.ApplicationAssignment("applicationAssignmentResource", {
    applicationArn: "string",
    principalId: "string",
    principalType: "string",
});
Copy
type: aws:ssoadmin:ApplicationAssignment
properties:
    applicationArn: string
    principalId: string
    principalType: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ApplicationAssignment resource accepts the following input properties:

ApplicationArn This property is required. string
ARN of the application.
PrincipalId This property is required. string
An identifier for an object in IAM Identity Center, such as a user or group.
PrincipalType This property is required. string
Entity type for which the assignment will be created. Valid values are USER or GROUP.
ApplicationArn This property is required. string
ARN of the application.
PrincipalId This property is required. string
An identifier for an object in IAM Identity Center, such as a user or group.
PrincipalType This property is required. string
Entity type for which the assignment will be created. Valid values are USER or GROUP.
applicationArn This property is required. String
ARN of the application.
principalId This property is required. String
An identifier for an object in IAM Identity Center, such as a user or group.
principalType This property is required. String
Entity type for which the assignment will be created. Valid values are USER or GROUP.
applicationArn This property is required. string
ARN of the application.
principalId This property is required. string
An identifier for an object in IAM Identity Center, such as a user or group.
principalType This property is required. string
Entity type for which the assignment will be created. Valid values are USER or GROUP.
application_arn This property is required. str
ARN of the application.
principal_id This property is required. str
An identifier for an object in IAM Identity Center, such as a user or group.
principal_type This property is required. str
Entity type for which the assignment will be created. Valid values are USER or GROUP.
applicationArn This property is required. String
ARN of the application.
principalId This property is required. String
An identifier for an object in IAM Identity Center, such as a user or group.
principalType This property is required. 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)
resources:  _:    type: aws:ssoadmin:ApplicationAssignment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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::123456789012:application/id-12345678,abcd1234,USER
Copy

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.