github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/verifiedaccess/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 verifiedaccess
     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 a Verified Access Group.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic Usage
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/verifiedaccess"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			_, err := verifiedaccess.NewGroup(ctx, "example", &verifiedaccess.GroupArgs{
    35  //				VerifiedaccessInstanceId: pulumi.Any(exampleAwsVerifiedaccessInstance.Id),
    36  //			})
    37  //			if err != nil {
    38  //				return err
    39  //			}
    40  //			return nil
    41  //		})
    42  //	}
    43  //
    44  // ```
    45  // <!--End PulumiCodeChooser -->
    46  type Group struct {
    47  	pulumi.CustomResourceState
    48  
    49  	// Timestamp when the access group was created.
    50  	CreationTime pulumi.StringOutput `pulumi:"creationTime"`
    51  	// Timestamp when the access group was deleted.
    52  	DeletionTime pulumi.StringOutput `pulumi:"deletionTime"`
    53  	// Description of the verified access group.
    54  	Description pulumi.StringOutput `pulumi:"description"`
    55  	// Timestamp when the access group was last updated.
    56  	LastUpdatedTime pulumi.StringOutput `pulumi:"lastUpdatedTime"`
    57  	// AWS account number owning this resource.
    58  	Owner pulumi.StringOutput `pulumi:"owner"`
    59  	// The policy document that is associated with this resource.
    60  	PolicyDocument pulumi.StringPtrOutput `pulumi:"policyDocument"`
    61  	// Configuration block to use KMS keys for server-side encryption.
    62  	SseConfiguration GroupSseConfigurationOutput `pulumi:"sseConfiguration"`
    63  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    64  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    65  	// Deprecated: Please use `tags` instead.
    66  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    67  	// ARN of this verified acess group.
    68  	VerifiedaccessGroupArn pulumi.StringOutput `pulumi:"verifiedaccessGroupArn"`
    69  	// ID of this verified access group.
    70  	VerifiedaccessGroupId pulumi.StringOutput `pulumi:"verifiedaccessGroupId"`
    71  	// The id of the verified access instance this group is associated with.
    72  	//
    73  	// The following arguments are optional:
    74  	VerifiedaccessInstanceId pulumi.StringOutput `pulumi:"verifiedaccessInstanceId"`
    75  }
    76  
    77  // NewGroup registers a new resource with the given unique name, arguments, and options.
    78  func NewGroup(ctx *pulumi.Context,
    79  	name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error) {
    80  	if args == nil {
    81  		return nil, errors.New("missing one or more required arguments")
    82  	}
    83  
    84  	if args.VerifiedaccessInstanceId == nil {
    85  		return nil, errors.New("invalid value for required argument 'VerifiedaccessInstanceId'")
    86  	}
    87  	opts = internal.PkgResourceDefaultOpts(opts)
    88  	var resource Group
    89  	err := ctx.RegisterResource("aws:verifiedaccess/group:Group", name, args, &resource, opts...)
    90  	if err != nil {
    91  		return nil, err
    92  	}
    93  	return &resource, nil
    94  }
    95  
    96  // GetGroup gets an existing Group resource's state with the given name, ID, and optional
    97  // state properties that are used to uniquely qualify the lookup (nil if not required).
    98  func GetGroup(ctx *pulumi.Context,
    99  	name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error) {
   100  	var resource Group
   101  	err := ctx.ReadResource("aws:verifiedaccess/group:Group", name, id, state, &resource, opts...)
   102  	if err != nil {
   103  		return nil, err
   104  	}
   105  	return &resource, nil
   106  }
   107  
   108  // Input properties used for looking up and filtering Group resources.
   109  type groupState struct {
   110  	// Timestamp when the access group was created.
   111  	CreationTime *string `pulumi:"creationTime"`
   112  	// Timestamp when the access group was deleted.
   113  	DeletionTime *string `pulumi:"deletionTime"`
   114  	// Description of the verified access group.
   115  	Description *string `pulumi:"description"`
   116  	// Timestamp when the access group was last updated.
   117  	LastUpdatedTime *string `pulumi:"lastUpdatedTime"`
   118  	// AWS account number owning this resource.
   119  	Owner *string `pulumi:"owner"`
   120  	// The policy document that is associated with this resource.
   121  	PolicyDocument *string `pulumi:"policyDocument"`
   122  	// Configuration block to use KMS keys for server-side encryption.
   123  	SseConfiguration *GroupSseConfiguration `pulumi:"sseConfiguration"`
   124  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   125  	Tags map[string]string `pulumi:"tags"`
   126  	// Deprecated: Please use `tags` instead.
   127  	TagsAll map[string]string `pulumi:"tagsAll"`
   128  	// ARN of this verified acess group.
   129  	VerifiedaccessGroupArn *string `pulumi:"verifiedaccessGroupArn"`
   130  	// ID of this verified access group.
   131  	VerifiedaccessGroupId *string `pulumi:"verifiedaccessGroupId"`
   132  	// The id of the verified access instance this group is associated with.
   133  	//
   134  	// The following arguments are optional:
   135  	VerifiedaccessInstanceId *string `pulumi:"verifiedaccessInstanceId"`
   136  }
   137  
   138  type GroupState struct {
   139  	// Timestamp when the access group was created.
   140  	CreationTime pulumi.StringPtrInput
   141  	// Timestamp when the access group was deleted.
   142  	DeletionTime pulumi.StringPtrInput
   143  	// Description of the verified access group.
   144  	Description pulumi.StringPtrInput
   145  	// Timestamp when the access group was last updated.
   146  	LastUpdatedTime pulumi.StringPtrInput
   147  	// AWS account number owning this resource.
   148  	Owner pulumi.StringPtrInput
   149  	// The policy document that is associated with this resource.
   150  	PolicyDocument pulumi.StringPtrInput
   151  	// Configuration block to use KMS keys for server-side encryption.
   152  	SseConfiguration GroupSseConfigurationPtrInput
   153  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   154  	Tags pulumi.StringMapInput
   155  	// Deprecated: Please use `tags` instead.
   156  	TagsAll pulumi.StringMapInput
   157  	// ARN of this verified acess group.
   158  	VerifiedaccessGroupArn pulumi.StringPtrInput
   159  	// ID of this verified access group.
   160  	VerifiedaccessGroupId pulumi.StringPtrInput
   161  	// The id of the verified access instance this group is associated with.
   162  	//
   163  	// The following arguments are optional:
   164  	VerifiedaccessInstanceId pulumi.StringPtrInput
   165  }
   166  
   167  func (GroupState) ElementType() reflect.Type {
   168  	return reflect.TypeOf((*groupState)(nil)).Elem()
   169  }
   170  
   171  type groupArgs struct {
   172  	// Description of the verified access group.
   173  	Description *string `pulumi:"description"`
   174  	// The policy document that is associated with this resource.
   175  	PolicyDocument *string `pulumi:"policyDocument"`
   176  	// Configuration block to use KMS keys for server-side encryption.
   177  	SseConfiguration *GroupSseConfiguration `pulumi:"sseConfiguration"`
   178  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   179  	Tags map[string]string `pulumi:"tags"`
   180  	// The id of the verified access instance this group is associated with.
   181  	//
   182  	// The following arguments are optional:
   183  	VerifiedaccessInstanceId string `pulumi:"verifiedaccessInstanceId"`
   184  }
   185  
   186  // The set of arguments for constructing a Group resource.
   187  type GroupArgs struct {
   188  	// Description of the verified access group.
   189  	Description pulumi.StringPtrInput
   190  	// The policy document that is associated with this resource.
   191  	PolicyDocument pulumi.StringPtrInput
   192  	// Configuration block to use KMS keys for server-side encryption.
   193  	SseConfiguration GroupSseConfigurationPtrInput
   194  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   195  	Tags pulumi.StringMapInput
   196  	// The id of the verified access instance this group is associated with.
   197  	//
   198  	// The following arguments are optional:
   199  	VerifiedaccessInstanceId pulumi.StringInput
   200  }
   201  
   202  func (GroupArgs) ElementType() reflect.Type {
   203  	return reflect.TypeOf((*groupArgs)(nil)).Elem()
   204  }
   205  
   206  type GroupInput interface {
   207  	pulumi.Input
   208  
   209  	ToGroupOutput() GroupOutput
   210  	ToGroupOutputWithContext(ctx context.Context) GroupOutput
   211  }
   212  
   213  func (*Group) ElementType() reflect.Type {
   214  	return reflect.TypeOf((**Group)(nil)).Elem()
   215  }
   216  
   217  func (i *Group) ToGroupOutput() GroupOutput {
   218  	return i.ToGroupOutputWithContext(context.Background())
   219  }
   220  
   221  func (i *Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput {
   222  	return pulumi.ToOutputWithContext(ctx, i).(GroupOutput)
   223  }
   224  
   225  // GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values.
   226  // You can construct a concrete instance of `GroupArrayInput` via:
   227  //
   228  //	GroupArray{ GroupArgs{...} }
   229  type GroupArrayInput interface {
   230  	pulumi.Input
   231  
   232  	ToGroupArrayOutput() GroupArrayOutput
   233  	ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput
   234  }
   235  
   236  type GroupArray []GroupInput
   237  
   238  func (GroupArray) ElementType() reflect.Type {
   239  	return reflect.TypeOf((*[]*Group)(nil)).Elem()
   240  }
   241  
   242  func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput {
   243  	return i.ToGroupArrayOutputWithContext(context.Background())
   244  }
   245  
   246  func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput {
   247  	return pulumi.ToOutputWithContext(ctx, i).(GroupArrayOutput)
   248  }
   249  
   250  // GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values.
   251  // You can construct a concrete instance of `GroupMapInput` via:
   252  //
   253  //	GroupMap{ "key": GroupArgs{...} }
   254  type GroupMapInput interface {
   255  	pulumi.Input
   256  
   257  	ToGroupMapOutput() GroupMapOutput
   258  	ToGroupMapOutputWithContext(context.Context) GroupMapOutput
   259  }
   260  
   261  type GroupMap map[string]GroupInput
   262  
   263  func (GroupMap) ElementType() reflect.Type {
   264  	return reflect.TypeOf((*map[string]*Group)(nil)).Elem()
   265  }
   266  
   267  func (i GroupMap) ToGroupMapOutput() GroupMapOutput {
   268  	return i.ToGroupMapOutputWithContext(context.Background())
   269  }
   270  
   271  func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput {
   272  	return pulumi.ToOutputWithContext(ctx, i).(GroupMapOutput)
   273  }
   274  
   275  type GroupOutput struct{ *pulumi.OutputState }
   276  
   277  func (GroupOutput) ElementType() reflect.Type {
   278  	return reflect.TypeOf((**Group)(nil)).Elem()
   279  }
   280  
   281  func (o GroupOutput) ToGroupOutput() GroupOutput {
   282  	return o
   283  }
   284  
   285  func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput {
   286  	return o
   287  }
   288  
   289  // Timestamp when the access group was created.
   290  func (o GroupOutput) CreationTime() pulumi.StringOutput {
   291  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.CreationTime }).(pulumi.StringOutput)
   292  }
   293  
   294  // Timestamp when the access group was deleted.
   295  func (o GroupOutput) DeletionTime() pulumi.StringOutput {
   296  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.DeletionTime }).(pulumi.StringOutput)
   297  }
   298  
   299  // Description of the verified access group.
   300  func (o GroupOutput) Description() pulumi.StringOutput {
   301  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
   302  }
   303  
   304  // Timestamp when the access group was last updated.
   305  func (o GroupOutput) LastUpdatedTime() pulumi.StringOutput {
   306  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.LastUpdatedTime }).(pulumi.StringOutput)
   307  }
   308  
   309  // AWS account number owning this resource.
   310  func (o GroupOutput) Owner() pulumi.StringOutput {
   311  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.Owner }).(pulumi.StringOutput)
   312  }
   313  
   314  // The policy document that is associated with this resource.
   315  func (o GroupOutput) PolicyDocument() pulumi.StringPtrOutput {
   316  	return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.PolicyDocument }).(pulumi.StringPtrOutput)
   317  }
   318  
   319  // Configuration block to use KMS keys for server-side encryption.
   320  func (o GroupOutput) SseConfiguration() GroupSseConfigurationOutput {
   321  	return o.ApplyT(func(v *Group) GroupSseConfigurationOutput { return v.SseConfiguration }).(GroupSseConfigurationOutput)
   322  }
   323  
   324  // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   325  func (o GroupOutput) Tags() pulumi.StringMapOutput {
   326  	return o.ApplyT(func(v *Group) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   327  }
   328  
   329  // Deprecated: Please use `tags` instead.
   330  func (o GroupOutput) TagsAll() pulumi.StringMapOutput {
   331  	return o.ApplyT(func(v *Group) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   332  }
   333  
   334  // ARN of this verified acess group.
   335  func (o GroupOutput) VerifiedaccessGroupArn() pulumi.StringOutput {
   336  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.VerifiedaccessGroupArn }).(pulumi.StringOutput)
   337  }
   338  
   339  // ID of this verified access group.
   340  func (o GroupOutput) VerifiedaccessGroupId() pulumi.StringOutput {
   341  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.VerifiedaccessGroupId }).(pulumi.StringOutput)
   342  }
   343  
   344  // The id of the verified access instance this group is associated with.
   345  //
   346  // The following arguments are optional:
   347  func (o GroupOutput) VerifiedaccessInstanceId() pulumi.StringOutput {
   348  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.VerifiedaccessInstanceId }).(pulumi.StringOutput)
   349  }
   350  
   351  type GroupArrayOutput struct{ *pulumi.OutputState }
   352  
   353  func (GroupArrayOutput) ElementType() reflect.Type {
   354  	return reflect.TypeOf((*[]*Group)(nil)).Elem()
   355  }
   356  
   357  func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput {
   358  	return o
   359  }
   360  
   361  func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput {
   362  	return o
   363  }
   364  
   365  func (o GroupArrayOutput) Index(i pulumi.IntInput) GroupOutput {
   366  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Group {
   367  		return vs[0].([]*Group)[vs[1].(int)]
   368  	}).(GroupOutput)
   369  }
   370  
   371  type GroupMapOutput struct{ *pulumi.OutputState }
   372  
   373  func (GroupMapOutput) ElementType() reflect.Type {
   374  	return reflect.TypeOf((*map[string]*Group)(nil)).Elem()
   375  }
   376  
   377  func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput {
   378  	return o
   379  }
   380  
   381  func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput {
   382  	return o
   383  }
   384  
   385  func (o GroupMapOutput) MapIndex(k pulumi.StringInput) GroupOutput {
   386  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Group {
   387  		return vs[0].(map[string]*Group)[vs[1].(string)]
   388  	}).(GroupOutput)
   389  }
   390  
   391  func init() {
   392  	pulumi.RegisterInputType(reflect.TypeOf((*GroupInput)(nil)).Elem(), &Group{})
   393  	pulumi.RegisterInputType(reflect.TypeOf((*GroupArrayInput)(nil)).Elem(), GroupArray{})
   394  	pulumi.RegisterInputType(reflect.TypeOf((*GroupMapInput)(nil)).Elem(), GroupMap{})
   395  	pulumi.RegisterOutputType(GroupOutput{})
   396  	pulumi.RegisterOutputType(GroupArrayOutput{})
   397  	pulumi.RegisterOutputType(GroupMapOutput{})
   398  }