1. Packages
  2. AWS
  3. API Docs
  4. appstream
  5. UserStackAssociation
AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi

aws.appstream.UserStackAssociation

Explore with Pulumi AI

Manages an AppStream User Stack association.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.appstream.Stack("test", {name: "STACK NAME"});
const testUser = new aws.appstream.User("test", {
    authenticationType: "USERPOOL",
    userName: "EMAIL",
});
const testUserStackAssociation = new aws.appstream.UserStackAssociation("test", {
    authenticationType: testUser.authenticationType,
    stackName: test.name,
    userName: testUser.userName,
});
Copy
import pulumi
import pulumi_aws as aws

test = aws.appstream.Stack("test", name="STACK NAME")
test_user = aws.appstream.User("test",
    authentication_type="USERPOOL",
    user_name="EMAIL")
test_user_stack_association = aws.appstream.UserStackAssociation("test",
    authentication_type=test_user.authentication_type,
    stack_name=test.name,
    user_name=test_user.user_name)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appstream"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test, err := appstream.NewStack(ctx, "test", &appstream.StackArgs{
			Name: pulumi.String("STACK NAME"),
		})
		if err != nil {
			return err
		}
		testUser, err := appstream.NewUser(ctx, "test", &appstream.UserArgs{
			AuthenticationType: pulumi.String("USERPOOL"),
			UserName:           pulumi.String("EMAIL"),
		})
		if err != nil {
			return err
		}
		_, err = appstream.NewUserStackAssociation(ctx, "test", &appstream.UserStackAssociationArgs{
			AuthenticationType: testUser.AuthenticationType,
			StackName:          test.Name,
			UserName:           testUser.UserName,
		})
		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 test = new Aws.AppStream.Stack("test", new()
    {
        Name = "STACK NAME",
    });

    var testUser = new Aws.AppStream.User("test", new()
    {
        AuthenticationType = "USERPOOL",
        UserName = "EMAIL",
    });

    var testUserStackAssociation = new Aws.AppStream.UserStackAssociation("test", new()
    {
        AuthenticationType = testUser.AuthenticationType,
        StackName = test.Name,
        UserName = testUser.UserName,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appstream.Stack;
import com.pulumi.aws.appstream.StackArgs;
import com.pulumi.aws.appstream.User;
import com.pulumi.aws.appstream.UserArgs;
import com.pulumi.aws.appstream.UserStackAssociation;
import com.pulumi.aws.appstream.UserStackAssociationArgs;
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 test = new Stack("test", StackArgs.builder()
            .name("STACK NAME")
            .build());

        var testUser = new User("testUser", UserArgs.builder()
            .authenticationType("USERPOOL")
            .userName("EMAIL")
            .build());

        var testUserStackAssociation = new UserStackAssociation("testUserStackAssociation", UserStackAssociationArgs.builder()
            .authenticationType(testUser.authenticationType())
            .stackName(test.name())
            .userName(testUser.userName())
            .build());

    }
}
Copy
resources:
  test:
    type: aws:appstream:Stack
    properties:
      name: STACK NAME
  testUser:
    type: aws:appstream:User
    name: test
    properties:
      authenticationType: USERPOOL
      userName: EMAIL
  testUserStackAssociation:
    type: aws:appstream:UserStackAssociation
    name: test
    properties:
      authenticationType: ${testUser.authenticationType}
      stackName: ${test.name}
      userName: ${testUser.userName}
Copy

Create UserStackAssociation Resource

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

Constructor syntax

new UserStackAssociation(name: string, args: UserStackAssociationArgs, opts?: CustomResourceOptions);
@overload
def UserStackAssociation(resource_name: str,
                         args: UserStackAssociationArgs,
                         opts: Optional[ResourceOptions] = None)

@overload
def UserStackAssociation(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         authentication_type: Optional[str] = None,
                         stack_name: Optional[str] = None,
                         user_name: Optional[str] = None,
                         send_email_notification: Optional[bool] = None)
func NewUserStackAssociation(ctx *Context, name string, args UserStackAssociationArgs, opts ...ResourceOption) (*UserStackAssociation, error)
public UserStackAssociation(string name, UserStackAssociationArgs args, CustomResourceOptions? opts = null)
public UserStackAssociation(String name, UserStackAssociationArgs args)
public UserStackAssociation(String name, UserStackAssociationArgs args, CustomResourceOptions options)
type: aws:appstream:UserStackAssociation
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. UserStackAssociationArgs
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. UserStackAssociationArgs
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. UserStackAssociationArgs
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. UserStackAssociationArgs
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. UserStackAssociationArgs
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 userStackAssociationResource = new Aws.AppStream.UserStackAssociation("userStackAssociationResource", new()
{
    AuthenticationType = "string",
    StackName = "string",
    UserName = "string",
    SendEmailNotification = false,
});
Copy
example, err := appstream.NewUserStackAssociation(ctx, "userStackAssociationResource", &appstream.UserStackAssociationArgs{
	AuthenticationType:    pulumi.String("string"),
	StackName:             pulumi.String("string"),
	UserName:              pulumi.String("string"),
	SendEmailNotification: pulumi.Bool(false),
})
Copy
var userStackAssociationResource = new UserStackAssociation("userStackAssociationResource", UserStackAssociationArgs.builder()
    .authenticationType("string")
    .stackName("string")
    .userName("string")
    .sendEmailNotification(false)
    .build());
Copy
user_stack_association_resource = aws.appstream.UserStackAssociation("userStackAssociationResource",
    authentication_type="string",
    stack_name="string",
    user_name="string",
    send_email_notification=False)
Copy
const userStackAssociationResource = new aws.appstream.UserStackAssociation("userStackAssociationResource", {
    authenticationType: "string",
    stackName: "string",
    userName: "string",
    sendEmailNotification: false,
});
Copy
type: aws:appstream:UserStackAssociation
properties:
    authenticationType: string
    sendEmailNotification: false
    stackName: string
    userName: string
Copy

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

AuthenticationType
This property is required.
Changes to this property will trigger replacement.
string
Authentication type for the user.
StackName
This property is required.
Changes to this property will trigger replacement.
string
Name of the stack that is associated with the user.
UserName
This property is required.
Changes to this property will trigger replacement.
string

Email address of the user who is associated with the stack.

The following arguments are optional:

SendEmailNotification bool
Whether a welcome email is sent to a user after the user is created in the user pool.
AuthenticationType
This property is required.
Changes to this property will trigger replacement.
string
Authentication type for the user.
StackName
This property is required.
Changes to this property will trigger replacement.
string
Name of the stack that is associated with the user.
UserName
This property is required.
Changes to this property will trigger replacement.
string

Email address of the user who is associated with the stack.

The following arguments are optional:

SendEmailNotification bool
Whether a welcome email is sent to a user after the user is created in the user pool.
authenticationType
This property is required.
Changes to this property will trigger replacement.
String
Authentication type for the user.
stackName
This property is required.
Changes to this property will trigger replacement.
String
Name of the stack that is associated with the user.
userName
This property is required.
Changes to this property will trigger replacement.
String

Email address of the user who is associated with the stack.

The following arguments are optional:

sendEmailNotification Boolean
Whether a welcome email is sent to a user after the user is created in the user pool.
authenticationType
This property is required.
Changes to this property will trigger replacement.
string
Authentication type for the user.
stackName
This property is required.
Changes to this property will trigger replacement.
string
Name of the stack that is associated with the user.
userName
This property is required.
Changes to this property will trigger replacement.
string

Email address of the user who is associated with the stack.

The following arguments are optional:

sendEmailNotification boolean
Whether a welcome email is sent to a user after the user is created in the user pool.
authentication_type
This property is required.
Changes to this property will trigger replacement.
str
Authentication type for the user.
stack_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the stack that is associated with the user.
user_name
This property is required.
Changes to this property will trigger replacement.
str

Email address of the user who is associated with the stack.

The following arguments are optional:

send_email_notification bool
Whether a welcome email is sent to a user after the user is created in the user pool.
authenticationType
This property is required.
Changes to this property will trigger replacement.
String
Authentication type for the user.
stackName
This property is required.
Changes to this property will trigger replacement.
String
Name of the stack that is associated with the user.
userName
This property is required.
Changes to this property will trigger replacement.
String

Email address of the user who is associated with the stack.

The following arguments are optional:

sendEmailNotification Boolean
Whether a welcome email is sent to a user after the user is created in the user pool.

Outputs

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

Get an existing UserStackAssociation 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?: UserStackAssociationState, opts?: CustomResourceOptions): UserStackAssociation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authentication_type: Optional[str] = None,
        send_email_notification: Optional[bool] = None,
        stack_name: Optional[str] = None,
        user_name: Optional[str] = None) -> UserStackAssociation
func GetUserStackAssociation(ctx *Context, name string, id IDInput, state *UserStackAssociationState, opts ...ResourceOption) (*UserStackAssociation, error)
public static UserStackAssociation Get(string name, Input<string> id, UserStackAssociationState? state, CustomResourceOptions? opts = null)
public static UserStackAssociation get(String name, Output<String> id, UserStackAssociationState state, CustomResourceOptions options)
resources:  _:    type: aws:appstream:UserStackAssociation    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:
AuthenticationType Changes to this property will trigger replacement. string
Authentication type for the user.
SendEmailNotification bool
Whether a welcome email is sent to a user after the user is created in the user pool.
StackName Changes to this property will trigger replacement. string
Name of the stack that is associated with the user.
UserName Changes to this property will trigger replacement. string

Email address of the user who is associated with the stack.

The following arguments are optional:

AuthenticationType Changes to this property will trigger replacement. string
Authentication type for the user.
SendEmailNotification bool
Whether a welcome email is sent to a user after the user is created in the user pool.
StackName Changes to this property will trigger replacement. string
Name of the stack that is associated with the user.
UserName Changes to this property will trigger replacement. string

Email address of the user who is associated with the stack.

The following arguments are optional:

authenticationType Changes to this property will trigger replacement. String
Authentication type for the user.
sendEmailNotification Boolean
Whether a welcome email is sent to a user after the user is created in the user pool.
stackName Changes to this property will trigger replacement. String
Name of the stack that is associated with the user.
userName Changes to this property will trigger replacement. String

Email address of the user who is associated with the stack.

The following arguments are optional:

authenticationType Changes to this property will trigger replacement. string
Authentication type for the user.
sendEmailNotification boolean
Whether a welcome email is sent to a user after the user is created in the user pool.
stackName Changes to this property will trigger replacement. string
Name of the stack that is associated with the user.
userName Changes to this property will trigger replacement. string

Email address of the user who is associated with the stack.

The following arguments are optional:

authentication_type Changes to this property will trigger replacement. str
Authentication type for the user.
send_email_notification bool
Whether a welcome email is sent to a user after the user is created in the user pool.
stack_name Changes to this property will trigger replacement. str
Name of the stack that is associated with the user.
user_name Changes to this property will trigger replacement. str

Email address of the user who is associated with the stack.

The following arguments are optional:

authenticationType Changes to this property will trigger replacement. String
Authentication type for the user.
sendEmailNotification Boolean
Whether a welcome email is sent to a user after the user is created in the user pool.
stackName Changes to this property will trigger replacement. String
Name of the stack that is associated with the user.
userName Changes to this property will trigger replacement. String

Email address of the user who is associated with the stack.

The following arguments are optional:

Import

Using pulumi import, import AppStream User Stack Association using the user_name, authentication_type, and stack_name, separated by a slash (/). For example:

$ pulumi import aws:appstream/userStackAssociation:UserStackAssociation example userName/auhtenticationType/stackName
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.