github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/quicksight/getQuicksightUser.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package quicksight 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // This data source can be used to fetch information about a specific 15 // QuickSight user. By using this data source, you can reference QuickSight user 16 // properties without having to hard code ARNs or unique IDs as input. 17 // 18 // ## Example Usage 19 // 20 // ### Basic Usage 21 // 22 // <!--Start PulumiCodeChooser --> 23 // ```go 24 // package main 25 // 26 // import ( 27 // 28 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/quicksight" 29 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 30 // 31 // ) 32 // 33 // func main() { 34 // pulumi.Run(func(ctx *pulumi.Context) error { 35 // _, err := quicksight.GetQuicksightUser(ctx, &quicksight.GetQuicksightUserArgs{ 36 // UserName: "example", 37 // }, nil) 38 // if err != nil { 39 // return err 40 // } 41 // return nil 42 // }) 43 // } 44 // 45 // ``` 46 // <!--End PulumiCodeChooser --> 47 func GetQuicksightUser(ctx *pulumi.Context, args *GetQuicksightUserArgs, opts ...pulumi.InvokeOption) (*GetQuicksightUserResult, error) { 48 opts = internal.PkgInvokeDefaultOpts(opts) 49 var rv GetQuicksightUserResult 50 err := ctx.Invoke("aws:quicksight/getQuicksightUser:getQuicksightUser", args, &rv, opts...) 51 if err != nil { 52 return nil, err 53 } 54 return &rv, nil 55 } 56 57 // A collection of arguments for invoking getQuicksightUser. 58 type GetQuicksightUserArgs struct { 59 // AWS account ID. 60 AwsAccountId *string `pulumi:"awsAccountId"` 61 // QuickSight namespace. Defaults to `default`. 62 Namespace *string `pulumi:"namespace"` 63 // The name of the user that you want to match. 64 // 65 // The following arguments are optional: 66 UserName string `pulumi:"userName"` 67 } 68 69 // A collection of values returned by getQuicksightUser. 70 type GetQuicksightUserResult struct { 71 // The active status of user. When you create an Amazon QuickSight user that’s not an IAM user or an Active Directory user, that user is inactive until they sign in and provide a password. 72 Active bool `pulumi:"active"` 73 // The Amazon Resource Name (ARN) for the user. 74 Arn string `pulumi:"arn"` 75 AwsAccountId string `pulumi:"awsAccountId"` 76 // The user's email address. 77 Email string `pulumi:"email"` 78 // The provider-assigned unique ID for this managed resource. 79 Id string `pulumi:"id"` 80 // The type of identity authentication used by the user. 81 IdentityType string `pulumi:"identityType"` 82 Namespace *string `pulumi:"namespace"` 83 // The principal ID of the user. 84 PrincipalId string `pulumi:"principalId"` 85 UserName string `pulumi:"userName"` 86 // The Amazon QuickSight role for the user. The user role can be one of the following:. 87 UserRole string `pulumi:"userRole"` 88 } 89 90 func GetQuicksightUserOutput(ctx *pulumi.Context, args GetQuicksightUserOutputArgs, opts ...pulumi.InvokeOption) GetQuicksightUserResultOutput { 91 return pulumi.ToOutputWithContext(context.Background(), args). 92 ApplyT(func(v interface{}) (GetQuicksightUserResult, error) { 93 args := v.(GetQuicksightUserArgs) 94 r, err := GetQuicksightUser(ctx, &args, opts...) 95 var s GetQuicksightUserResult 96 if r != nil { 97 s = *r 98 } 99 return s, err 100 }).(GetQuicksightUserResultOutput) 101 } 102 103 // A collection of arguments for invoking getQuicksightUser. 104 type GetQuicksightUserOutputArgs struct { 105 // AWS account ID. 106 AwsAccountId pulumi.StringPtrInput `pulumi:"awsAccountId"` 107 // QuickSight namespace. Defaults to `default`. 108 Namespace pulumi.StringPtrInput `pulumi:"namespace"` 109 // The name of the user that you want to match. 110 // 111 // The following arguments are optional: 112 UserName pulumi.StringInput `pulumi:"userName"` 113 } 114 115 func (GetQuicksightUserOutputArgs) ElementType() reflect.Type { 116 return reflect.TypeOf((*GetQuicksightUserArgs)(nil)).Elem() 117 } 118 119 // A collection of values returned by getQuicksightUser. 120 type GetQuicksightUserResultOutput struct{ *pulumi.OutputState } 121 122 func (GetQuicksightUserResultOutput) ElementType() reflect.Type { 123 return reflect.TypeOf((*GetQuicksightUserResult)(nil)).Elem() 124 } 125 126 func (o GetQuicksightUserResultOutput) ToGetQuicksightUserResultOutput() GetQuicksightUserResultOutput { 127 return o 128 } 129 130 func (o GetQuicksightUserResultOutput) ToGetQuicksightUserResultOutputWithContext(ctx context.Context) GetQuicksightUserResultOutput { 131 return o 132 } 133 134 // The active status of user. When you create an Amazon QuickSight user that’s not an IAM user or an Active Directory user, that user is inactive until they sign in and provide a password. 135 func (o GetQuicksightUserResultOutput) Active() pulumi.BoolOutput { 136 return o.ApplyT(func(v GetQuicksightUserResult) bool { return v.Active }).(pulumi.BoolOutput) 137 } 138 139 // The Amazon Resource Name (ARN) for the user. 140 func (o GetQuicksightUserResultOutput) Arn() pulumi.StringOutput { 141 return o.ApplyT(func(v GetQuicksightUserResult) string { return v.Arn }).(pulumi.StringOutput) 142 } 143 144 func (o GetQuicksightUserResultOutput) AwsAccountId() pulumi.StringOutput { 145 return o.ApplyT(func(v GetQuicksightUserResult) string { return v.AwsAccountId }).(pulumi.StringOutput) 146 } 147 148 // The user's email address. 149 func (o GetQuicksightUserResultOutput) Email() pulumi.StringOutput { 150 return o.ApplyT(func(v GetQuicksightUserResult) string { return v.Email }).(pulumi.StringOutput) 151 } 152 153 // The provider-assigned unique ID for this managed resource. 154 func (o GetQuicksightUserResultOutput) Id() pulumi.StringOutput { 155 return o.ApplyT(func(v GetQuicksightUserResult) string { return v.Id }).(pulumi.StringOutput) 156 } 157 158 // The type of identity authentication used by the user. 159 func (o GetQuicksightUserResultOutput) IdentityType() pulumi.StringOutput { 160 return o.ApplyT(func(v GetQuicksightUserResult) string { return v.IdentityType }).(pulumi.StringOutput) 161 } 162 163 func (o GetQuicksightUserResultOutput) Namespace() pulumi.StringPtrOutput { 164 return o.ApplyT(func(v GetQuicksightUserResult) *string { return v.Namespace }).(pulumi.StringPtrOutput) 165 } 166 167 // The principal ID of the user. 168 func (o GetQuicksightUserResultOutput) PrincipalId() pulumi.StringOutput { 169 return o.ApplyT(func(v GetQuicksightUserResult) string { return v.PrincipalId }).(pulumi.StringOutput) 170 } 171 172 func (o GetQuicksightUserResultOutput) UserName() pulumi.StringOutput { 173 return o.ApplyT(func(v GetQuicksightUserResult) string { return v.UserName }).(pulumi.StringOutput) 174 } 175 176 // The Amazon QuickSight role for the user. The user role can be one of the following:. 177 func (o GetQuicksightUserResultOutput) UserRole() pulumi.StringOutput { 178 return o.ApplyT(func(v GetQuicksightUserResult) string { return v.UserRole }).(pulumi.StringOutput) 179 } 180 181 func init() { 182 pulumi.RegisterOutputType(GetQuicksightUserResultOutput{}) 183 }