1. Packages
  2. AWS
  3. API Docs
  4. quicksight
  5. RoleMembership
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

aws.quicksight.RoleMembership

Explore with Pulumi AI

Resource for managing an AWS QuickSight Role Membership.

The role membership APIs are disabled for identities managed by QuickSight. This resource can only be used when the QuickSight account subscription uses the Active Directory or IAM Identity Center authentication method.

Example Usage

Basic Usage

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

const example = new aws.quicksight.RoleMembership("example", {
    memberName: "example-group",
    role: "READER",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.quicksight.RoleMembership("example",
    member_name="example-group",
    role="READER")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := quicksight.NewRoleMembership(ctx, "example", &quicksight.RoleMembershipArgs{
			MemberName: pulumi.String("example-group"),
			Role:       pulumi.String("READER"),
		})
		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.Quicksight.RoleMembership("example", new()
    {
        MemberName = "example-group",
        Role = "READER",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.quicksight.RoleMembership;
import com.pulumi.aws.quicksight.RoleMembershipArgs;
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 RoleMembership("example", RoleMembershipArgs.builder()
            .memberName("example-group")
            .role("READER")
            .build());

    }
}
Copy
resources:
  example:
    type: aws:quicksight:RoleMembership
    properties:
      memberName: example-group
      role: READER
Copy

Create RoleMembership Resource

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

Constructor syntax

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

@overload
def RoleMembership(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   member_name: Optional[str] = None,
                   role: Optional[str] = None,
                   aws_account_id: Optional[str] = None,
                   namespace: Optional[str] = None)
func NewRoleMembership(ctx *Context, name string, args RoleMembershipArgs, opts ...ResourceOption) (*RoleMembership, error)
public RoleMembership(string name, RoleMembershipArgs args, CustomResourceOptions? opts = null)
public RoleMembership(String name, RoleMembershipArgs args)
public RoleMembership(String name, RoleMembershipArgs args, CustomResourceOptions options)
type: aws:quicksight:RoleMembership
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. RoleMembershipArgs
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. RoleMembershipArgs
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. RoleMembershipArgs
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. RoleMembershipArgs
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. RoleMembershipArgs
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 roleMembershipResource = new Aws.Quicksight.RoleMembership("roleMembershipResource", new()
{
    MemberName = "string",
    Role = "string",
    AwsAccountId = "string",
    Namespace = "string",
});
Copy
example, err := quicksight.NewRoleMembership(ctx, "roleMembershipResource", &quicksight.RoleMembershipArgs{
	MemberName:   pulumi.String("string"),
	Role:         pulumi.String("string"),
	AwsAccountId: pulumi.String("string"),
	Namespace:    pulumi.String("string"),
})
Copy
var roleMembershipResource = new RoleMembership("roleMembershipResource", RoleMembershipArgs.builder()
    .memberName("string")
    .role("string")
    .awsAccountId("string")
    .namespace("string")
    .build());
Copy
role_membership_resource = aws.quicksight.RoleMembership("roleMembershipResource",
    member_name="string",
    role="string",
    aws_account_id="string",
    namespace="string")
Copy
const roleMembershipResource = new aws.quicksight.RoleMembership("roleMembershipResource", {
    memberName: "string",
    role: "string",
    awsAccountId: "string",
    namespace: "string",
});
Copy
type: aws:quicksight:RoleMembership
properties:
    awsAccountId: string
    memberName: string
    namespace: string
    role: string
Copy

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

MemberName This property is required. string
Name of the group to be added to the role.
Role This property is required. string

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

AwsAccountId string
AWS account ID. Defaults to the account of the caller identity if not configured.
Namespace string
Name of the namespace. Defaults to default.
MemberName This property is required. string
Name of the group to be added to the role.
Role This property is required. string

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

AwsAccountId string
AWS account ID. Defaults to the account of the caller identity if not configured.
Namespace string
Name of the namespace. Defaults to default.
memberName This property is required. String
Name of the group to be added to the role.
role This property is required. String

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

awsAccountId String
AWS account ID. Defaults to the account of the caller identity if not configured.
namespace String
Name of the namespace. Defaults to default.
memberName This property is required. string
Name of the group to be added to the role.
role This property is required. string

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

awsAccountId string
AWS account ID. Defaults to the account of the caller identity if not configured.
namespace string
Name of the namespace. Defaults to default.
member_name This property is required. str
Name of the group to be added to the role.
role This property is required. str

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

aws_account_id str
AWS account ID. Defaults to the account of the caller identity if not configured.
namespace str
Name of the namespace. Defaults to default.
memberName This property is required. String
Name of the group to be added to the role.
role This property is required. String

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

awsAccountId String
AWS account ID. Defaults to the account of the caller identity if not configured.
namespace String
Name of the namespace. Defaults to default.

Outputs

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

Get an existing RoleMembership 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?: RoleMembershipState, opts?: CustomResourceOptions): RoleMembership
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        aws_account_id: Optional[str] = None,
        member_name: Optional[str] = None,
        namespace: Optional[str] = None,
        role: Optional[str] = None) -> RoleMembership
func GetRoleMembership(ctx *Context, name string, id IDInput, state *RoleMembershipState, opts ...ResourceOption) (*RoleMembership, error)
public static RoleMembership Get(string name, Input<string> id, RoleMembershipState? state, CustomResourceOptions? opts = null)
public static RoleMembership get(String name, Output<String> id, RoleMembershipState state, CustomResourceOptions options)
resources:  _:    type: aws:quicksight:RoleMembership    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:
AwsAccountId string
AWS account ID. Defaults to the account of the caller identity if not configured.
MemberName string
Name of the group to be added to the role.
Namespace string
Name of the namespace. Defaults to default.
Role string

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

AwsAccountId string
AWS account ID. Defaults to the account of the caller identity if not configured.
MemberName string
Name of the group to be added to the role.
Namespace string
Name of the namespace. Defaults to default.
Role string

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

awsAccountId String
AWS account ID. Defaults to the account of the caller identity if not configured.
memberName String
Name of the group to be added to the role.
namespace String
Name of the namespace. Defaults to default.
role String

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

awsAccountId string
AWS account ID. Defaults to the account of the caller identity if not configured.
memberName string
Name of the group to be added to the role.
namespace string
Name of the namespace. Defaults to default.
role string

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

aws_account_id str
AWS account ID. Defaults to the account of the caller identity if not configured.
member_name str
Name of the group to be added to the role.
namespace str
Name of the namespace. Defaults to default.
role str

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

awsAccountId String
AWS account ID. Defaults to the account of the caller identity if not configured.
memberName String
Name of the group to be added to the role.
namespace String
Name of the namespace. Defaults to default.
role String

Role to add the group to. Valid values are ADMIN, AUTHOR, READER, ADMIN_PRO, AUTHOR_PRO, and READER_PRO.

The following arguments are optional:

Import

Using pulumi import, import QuickSight Role Membership using a comma-delimited string combining the aws_account_id, namespace, role, and member_name. For example:

$ pulumi import aws:quicksight/roleMembership:RoleMembership example 012345678901,default,READER,example-group
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.