github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/quicksight/group.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  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Resource for managing QuickSight Group
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/quicksight"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := quicksight.NewGroup(ctx, "example", &quicksight.GroupArgs{
    33  //				GroupName: pulumi.String("tf-example"),
    34  //			})
    35  //			if err != nil {
    36  //				return err
    37  //			}
    38  //			return nil
    39  //		})
    40  //	}
    41  //
    42  // ```
    43  // <!--End PulumiCodeChooser -->
    44  //
    45  // ## Import
    46  //
    47  // Using `pulumi import`, import QuickSight Group using the aws account id, namespace and group name separated by `/`. For example:
    48  //
    49  // ```sh
    50  // $ pulumi import aws:quicksight/group:Group example 123456789123/default/tf-example
    51  // ```
    52  type Group struct {
    53  	pulumi.CustomResourceState
    54  
    55  	// Amazon Resource Name (ARN) of group
    56  	Arn pulumi.StringOutput `pulumi:"arn"`
    57  	// The ID for the AWS account that the group is in. Currently, you use the ID for the AWS account that contains your Amazon QuickSight account.
    58  	AwsAccountId pulumi.StringOutput `pulumi:"awsAccountId"`
    59  	// A description for the group.
    60  	Description pulumi.StringPtrOutput `pulumi:"description"`
    61  	// A name for the group.
    62  	GroupName pulumi.StringOutput `pulumi:"groupName"`
    63  	// The namespace. Currently, you should set this to `default`.
    64  	Namespace pulumi.StringPtrOutput `pulumi:"namespace"`
    65  }
    66  
    67  // NewGroup registers a new resource with the given unique name, arguments, and options.
    68  func NewGroup(ctx *pulumi.Context,
    69  	name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error) {
    70  	if args == nil {
    71  		return nil, errors.New("missing one or more required arguments")
    72  	}
    73  
    74  	if args.GroupName == nil {
    75  		return nil, errors.New("invalid value for required argument 'GroupName'")
    76  	}
    77  	opts = internal.PkgResourceDefaultOpts(opts)
    78  	var resource Group
    79  	err := ctx.RegisterResource("aws:quicksight/group:Group", name, args, &resource, opts...)
    80  	if err != nil {
    81  		return nil, err
    82  	}
    83  	return &resource, nil
    84  }
    85  
    86  // GetGroup gets an existing Group resource's state with the given name, ID, and optional
    87  // state properties that are used to uniquely qualify the lookup (nil if not required).
    88  func GetGroup(ctx *pulumi.Context,
    89  	name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error) {
    90  	var resource Group
    91  	err := ctx.ReadResource("aws:quicksight/group:Group", name, id, state, &resource, opts...)
    92  	if err != nil {
    93  		return nil, err
    94  	}
    95  	return &resource, nil
    96  }
    97  
    98  // Input properties used for looking up and filtering Group resources.
    99  type groupState struct {
   100  	// Amazon Resource Name (ARN) of group
   101  	Arn *string `pulumi:"arn"`
   102  	// The ID for the AWS account that the group is in. Currently, you use the ID for the AWS account that contains your Amazon QuickSight account.
   103  	AwsAccountId *string `pulumi:"awsAccountId"`
   104  	// A description for the group.
   105  	Description *string `pulumi:"description"`
   106  	// A name for the group.
   107  	GroupName *string `pulumi:"groupName"`
   108  	// The namespace. Currently, you should set this to `default`.
   109  	Namespace *string `pulumi:"namespace"`
   110  }
   111  
   112  type GroupState struct {
   113  	// Amazon Resource Name (ARN) of group
   114  	Arn pulumi.StringPtrInput
   115  	// The ID for the AWS account that the group is in. Currently, you use the ID for the AWS account that contains your Amazon QuickSight account.
   116  	AwsAccountId pulumi.StringPtrInput
   117  	// A description for the group.
   118  	Description pulumi.StringPtrInput
   119  	// A name for the group.
   120  	GroupName pulumi.StringPtrInput
   121  	// The namespace. Currently, you should set this to `default`.
   122  	Namespace pulumi.StringPtrInput
   123  }
   124  
   125  func (GroupState) ElementType() reflect.Type {
   126  	return reflect.TypeOf((*groupState)(nil)).Elem()
   127  }
   128  
   129  type groupArgs struct {
   130  	// The ID for the AWS account that the group is in. Currently, you use the ID for the AWS account that contains your Amazon QuickSight account.
   131  	AwsAccountId *string `pulumi:"awsAccountId"`
   132  	// A description for the group.
   133  	Description *string `pulumi:"description"`
   134  	// A name for the group.
   135  	GroupName string `pulumi:"groupName"`
   136  	// The namespace. Currently, you should set this to `default`.
   137  	Namespace *string `pulumi:"namespace"`
   138  }
   139  
   140  // The set of arguments for constructing a Group resource.
   141  type GroupArgs struct {
   142  	// The ID for the AWS account that the group is in. Currently, you use the ID for the AWS account that contains your Amazon QuickSight account.
   143  	AwsAccountId pulumi.StringPtrInput
   144  	// A description for the group.
   145  	Description pulumi.StringPtrInput
   146  	// A name for the group.
   147  	GroupName pulumi.StringInput
   148  	// The namespace. Currently, you should set this to `default`.
   149  	Namespace pulumi.StringPtrInput
   150  }
   151  
   152  func (GroupArgs) ElementType() reflect.Type {
   153  	return reflect.TypeOf((*groupArgs)(nil)).Elem()
   154  }
   155  
   156  type GroupInput interface {
   157  	pulumi.Input
   158  
   159  	ToGroupOutput() GroupOutput
   160  	ToGroupOutputWithContext(ctx context.Context) GroupOutput
   161  }
   162  
   163  func (*Group) ElementType() reflect.Type {
   164  	return reflect.TypeOf((**Group)(nil)).Elem()
   165  }
   166  
   167  func (i *Group) ToGroupOutput() GroupOutput {
   168  	return i.ToGroupOutputWithContext(context.Background())
   169  }
   170  
   171  func (i *Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput {
   172  	return pulumi.ToOutputWithContext(ctx, i).(GroupOutput)
   173  }
   174  
   175  // GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values.
   176  // You can construct a concrete instance of `GroupArrayInput` via:
   177  //
   178  //	GroupArray{ GroupArgs{...} }
   179  type GroupArrayInput interface {
   180  	pulumi.Input
   181  
   182  	ToGroupArrayOutput() GroupArrayOutput
   183  	ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput
   184  }
   185  
   186  type GroupArray []GroupInput
   187  
   188  func (GroupArray) ElementType() reflect.Type {
   189  	return reflect.TypeOf((*[]*Group)(nil)).Elem()
   190  }
   191  
   192  func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput {
   193  	return i.ToGroupArrayOutputWithContext(context.Background())
   194  }
   195  
   196  func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput {
   197  	return pulumi.ToOutputWithContext(ctx, i).(GroupArrayOutput)
   198  }
   199  
   200  // GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values.
   201  // You can construct a concrete instance of `GroupMapInput` via:
   202  //
   203  //	GroupMap{ "key": GroupArgs{...} }
   204  type GroupMapInput interface {
   205  	pulumi.Input
   206  
   207  	ToGroupMapOutput() GroupMapOutput
   208  	ToGroupMapOutputWithContext(context.Context) GroupMapOutput
   209  }
   210  
   211  type GroupMap map[string]GroupInput
   212  
   213  func (GroupMap) ElementType() reflect.Type {
   214  	return reflect.TypeOf((*map[string]*Group)(nil)).Elem()
   215  }
   216  
   217  func (i GroupMap) ToGroupMapOutput() GroupMapOutput {
   218  	return i.ToGroupMapOutputWithContext(context.Background())
   219  }
   220  
   221  func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput {
   222  	return pulumi.ToOutputWithContext(ctx, i).(GroupMapOutput)
   223  }
   224  
   225  type GroupOutput struct{ *pulumi.OutputState }
   226  
   227  func (GroupOutput) ElementType() reflect.Type {
   228  	return reflect.TypeOf((**Group)(nil)).Elem()
   229  }
   230  
   231  func (o GroupOutput) ToGroupOutput() GroupOutput {
   232  	return o
   233  }
   234  
   235  func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput {
   236  	return o
   237  }
   238  
   239  // Amazon Resource Name (ARN) of group
   240  func (o GroupOutput) Arn() pulumi.StringOutput {
   241  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   242  }
   243  
   244  // The ID for the AWS account that the group is in. Currently, you use the ID for the AWS account that contains your Amazon QuickSight account.
   245  func (o GroupOutput) AwsAccountId() pulumi.StringOutput {
   246  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.AwsAccountId }).(pulumi.StringOutput)
   247  }
   248  
   249  // A description for the group.
   250  func (o GroupOutput) Description() pulumi.StringPtrOutput {
   251  	return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   252  }
   253  
   254  // A name for the group.
   255  func (o GroupOutput) GroupName() pulumi.StringOutput {
   256  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.GroupName }).(pulumi.StringOutput)
   257  }
   258  
   259  // The namespace. Currently, you should set this to `default`.
   260  func (o GroupOutput) Namespace() pulumi.StringPtrOutput {
   261  	return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.Namespace }).(pulumi.StringPtrOutput)
   262  }
   263  
   264  type GroupArrayOutput struct{ *pulumi.OutputState }
   265  
   266  func (GroupArrayOutput) ElementType() reflect.Type {
   267  	return reflect.TypeOf((*[]*Group)(nil)).Elem()
   268  }
   269  
   270  func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput {
   271  	return o
   272  }
   273  
   274  func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput {
   275  	return o
   276  }
   277  
   278  func (o GroupArrayOutput) Index(i pulumi.IntInput) GroupOutput {
   279  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Group {
   280  		return vs[0].([]*Group)[vs[1].(int)]
   281  	}).(GroupOutput)
   282  }
   283  
   284  type GroupMapOutput struct{ *pulumi.OutputState }
   285  
   286  func (GroupMapOutput) ElementType() reflect.Type {
   287  	return reflect.TypeOf((*map[string]*Group)(nil)).Elem()
   288  }
   289  
   290  func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput {
   291  	return o
   292  }
   293  
   294  func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput {
   295  	return o
   296  }
   297  
   298  func (o GroupMapOutput) MapIndex(k pulumi.StringInput) GroupOutput {
   299  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Group {
   300  		return vs[0].(map[string]*Group)[vs[1].(string)]
   301  	}).(GroupOutput)
   302  }
   303  
   304  func init() {
   305  	pulumi.RegisterInputType(reflect.TypeOf((*GroupInput)(nil)).Elem(), &Group{})
   306  	pulumi.RegisterInputType(reflect.TypeOf((*GroupArrayInput)(nil)).Elem(), GroupArray{})
   307  	pulumi.RegisterInputType(reflect.TypeOf((*GroupMapInput)(nil)).Elem(), GroupMap{})
   308  	pulumi.RegisterOutputType(GroupOutput{})
   309  	pulumi.RegisterOutputType(GroupArrayOutput{})
   310  	pulumi.RegisterOutputType(GroupMapOutput{})
   311  }