github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/location/getTrackerAssociation.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 Tracker Association. 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.LookupTrackerAssociation(ctx, &location.LookupTrackerAssociationArgs{ 34 // ConsumerArn: "arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollectionConsumer", 35 // TrackerName: "example", 36 // }, nil) 37 // if err != nil { 38 // return err 39 // } 40 // return nil 41 // }) 42 // } 43 // 44 // ``` 45 // <!--End PulumiCodeChooser --> 46 func LookupTrackerAssociation(ctx *pulumi.Context, args *LookupTrackerAssociationArgs, opts ...pulumi.InvokeOption) (*LookupTrackerAssociationResult, error) { 47 opts = internal.PkgInvokeDefaultOpts(opts) 48 var rv LookupTrackerAssociationResult 49 err := ctx.Invoke("aws:location/getTrackerAssociation:getTrackerAssociation", args, &rv, opts...) 50 if err != nil { 51 return nil, err 52 } 53 return &rv, nil 54 } 55 56 // A collection of arguments for invoking getTrackerAssociation. 57 type LookupTrackerAssociationArgs struct { 58 // ARN of the geofence collection associated to tracker resource. 59 ConsumerArn string `pulumi:"consumerArn"` 60 // Name of the tracker resource associated with a geofence collection. 61 TrackerName string `pulumi:"trackerName"` 62 } 63 64 // A collection of values returned by getTrackerAssociation. 65 type LookupTrackerAssociationResult struct { 66 ConsumerArn string `pulumi:"consumerArn"` 67 // The provider-assigned unique ID for this managed resource. 68 Id string `pulumi:"id"` 69 TrackerName string `pulumi:"trackerName"` 70 } 71 72 func LookupTrackerAssociationOutput(ctx *pulumi.Context, args LookupTrackerAssociationOutputArgs, opts ...pulumi.InvokeOption) LookupTrackerAssociationResultOutput { 73 return pulumi.ToOutputWithContext(context.Background(), args). 74 ApplyT(func(v interface{}) (LookupTrackerAssociationResult, error) { 75 args := v.(LookupTrackerAssociationArgs) 76 r, err := LookupTrackerAssociation(ctx, &args, opts...) 77 var s LookupTrackerAssociationResult 78 if r != nil { 79 s = *r 80 } 81 return s, err 82 }).(LookupTrackerAssociationResultOutput) 83 } 84 85 // A collection of arguments for invoking getTrackerAssociation. 86 type LookupTrackerAssociationOutputArgs struct { 87 // ARN of the geofence collection associated to tracker resource. 88 ConsumerArn pulumi.StringInput `pulumi:"consumerArn"` 89 // Name of the tracker resource associated with a geofence collection. 90 TrackerName pulumi.StringInput `pulumi:"trackerName"` 91 } 92 93 func (LookupTrackerAssociationOutputArgs) ElementType() reflect.Type { 94 return reflect.TypeOf((*LookupTrackerAssociationArgs)(nil)).Elem() 95 } 96 97 // A collection of values returned by getTrackerAssociation. 98 type LookupTrackerAssociationResultOutput struct{ *pulumi.OutputState } 99 100 func (LookupTrackerAssociationResultOutput) ElementType() reflect.Type { 101 return reflect.TypeOf((*LookupTrackerAssociationResult)(nil)).Elem() 102 } 103 104 func (o LookupTrackerAssociationResultOutput) ToLookupTrackerAssociationResultOutput() LookupTrackerAssociationResultOutput { 105 return o 106 } 107 108 func (o LookupTrackerAssociationResultOutput) ToLookupTrackerAssociationResultOutputWithContext(ctx context.Context) LookupTrackerAssociationResultOutput { 109 return o 110 } 111 112 func (o LookupTrackerAssociationResultOutput) ConsumerArn() pulumi.StringOutput { 113 return o.ApplyT(func(v LookupTrackerAssociationResult) string { return v.ConsumerArn }).(pulumi.StringOutput) 114 } 115 116 // The provider-assigned unique ID for this managed resource. 117 func (o LookupTrackerAssociationResultOutput) Id() pulumi.StringOutput { 118 return o.ApplyT(func(v LookupTrackerAssociationResult) string { return v.Id }).(pulumi.StringOutput) 119 } 120 121 func (o LookupTrackerAssociationResultOutput) TrackerName() pulumi.StringOutput { 122 return o.ApplyT(func(v LookupTrackerAssociationResult) string { return v.TrackerName }).(pulumi.StringOutput) 123 } 124 125 func init() { 126 pulumi.RegisterOutputType(LookupTrackerAssociationResultOutput{}) 127 }