github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/location/geofenceCollection.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 location
     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 an AWS Location Geofence Collection.
    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/location"
    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 := location.NewGeofenceCollection(ctx, "example", &location.GeofenceCollectionArgs{
    33  //				CollectionName: pulumi.String("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 Location Geofence Collection using the `collection_name`. For example:
    48  //
    49  // ```sh
    50  // $ pulumi import aws:location/geofenceCollection:GeofenceCollection example example
    51  // ```
    52  type GeofenceCollection struct {
    53  	pulumi.CustomResourceState
    54  
    55  	// The Amazon Resource Name (ARN) for the geofence collection resource. Used when you need to specify a resource across all AWS.
    56  	CollectionArn pulumi.StringOutput `pulumi:"collectionArn"`
    57  	// The name of the geofence collection.
    58  	//
    59  	// The following arguments are optional:
    60  	CollectionName pulumi.StringOutput `pulumi:"collectionName"`
    61  	// The timestamp for when the geofence collection resource was created in ISO 8601 format.
    62  	CreateTime pulumi.StringOutput `pulumi:"createTime"`
    63  	// The optional description for the geofence collection.
    64  	Description pulumi.StringPtrOutput `pulumi:"description"`
    65  	// A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
    66  	KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"`
    67  	// Key-value tags for the geofence collection. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    68  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    69  	// Deprecated: Please use `tags` instead.
    70  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    71  	// The timestamp for when the geofence collection resource was last updated in ISO 8601 format.
    72  	UpdateTime pulumi.StringOutput `pulumi:"updateTime"`
    73  }
    74  
    75  // NewGeofenceCollection registers a new resource with the given unique name, arguments, and options.
    76  func NewGeofenceCollection(ctx *pulumi.Context,
    77  	name string, args *GeofenceCollectionArgs, opts ...pulumi.ResourceOption) (*GeofenceCollection, error) {
    78  	if args == nil {
    79  		return nil, errors.New("missing one or more required arguments")
    80  	}
    81  
    82  	if args.CollectionName == nil {
    83  		return nil, errors.New("invalid value for required argument 'CollectionName'")
    84  	}
    85  	opts = internal.PkgResourceDefaultOpts(opts)
    86  	var resource GeofenceCollection
    87  	err := ctx.RegisterResource("aws:location/geofenceCollection:GeofenceCollection", name, args, &resource, opts...)
    88  	if err != nil {
    89  		return nil, err
    90  	}
    91  	return &resource, nil
    92  }
    93  
    94  // GetGeofenceCollection gets an existing GeofenceCollection resource's state with the given name, ID, and optional
    95  // state properties that are used to uniquely qualify the lookup (nil if not required).
    96  func GetGeofenceCollection(ctx *pulumi.Context,
    97  	name string, id pulumi.IDInput, state *GeofenceCollectionState, opts ...pulumi.ResourceOption) (*GeofenceCollection, error) {
    98  	var resource GeofenceCollection
    99  	err := ctx.ReadResource("aws:location/geofenceCollection:GeofenceCollection", name, id, state, &resource, opts...)
   100  	if err != nil {
   101  		return nil, err
   102  	}
   103  	return &resource, nil
   104  }
   105  
   106  // Input properties used for looking up and filtering GeofenceCollection resources.
   107  type geofenceCollectionState struct {
   108  	// The Amazon Resource Name (ARN) for the geofence collection resource. Used when you need to specify a resource across all AWS.
   109  	CollectionArn *string `pulumi:"collectionArn"`
   110  	// The name of the geofence collection.
   111  	//
   112  	// The following arguments are optional:
   113  	CollectionName *string `pulumi:"collectionName"`
   114  	// The timestamp for when the geofence collection resource was created in ISO 8601 format.
   115  	CreateTime *string `pulumi:"createTime"`
   116  	// The optional description for the geofence collection.
   117  	Description *string `pulumi:"description"`
   118  	// A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
   119  	KmsKeyId *string `pulumi:"kmsKeyId"`
   120  	// Key-value tags for the geofence collection. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   121  	Tags map[string]string `pulumi:"tags"`
   122  	// Deprecated: Please use `tags` instead.
   123  	TagsAll map[string]string `pulumi:"tagsAll"`
   124  	// The timestamp for when the geofence collection resource was last updated in ISO 8601 format.
   125  	UpdateTime *string `pulumi:"updateTime"`
   126  }
   127  
   128  type GeofenceCollectionState struct {
   129  	// The Amazon Resource Name (ARN) for the geofence collection resource. Used when you need to specify a resource across all AWS.
   130  	CollectionArn pulumi.StringPtrInput
   131  	// The name of the geofence collection.
   132  	//
   133  	// The following arguments are optional:
   134  	CollectionName pulumi.StringPtrInput
   135  	// The timestamp for when the geofence collection resource was created in ISO 8601 format.
   136  	CreateTime pulumi.StringPtrInput
   137  	// The optional description for the geofence collection.
   138  	Description pulumi.StringPtrInput
   139  	// A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
   140  	KmsKeyId pulumi.StringPtrInput
   141  	// Key-value tags for the geofence collection. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   142  	Tags pulumi.StringMapInput
   143  	// Deprecated: Please use `tags` instead.
   144  	TagsAll pulumi.StringMapInput
   145  	// The timestamp for when the geofence collection resource was last updated in ISO 8601 format.
   146  	UpdateTime pulumi.StringPtrInput
   147  }
   148  
   149  func (GeofenceCollectionState) ElementType() reflect.Type {
   150  	return reflect.TypeOf((*geofenceCollectionState)(nil)).Elem()
   151  }
   152  
   153  type geofenceCollectionArgs struct {
   154  	// The name of the geofence collection.
   155  	//
   156  	// The following arguments are optional:
   157  	CollectionName string `pulumi:"collectionName"`
   158  	// The optional description for the geofence collection.
   159  	Description *string `pulumi:"description"`
   160  	// A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
   161  	KmsKeyId *string `pulumi:"kmsKeyId"`
   162  	// Key-value tags for the geofence collection. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   163  	Tags map[string]string `pulumi:"tags"`
   164  }
   165  
   166  // The set of arguments for constructing a GeofenceCollection resource.
   167  type GeofenceCollectionArgs struct {
   168  	// The name of the geofence collection.
   169  	//
   170  	// The following arguments are optional:
   171  	CollectionName pulumi.StringInput
   172  	// The optional description for the geofence collection.
   173  	Description pulumi.StringPtrInput
   174  	// A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
   175  	KmsKeyId pulumi.StringPtrInput
   176  	// Key-value tags for the geofence collection. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   177  	Tags pulumi.StringMapInput
   178  }
   179  
   180  func (GeofenceCollectionArgs) ElementType() reflect.Type {
   181  	return reflect.TypeOf((*geofenceCollectionArgs)(nil)).Elem()
   182  }
   183  
   184  type GeofenceCollectionInput interface {
   185  	pulumi.Input
   186  
   187  	ToGeofenceCollectionOutput() GeofenceCollectionOutput
   188  	ToGeofenceCollectionOutputWithContext(ctx context.Context) GeofenceCollectionOutput
   189  }
   190  
   191  func (*GeofenceCollection) ElementType() reflect.Type {
   192  	return reflect.TypeOf((**GeofenceCollection)(nil)).Elem()
   193  }
   194  
   195  func (i *GeofenceCollection) ToGeofenceCollectionOutput() GeofenceCollectionOutput {
   196  	return i.ToGeofenceCollectionOutputWithContext(context.Background())
   197  }
   198  
   199  func (i *GeofenceCollection) ToGeofenceCollectionOutputWithContext(ctx context.Context) GeofenceCollectionOutput {
   200  	return pulumi.ToOutputWithContext(ctx, i).(GeofenceCollectionOutput)
   201  }
   202  
   203  // GeofenceCollectionArrayInput is an input type that accepts GeofenceCollectionArray and GeofenceCollectionArrayOutput values.
   204  // You can construct a concrete instance of `GeofenceCollectionArrayInput` via:
   205  //
   206  //	GeofenceCollectionArray{ GeofenceCollectionArgs{...} }
   207  type GeofenceCollectionArrayInput interface {
   208  	pulumi.Input
   209  
   210  	ToGeofenceCollectionArrayOutput() GeofenceCollectionArrayOutput
   211  	ToGeofenceCollectionArrayOutputWithContext(context.Context) GeofenceCollectionArrayOutput
   212  }
   213  
   214  type GeofenceCollectionArray []GeofenceCollectionInput
   215  
   216  func (GeofenceCollectionArray) ElementType() reflect.Type {
   217  	return reflect.TypeOf((*[]*GeofenceCollection)(nil)).Elem()
   218  }
   219  
   220  func (i GeofenceCollectionArray) ToGeofenceCollectionArrayOutput() GeofenceCollectionArrayOutput {
   221  	return i.ToGeofenceCollectionArrayOutputWithContext(context.Background())
   222  }
   223  
   224  func (i GeofenceCollectionArray) ToGeofenceCollectionArrayOutputWithContext(ctx context.Context) GeofenceCollectionArrayOutput {
   225  	return pulumi.ToOutputWithContext(ctx, i).(GeofenceCollectionArrayOutput)
   226  }
   227  
   228  // GeofenceCollectionMapInput is an input type that accepts GeofenceCollectionMap and GeofenceCollectionMapOutput values.
   229  // You can construct a concrete instance of `GeofenceCollectionMapInput` via:
   230  //
   231  //	GeofenceCollectionMap{ "key": GeofenceCollectionArgs{...} }
   232  type GeofenceCollectionMapInput interface {
   233  	pulumi.Input
   234  
   235  	ToGeofenceCollectionMapOutput() GeofenceCollectionMapOutput
   236  	ToGeofenceCollectionMapOutputWithContext(context.Context) GeofenceCollectionMapOutput
   237  }
   238  
   239  type GeofenceCollectionMap map[string]GeofenceCollectionInput
   240  
   241  func (GeofenceCollectionMap) ElementType() reflect.Type {
   242  	return reflect.TypeOf((*map[string]*GeofenceCollection)(nil)).Elem()
   243  }
   244  
   245  func (i GeofenceCollectionMap) ToGeofenceCollectionMapOutput() GeofenceCollectionMapOutput {
   246  	return i.ToGeofenceCollectionMapOutputWithContext(context.Background())
   247  }
   248  
   249  func (i GeofenceCollectionMap) ToGeofenceCollectionMapOutputWithContext(ctx context.Context) GeofenceCollectionMapOutput {
   250  	return pulumi.ToOutputWithContext(ctx, i).(GeofenceCollectionMapOutput)
   251  }
   252  
   253  type GeofenceCollectionOutput struct{ *pulumi.OutputState }
   254  
   255  func (GeofenceCollectionOutput) ElementType() reflect.Type {
   256  	return reflect.TypeOf((**GeofenceCollection)(nil)).Elem()
   257  }
   258  
   259  func (o GeofenceCollectionOutput) ToGeofenceCollectionOutput() GeofenceCollectionOutput {
   260  	return o
   261  }
   262  
   263  func (o GeofenceCollectionOutput) ToGeofenceCollectionOutputWithContext(ctx context.Context) GeofenceCollectionOutput {
   264  	return o
   265  }
   266  
   267  // The Amazon Resource Name (ARN) for the geofence collection resource. Used when you need to specify a resource across all AWS.
   268  func (o GeofenceCollectionOutput) CollectionArn() pulumi.StringOutput {
   269  	return o.ApplyT(func(v *GeofenceCollection) pulumi.StringOutput { return v.CollectionArn }).(pulumi.StringOutput)
   270  }
   271  
   272  // The name of the geofence collection.
   273  //
   274  // The following arguments are optional:
   275  func (o GeofenceCollectionOutput) CollectionName() pulumi.StringOutput {
   276  	return o.ApplyT(func(v *GeofenceCollection) pulumi.StringOutput { return v.CollectionName }).(pulumi.StringOutput)
   277  }
   278  
   279  // The timestamp for when the geofence collection resource was created in ISO 8601 format.
   280  func (o GeofenceCollectionOutput) CreateTime() pulumi.StringOutput {
   281  	return o.ApplyT(func(v *GeofenceCollection) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
   282  }
   283  
   284  // The optional description for the geofence collection.
   285  func (o GeofenceCollectionOutput) Description() pulumi.StringPtrOutput {
   286  	return o.ApplyT(func(v *GeofenceCollection) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   287  }
   288  
   289  // A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
   290  func (o GeofenceCollectionOutput) KmsKeyId() pulumi.StringPtrOutput {
   291  	return o.ApplyT(func(v *GeofenceCollection) pulumi.StringPtrOutput { return v.KmsKeyId }).(pulumi.StringPtrOutput)
   292  }
   293  
   294  // Key-value tags for the geofence collection. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   295  func (o GeofenceCollectionOutput) Tags() pulumi.StringMapOutput {
   296  	return o.ApplyT(func(v *GeofenceCollection) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   297  }
   298  
   299  // Deprecated: Please use `tags` instead.
   300  func (o GeofenceCollectionOutput) TagsAll() pulumi.StringMapOutput {
   301  	return o.ApplyT(func(v *GeofenceCollection) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   302  }
   303  
   304  // The timestamp for when the geofence collection resource was last updated in ISO 8601 format.
   305  func (o GeofenceCollectionOutput) UpdateTime() pulumi.StringOutput {
   306  	return o.ApplyT(func(v *GeofenceCollection) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput)
   307  }
   308  
   309  type GeofenceCollectionArrayOutput struct{ *pulumi.OutputState }
   310  
   311  func (GeofenceCollectionArrayOutput) ElementType() reflect.Type {
   312  	return reflect.TypeOf((*[]*GeofenceCollection)(nil)).Elem()
   313  }
   314  
   315  func (o GeofenceCollectionArrayOutput) ToGeofenceCollectionArrayOutput() GeofenceCollectionArrayOutput {
   316  	return o
   317  }
   318  
   319  func (o GeofenceCollectionArrayOutput) ToGeofenceCollectionArrayOutputWithContext(ctx context.Context) GeofenceCollectionArrayOutput {
   320  	return o
   321  }
   322  
   323  func (o GeofenceCollectionArrayOutput) Index(i pulumi.IntInput) GeofenceCollectionOutput {
   324  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GeofenceCollection {
   325  		return vs[0].([]*GeofenceCollection)[vs[1].(int)]
   326  	}).(GeofenceCollectionOutput)
   327  }
   328  
   329  type GeofenceCollectionMapOutput struct{ *pulumi.OutputState }
   330  
   331  func (GeofenceCollectionMapOutput) ElementType() reflect.Type {
   332  	return reflect.TypeOf((*map[string]*GeofenceCollection)(nil)).Elem()
   333  }
   334  
   335  func (o GeofenceCollectionMapOutput) ToGeofenceCollectionMapOutput() GeofenceCollectionMapOutput {
   336  	return o
   337  }
   338  
   339  func (o GeofenceCollectionMapOutput) ToGeofenceCollectionMapOutputWithContext(ctx context.Context) GeofenceCollectionMapOutput {
   340  	return o
   341  }
   342  
   343  func (o GeofenceCollectionMapOutput) MapIndex(k pulumi.StringInput) GeofenceCollectionOutput {
   344  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GeofenceCollection {
   345  		return vs[0].(map[string]*GeofenceCollection)[vs[1].(string)]
   346  	}).(GeofenceCollectionOutput)
   347  }
   348  
   349  func init() {
   350  	pulumi.RegisterInputType(reflect.TypeOf((*GeofenceCollectionInput)(nil)).Elem(), &GeofenceCollection{})
   351  	pulumi.RegisterInputType(reflect.TypeOf((*GeofenceCollectionArrayInput)(nil)).Elem(), GeofenceCollectionArray{})
   352  	pulumi.RegisterInputType(reflect.TypeOf((*GeofenceCollectionMapInput)(nil)).Elem(), GeofenceCollectionMap{})
   353  	pulumi.RegisterOutputType(GeofenceCollectionOutput{})
   354  	pulumi.RegisterOutputType(GeofenceCollectionArrayOutput{})
   355  	pulumi.RegisterOutputType(GeofenceCollectionMapOutput{})
   356  }