github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/location/getTrackerAssociations.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 Location Service Tracker Associations.
    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.GetTrackerAssociations(ctx, &location.GetTrackerAssociationsArgs{
    34  //				TrackerName: "example",
    35  //			}, nil)
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  func GetTrackerAssociations(ctx *pulumi.Context, args *GetTrackerAssociationsArgs, opts ...pulumi.InvokeOption) (*GetTrackerAssociationsResult, error) {
    46  	opts = internal.PkgInvokeDefaultOpts(opts)
    47  	var rv GetTrackerAssociationsResult
    48  	err := ctx.Invoke("aws:location/getTrackerAssociations:getTrackerAssociations", 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 getTrackerAssociations.
    56  type GetTrackerAssociationsArgs struct {
    57  	// Name of the tracker resource associated with a geofence collection.
    58  	TrackerName string `pulumi:"trackerName"`
    59  }
    60  
    61  // A collection of values returned by getTrackerAssociations.
    62  type GetTrackerAssociationsResult struct {
    63  	// List of geofence collection ARNs associated to the tracker resource.
    64  	ConsumerArns []string `pulumi:"consumerArns"`
    65  	// The provider-assigned unique ID for this managed resource.
    66  	Id          string `pulumi:"id"`
    67  	TrackerName string `pulumi:"trackerName"`
    68  }
    69  
    70  func GetTrackerAssociationsOutput(ctx *pulumi.Context, args GetTrackerAssociationsOutputArgs, opts ...pulumi.InvokeOption) GetTrackerAssociationsResultOutput {
    71  	return pulumi.ToOutputWithContext(context.Background(), args).
    72  		ApplyT(func(v interface{}) (GetTrackerAssociationsResult, error) {
    73  			args := v.(GetTrackerAssociationsArgs)
    74  			r, err := GetTrackerAssociations(ctx, &args, opts...)
    75  			var s GetTrackerAssociationsResult
    76  			if r != nil {
    77  				s = *r
    78  			}
    79  			return s, err
    80  		}).(GetTrackerAssociationsResultOutput)
    81  }
    82  
    83  // A collection of arguments for invoking getTrackerAssociations.
    84  type GetTrackerAssociationsOutputArgs struct {
    85  	// Name of the tracker resource associated with a geofence collection.
    86  	TrackerName pulumi.StringInput `pulumi:"trackerName"`
    87  }
    88  
    89  func (GetTrackerAssociationsOutputArgs) ElementType() reflect.Type {
    90  	return reflect.TypeOf((*GetTrackerAssociationsArgs)(nil)).Elem()
    91  }
    92  
    93  // A collection of values returned by getTrackerAssociations.
    94  type GetTrackerAssociationsResultOutput struct{ *pulumi.OutputState }
    95  
    96  func (GetTrackerAssociationsResultOutput) ElementType() reflect.Type {
    97  	return reflect.TypeOf((*GetTrackerAssociationsResult)(nil)).Elem()
    98  }
    99  
   100  func (o GetTrackerAssociationsResultOutput) ToGetTrackerAssociationsResultOutput() GetTrackerAssociationsResultOutput {
   101  	return o
   102  }
   103  
   104  func (o GetTrackerAssociationsResultOutput) ToGetTrackerAssociationsResultOutputWithContext(ctx context.Context) GetTrackerAssociationsResultOutput {
   105  	return o
   106  }
   107  
   108  // List of geofence collection ARNs associated to the tracker resource.
   109  func (o GetTrackerAssociationsResultOutput) ConsumerArns() pulumi.StringArrayOutput {
   110  	return o.ApplyT(func(v GetTrackerAssociationsResult) []string { return v.ConsumerArns }).(pulumi.StringArrayOutput)
   111  }
   112  
   113  // The provider-assigned unique ID for this managed resource.
   114  func (o GetTrackerAssociationsResultOutput) Id() pulumi.StringOutput {
   115  	return o.ApplyT(func(v GetTrackerAssociationsResult) string { return v.Id }).(pulumi.StringOutput)
   116  }
   117  
   118  func (o GetTrackerAssociationsResultOutput) TrackerName() pulumi.StringOutput {
   119  	return o.ApplyT(func(v GetTrackerAssociationsResult) string { return v.TrackerName }).(pulumi.StringOutput)
   120  }
   121  
   122  func init() {
   123  	pulumi.RegisterOutputType(GetTrackerAssociationsResultOutput{})
   124  }