github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/quicksight/getQuicksightGroup.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 group. By using this data source, you can reference QuickSight group
    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.GetQuicksightGroup(ctx, &quicksight.GetQuicksightGroupArgs{
    36  //				GroupName: "example",
    37  //			}, nil)
    38  //			if err != nil {
    39  //				return err
    40  //			}
    41  //			return nil
    42  //		})
    43  //	}
    44  //
    45  // ```
    46  // <!--End PulumiCodeChooser -->
    47  func GetQuicksightGroup(ctx *pulumi.Context, args *GetQuicksightGroupArgs, opts ...pulumi.InvokeOption) (*GetQuicksightGroupResult, error) {
    48  	opts = internal.PkgInvokeDefaultOpts(opts)
    49  	var rv GetQuicksightGroupResult
    50  	err := ctx.Invoke("aws:quicksight/getQuicksightGroup:getQuicksightGroup", 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 getQuicksightGroup.
    58  type GetQuicksightGroupArgs struct {
    59  	// AWS account ID.
    60  	AwsAccountId *string `pulumi:"awsAccountId"`
    61  	// The name of the group that you want to match.
    62  	//
    63  	// The following arguments are optional:
    64  	GroupName string `pulumi:"groupName"`
    65  	// QuickSight namespace. Defaults to `default`.
    66  	Namespace *string `pulumi:"namespace"`
    67  }
    68  
    69  // A collection of values returned by getQuicksightGroup.
    70  type GetQuicksightGroupResult struct {
    71  	// The Amazon Resource Name (ARN) for the group.
    72  	Arn          string `pulumi:"arn"`
    73  	AwsAccountId string `pulumi:"awsAccountId"`
    74  	// The group description.
    75  	Description string `pulumi:"description"`
    76  	GroupName   string `pulumi:"groupName"`
    77  	// The provider-assigned unique ID for this managed resource.
    78  	Id        string  `pulumi:"id"`
    79  	Namespace *string `pulumi:"namespace"`
    80  	// The principal ID of the group.
    81  	PrincipalId string `pulumi:"principalId"`
    82  }
    83  
    84  func GetQuicksightGroupOutput(ctx *pulumi.Context, args GetQuicksightGroupOutputArgs, opts ...pulumi.InvokeOption) GetQuicksightGroupResultOutput {
    85  	return pulumi.ToOutputWithContext(context.Background(), args).
    86  		ApplyT(func(v interface{}) (GetQuicksightGroupResult, error) {
    87  			args := v.(GetQuicksightGroupArgs)
    88  			r, err := GetQuicksightGroup(ctx, &args, opts...)
    89  			var s GetQuicksightGroupResult
    90  			if r != nil {
    91  				s = *r
    92  			}
    93  			return s, err
    94  		}).(GetQuicksightGroupResultOutput)
    95  }
    96  
    97  // A collection of arguments for invoking getQuicksightGroup.
    98  type GetQuicksightGroupOutputArgs struct {
    99  	// AWS account ID.
   100  	AwsAccountId pulumi.StringPtrInput `pulumi:"awsAccountId"`
   101  	// The name of the group that you want to match.
   102  	//
   103  	// The following arguments are optional:
   104  	GroupName pulumi.StringInput `pulumi:"groupName"`
   105  	// QuickSight namespace. Defaults to `default`.
   106  	Namespace pulumi.StringPtrInput `pulumi:"namespace"`
   107  }
   108  
   109  func (GetQuicksightGroupOutputArgs) ElementType() reflect.Type {
   110  	return reflect.TypeOf((*GetQuicksightGroupArgs)(nil)).Elem()
   111  }
   112  
   113  // A collection of values returned by getQuicksightGroup.
   114  type GetQuicksightGroupResultOutput struct{ *pulumi.OutputState }
   115  
   116  func (GetQuicksightGroupResultOutput) ElementType() reflect.Type {
   117  	return reflect.TypeOf((*GetQuicksightGroupResult)(nil)).Elem()
   118  }
   119  
   120  func (o GetQuicksightGroupResultOutput) ToGetQuicksightGroupResultOutput() GetQuicksightGroupResultOutput {
   121  	return o
   122  }
   123  
   124  func (o GetQuicksightGroupResultOutput) ToGetQuicksightGroupResultOutputWithContext(ctx context.Context) GetQuicksightGroupResultOutput {
   125  	return o
   126  }
   127  
   128  // The Amazon Resource Name (ARN) for the group.
   129  func (o GetQuicksightGroupResultOutput) Arn() pulumi.StringOutput {
   130  	return o.ApplyT(func(v GetQuicksightGroupResult) string { return v.Arn }).(pulumi.StringOutput)
   131  }
   132  
   133  func (o GetQuicksightGroupResultOutput) AwsAccountId() pulumi.StringOutput {
   134  	return o.ApplyT(func(v GetQuicksightGroupResult) string { return v.AwsAccountId }).(pulumi.StringOutput)
   135  }
   136  
   137  // The group description.
   138  func (o GetQuicksightGroupResultOutput) Description() pulumi.StringOutput {
   139  	return o.ApplyT(func(v GetQuicksightGroupResult) string { return v.Description }).(pulumi.StringOutput)
   140  }
   141  
   142  func (o GetQuicksightGroupResultOutput) GroupName() pulumi.StringOutput {
   143  	return o.ApplyT(func(v GetQuicksightGroupResult) string { return v.GroupName }).(pulumi.StringOutput)
   144  }
   145  
   146  // The provider-assigned unique ID for this managed resource.
   147  func (o GetQuicksightGroupResultOutput) Id() pulumi.StringOutput {
   148  	return o.ApplyT(func(v GetQuicksightGroupResult) string { return v.Id }).(pulumi.StringOutput)
   149  }
   150  
   151  func (o GetQuicksightGroupResultOutput) Namespace() pulumi.StringPtrOutput {
   152  	return o.ApplyT(func(v GetQuicksightGroupResult) *string { return v.Namespace }).(pulumi.StringPtrOutput)
   153  }
   154  
   155  // The principal ID of the group.
   156  func (o GetQuicksightGroupResultOutput) PrincipalId() pulumi.StringOutput {
   157  	return o.ApplyT(func(v GetQuicksightGroupResult) string { return v.PrincipalId }).(pulumi.StringOutput)
   158  }
   159  
   160  func init() {
   161  	pulumi.RegisterOutputType(GetQuicksightGroupResultOutput{})
   162  }