github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/location/getGeofenceCollection.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  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Retrieve information about a Location Service Geofence Collection.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### Basic Usage
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/location"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := location.LookupGeofenceCollection(ctx, &location.LookupGeofenceCollectionArgs{
    34  //				CollectionName: "example",
    35  //			}, nil)
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  func LookupGeofenceCollection(ctx *pulumi.Context, args *LookupGeofenceCollectionArgs, opts ...pulumi.InvokeOption) (*LookupGeofenceCollectionResult, error) {
    46  	opts = internal.PkgInvokeDefaultOpts(opts)
    47  	var rv LookupGeofenceCollectionResult
    48  	err := ctx.Invoke("aws:location/getGeofenceCollection:getGeofenceCollection", args, &rv, opts...)
    49  	if err != nil {
    50  		return nil, err
    51  	}
    52  	return &rv, nil
    53  }
    54  
    55  // A collection of arguments for invoking getGeofenceCollection.
    56  type LookupGeofenceCollectionArgs struct {
    57  	// Name of the geofence collection.
    58  	CollectionName string `pulumi:"collectionName"`
    59  	// Key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
    60  	KmsKeyId *string `pulumi:"kmsKeyId"`
    61  	// Key-value map of resource tags for the geofence collection.
    62  	Tags map[string]string `pulumi:"tags"`
    63  }
    64  
    65  // A collection of values returned by getGeofenceCollection.
    66  type LookupGeofenceCollectionResult struct {
    67  	// ARN for the geofence collection resource. Used when you need to specify a resource across all AWS.
    68  	CollectionArn  string `pulumi:"collectionArn"`
    69  	CollectionName string `pulumi:"collectionName"`
    70  	// Timestamp for when the geofence collection resource was created in ISO 8601 format.
    71  	CreateTime string `pulumi:"createTime"`
    72  	// Optional description of the geofence collection resource.
    73  	Description string `pulumi:"description"`
    74  	// The provider-assigned unique ID for this managed resource.
    75  	Id string `pulumi:"id"`
    76  	// Key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
    77  	KmsKeyId string `pulumi:"kmsKeyId"`
    78  	// Key-value map of resource tags for the geofence collection.
    79  	Tags map[string]string `pulumi:"tags"`
    80  	// Timestamp for when the geofence collection resource was last updated in ISO 8601 format.
    81  	UpdateTime string `pulumi:"updateTime"`
    82  }
    83  
    84  func LookupGeofenceCollectionOutput(ctx *pulumi.Context, args LookupGeofenceCollectionOutputArgs, opts ...pulumi.InvokeOption) LookupGeofenceCollectionResultOutput {
    85  	return pulumi.ToOutputWithContext(context.Background(), args).
    86  		ApplyT(func(v interface{}) (LookupGeofenceCollectionResult, error) {
    87  			args := v.(LookupGeofenceCollectionArgs)
    88  			r, err := LookupGeofenceCollection(ctx, &args, opts...)
    89  			var s LookupGeofenceCollectionResult
    90  			if r != nil {
    91  				s = *r
    92  			}
    93  			return s, err
    94  		}).(LookupGeofenceCollectionResultOutput)
    95  }
    96  
    97  // A collection of arguments for invoking getGeofenceCollection.
    98  type LookupGeofenceCollectionOutputArgs struct {
    99  	// Name of the geofence collection.
   100  	CollectionName pulumi.StringInput `pulumi:"collectionName"`
   101  	// Key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
   102  	KmsKeyId pulumi.StringPtrInput `pulumi:"kmsKeyId"`
   103  	// Key-value map of resource tags for the geofence collection.
   104  	Tags pulumi.StringMapInput `pulumi:"tags"`
   105  }
   106  
   107  func (LookupGeofenceCollectionOutputArgs) ElementType() reflect.Type {
   108  	return reflect.TypeOf((*LookupGeofenceCollectionArgs)(nil)).Elem()
   109  }
   110  
   111  // A collection of values returned by getGeofenceCollection.
   112  type LookupGeofenceCollectionResultOutput struct{ *pulumi.OutputState }
   113  
   114  func (LookupGeofenceCollectionResultOutput) ElementType() reflect.Type {
   115  	return reflect.TypeOf((*LookupGeofenceCollectionResult)(nil)).Elem()
   116  }
   117  
   118  func (o LookupGeofenceCollectionResultOutput) ToLookupGeofenceCollectionResultOutput() LookupGeofenceCollectionResultOutput {
   119  	return o
   120  }
   121  
   122  func (o LookupGeofenceCollectionResultOutput) ToLookupGeofenceCollectionResultOutputWithContext(ctx context.Context) LookupGeofenceCollectionResultOutput {
   123  	return o
   124  }
   125  
   126  // ARN for the geofence collection resource. Used when you need to specify a resource across all AWS.
   127  func (o LookupGeofenceCollectionResultOutput) CollectionArn() pulumi.StringOutput {
   128  	return o.ApplyT(func(v LookupGeofenceCollectionResult) string { return v.CollectionArn }).(pulumi.StringOutput)
   129  }
   130  
   131  func (o LookupGeofenceCollectionResultOutput) CollectionName() pulumi.StringOutput {
   132  	return o.ApplyT(func(v LookupGeofenceCollectionResult) string { return v.CollectionName }).(pulumi.StringOutput)
   133  }
   134  
   135  // Timestamp for when the geofence collection resource was created in ISO 8601 format.
   136  func (o LookupGeofenceCollectionResultOutput) CreateTime() pulumi.StringOutput {
   137  	return o.ApplyT(func(v LookupGeofenceCollectionResult) string { return v.CreateTime }).(pulumi.StringOutput)
   138  }
   139  
   140  // Optional description of the geofence collection resource.
   141  func (o LookupGeofenceCollectionResultOutput) Description() pulumi.StringOutput {
   142  	return o.ApplyT(func(v LookupGeofenceCollectionResult) string { return v.Description }).(pulumi.StringOutput)
   143  }
   144  
   145  // The provider-assigned unique ID for this managed resource.
   146  func (o LookupGeofenceCollectionResultOutput) Id() pulumi.StringOutput {
   147  	return o.ApplyT(func(v LookupGeofenceCollectionResult) string { return v.Id }).(pulumi.StringOutput)
   148  }
   149  
   150  // Key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.
   151  func (o LookupGeofenceCollectionResultOutput) KmsKeyId() pulumi.StringOutput {
   152  	return o.ApplyT(func(v LookupGeofenceCollectionResult) string { return v.KmsKeyId }).(pulumi.StringOutput)
   153  }
   154  
   155  // Key-value map of resource tags for the geofence collection.
   156  func (o LookupGeofenceCollectionResultOutput) Tags() pulumi.StringMapOutput {
   157  	return o.ApplyT(func(v LookupGeofenceCollectionResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   158  }
   159  
   160  // Timestamp for when the geofence collection resource was last updated in ISO 8601 format.
   161  func (o LookupGeofenceCollectionResultOutput) UpdateTime() pulumi.StringOutput {
   162  	return o.ApplyT(func(v LookupGeofenceCollectionResult) string { return v.UpdateTime }).(pulumi.StringOutput)
   163  }
   164  
   165  func init() {
   166  	pulumi.RegisterOutputType(LookupGeofenceCollectionResultOutput{})
   167  }