1. Packages
  2. AWS Classic
  3. API Docs
  4. quicksight
  5. IamPolicyAssignment

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

AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi

aws.quicksight.IamPolicyAssignment

Explore with Pulumi AI

aws logo

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

AWS Classic v6.24.0 published on Tuesday, Feb 27, 2024 by Pulumi

    Resource for managing an AWS QuickSight IAM Policy Assignment.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Quicksight.IamPolicyAssignment("example", new()
        {
            AssignmentName = "example",
            AssignmentStatus = "ENABLED",
            PolicyArn = aws_iam_policy.Example.Arn,
            Identities = new Aws.Quicksight.Inputs.IamPolicyAssignmentIdentitiesArgs
            {
                Users = new[]
                {
                    aws_quicksight_user.Example.User_name,
                },
            },
        });
    
    });
    
    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.NewIamPolicyAssignment(ctx, "example", &quicksight.IamPolicyAssignmentArgs{
    			AssignmentName:   pulumi.String("example"),
    			AssignmentStatus: pulumi.String("ENABLED"),
    			PolicyArn:        pulumi.Any(aws_iam_policy.Example.Arn),
    			Identities: &quicksight.IamPolicyAssignmentIdentitiesArgs{
    				Users: pulumi.StringArray{
    					aws_quicksight_user.Example.User_name,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.quicksight.IamPolicyAssignment;
    import com.pulumi.aws.quicksight.IamPolicyAssignmentArgs;
    import com.pulumi.aws.quicksight.inputs.IamPolicyAssignmentIdentitiesArgs;
    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 IamPolicyAssignment("example", IamPolicyAssignmentArgs.builder()        
                .assignmentName("example")
                .assignmentStatus("ENABLED")
                .policyArn(aws_iam_policy.example().arn())
                .identities(IamPolicyAssignmentIdentitiesArgs.builder()
                    .users(aws_quicksight_user.example().user_name())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.quicksight.IamPolicyAssignment("example",
        assignment_name="example",
        assignment_status="ENABLED",
        policy_arn=aws_iam_policy["example"]["arn"],
        identities=aws.quicksight.IamPolicyAssignmentIdentitiesArgs(
            users=[aws_quicksight_user["example"]["user_name"]],
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.quicksight.IamPolicyAssignment("example", {
        assignmentName: "example",
        assignmentStatus: "ENABLED",
        policyArn: aws_iam_policy.example.arn,
        identities: {
            users: [aws_quicksight_user.example.user_name],
        },
    });
    
    resources:
      example:
        type: aws:quicksight:IamPolicyAssignment
        properties:
          assignmentName: example
          assignmentStatus: ENABLED
          policyArn: ${aws_iam_policy.example.arn}
          identities:
            users:
              - ${aws_quicksight_user.example.user_name}
    

    Create IamPolicyAssignment Resource

    new IamPolicyAssignment(name: string, args: IamPolicyAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def IamPolicyAssignment(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            assignment_name: Optional[str] = None,
                            assignment_status: Optional[str] = None,
                            aws_account_id: Optional[str] = None,
                            identities: Optional[IamPolicyAssignmentIdentitiesArgs] = None,
                            namespace: Optional[str] = None,
                            policy_arn: Optional[str] = None)
    @overload
    def IamPolicyAssignment(resource_name: str,
                            args: IamPolicyAssignmentArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewIamPolicyAssignment(ctx *Context, name string, args IamPolicyAssignmentArgs, opts ...ResourceOption) (*IamPolicyAssignment, error)
    public IamPolicyAssignment(string name, IamPolicyAssignmentArgs args, CustomResourceOptions? opts = null)
    public IamPolicyAssignment(String name, IamPolicyAssignmentArgs args)
    public IamPolicyAssignment(String name, IamPolicyAssignmentArgs args, CustomResourceOptions options)
    
    type: aws:quicksight:IamPolicyAssignment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args IamPolicyAssignmentArgs
    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 IamPolicyAssignmentArgs
    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 IamPolicyAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamPolicyAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamPolicyAssignmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    AssignmentName string
    Name of the assignment.
    AssignmentStatus string

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    AwsAccountId string
    AWS account ID.
    Identities Pulumi.Aws.Quicksight.Inputs.IamPolicyAssignmentIdentities
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    Namespace string
    Namespace that contains the assignment. Defaults to default.
    PolicyArn string
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    AssignmentName string
    Name of the assignment.
    AssignmentStatus string

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    AwsAccountId string
    AWS account ID.
    Identities IamPolicyAssignmentIdentitiesArgs
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    Namespace string
    Namespace that contains the assignment. Defaults to default.
    PolicyArn string
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    assignmentName String
    Name of the assignment.
    assignmentStatus String

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    awsAccountId String
    AWS account ID.
    identities IamPolicyAssignmentIdentities
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    namespace String
    Namespace that contains the assignment. Defaults to default.
    policyArn String
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    assignmentName string
    Name of the assignment.
    assignmentStatus string

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    awsAccountId string
    AWS account ID.
    identities IamPolicyAssignmentIdentities
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    namespace string
    Namespace that contains the assignment. Defaults to default.
    policyArn string
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    assignment_name str
    Name of the assignment.
    assignment_status str

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    aws_account_id str
    AWS account ID.
    identities IamPolicyAssignmentIdentitiesArgs
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    namespace str
    Namespace that contains the assignment. Defaults to default.
    policy_arn str
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    assignmentName String
    Name of the assignment.
    assignmentStatus String

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    awsAccountId String
    AWS account ID.
    identities Property Map
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    namespace String
    Namespace that contains the assignment. Defaults to default.
    policyArn String
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IamPolicyAssignment resource produces the following output properties:

    AssignmentId string
    Assignment ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    AssignmentId string
    Assignment ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    assignmentId String
    Assignment ID.
    id String
    The provider-assigned unique ID for this managed resource.
    assignmentId string
    Assignment ID.
    id string
    The provider-assigned unique ID for this managed resource.
    assignment_id str
    Assignment ID.
    id str
    The provider-assigned unique ID for this managed resource.
    assignmentId String
    Assignment ID.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IamPolicyAssignment Resource

    Get an existing IamPolicyAssignment 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?: IamPolicyAssignmentState, opts?: CustomResourceOptions): IamPolicyAssignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            assignment_id: Optional[str] = None,
            assignment_name: Optional[str] = None,
            assignment_status: Optional[str] = None,
            aws_account_id: Optional[str] = None,
            identities: Optional[IamPolicyAssignmentIdentitiesArgs] = None,
            namespace: Optional[str] = None,
            policy_arn: Optional[str] = None) -> IamPolicyAssignment
    func GetIamPolicyAssignment(ctx *Context, name string, id IDInput, state *IamPolicyAssignmentState, opts ...ResourceOption) (*IamPolicyAssignment, error)
    public static IamPolicyAssignment Get(string name, Input<string> id, IamPolicyAssignmentState? state, CustomResourceOptions? opts = null)
    public static IamPolicyAssignment get(String name, Output<String> id, IamPolicyAssignmentState 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:
    AssignmentId string
    Assignment ID.
    AssignmentName string
    Name of the assignment.
    AssignmentStatus string

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    AwsAccountId string
    AWS account ID.
    Identities Pulumi.Aws.Quicksight.Inputs.IamPolicyAssignmentIdentities
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    Namespace string
    Namespace that contains the assignment. Defaults to default.
    PolicyArn string
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    AssignmentId string
    Assignment ID.
    AssignmentName string
    Name of the assignment.
    AssignmentStatus string

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    AwsAccountId string
    AWS account ID.
    Identities IamPolicyAssignmentIdentitiesArgs
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    Namespace string
    Namespace that contains the assignment. Defaults to default.
    PolicyArn string
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    assignmentId String
    Assignment ID.
    assignmentName String
    Name of the assignment.
    assignmentStatus String

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    awsAccountId String
    AWS account ID.
    identities IamPolicyAssignmentIdentities
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    namespace String
    Namespace that contains the assignment. Defaults to default.
    policyArn String
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    assignmentId string
    Assignment ID.
    assignmentName string
    Name of the assignment.
    assignmentStatus string

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    awsAccountId string
    AWS account ID.
    identities IamPolicyAssignmentIdentities
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    namespace string
    Namespace that contains the assignment. Defaults to default.
    policyArn string
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    assignment_id str
    Assignment ID.
    assignment_name str
    Name of the assignment.
    assignment_status str

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    aws_account_id str
    AWS account ID.
    identities IamPolicyAssignmentIdentitiesArgs
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    namespace str
    Namespace that contains the assignment. Defaults to default.
    policy_arn str
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.
    assignmentId String
    Assignment ID.
    assignmentName String
    Name of the assignment.
    assignmentStatus String

    Status of the assignment. Valid values are ENABLED, DISABLED, and DRAFT.

    The following arguments are optional:

    awsAccountId String
    AWS account ID.
    identities Property Map
    Amazon QuickSight users, groups, or both to assign the policy to. See identities block.
    namespace String
    Namespace that contains the assignment. Defaults to default.
    policyArn String
    ARN of the IAM policy to apply to the Amazon QuickSight users and groups specified in this assignment.

    Supporting Types

    IamPolicyAssignmentIdentities, IamPolicyAssignmentIdentitiesArgs

    Groups List<string>
    Array of Quicksight group names to assign the policy to.
    Users List<string>
    Array of Quicksight user names to assign the policy to.
    Groups []string
    Array of Quicksight group names to assign the policy to.
    Users []string
    Array of Quicksight user names to assign the policy to.
    groups List<String>
    Array of Quicksight group names to assign the policy to.
    users List<String>
    Array of Quicksight user names to assign the policy to.
    groups string[]
    Array of Quicksight group names to assign the policy to.
    users string[]
    Array of Quicksight user names to assign the policy to.
    groups Sequence[str]
    Array of Quicksight group names to assign the policy to.
    users Sequence[str]
    Array of Quicksight user names to assign the policy to.
    groups List<String>
    Array of Quicksight group names to assign the policy to.
    users List<String>
    Array of Quicksight user names to assign the policy to.

    Import

    Using pulumi import, import QuickSight IAM Policy Assignment using the AWS account ID, namespace, and assignment name separated by commas (,). For example:

     $ pulumi import aws:quicksight/iamPolicyAssignment:IamPolicyAssignment example 123456789012,default,example
    

    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.24.0 published on Tuesday, Feb 27, 2024 by Pulumi