1. Packages
  2. AWS
  3. API Docs
  4. location
  5. TrackerAssociation
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.location.TrackerAssociation

Explore with Pulumi AI

Resource for managing an AWS Location Tracker Association.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.location.GeofenceCollection("example", {collectionName: "example"});
const exampleTracker = new aws.location.Tracker("example", {trackerName: "example"});
const exampleTrackerAssociation = new aws.location.TrackerAssociation("example", {
    consumerArn: example.collectionArn,
    trackerName: exampleTracker.trackerName,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.location.GeofenceCollection("example", collection_name="example")
example_tracker = aws.location.Tracker("example", tracker_name="example")
example_tracker_association = aws.location.TrackerAssociation("example",
    consumer_arn=example.collection_arn,
    tracker_name=example_tracker.tracker_name)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/location"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := location.NewGeofenceCollection(ctx, "example", &location.GeofenceCollectionArgs{
			CollectionName: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		exampleTracker, err := location.NewTracker(ctx, "example", &location.TrackerArgs{
			TrackerName: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		_, err = location.NewTrackerAssociation(ctx, "example", &location.TrackerAssociationArgs{
			ConsumerArn: example.CollectionArn,
			TrackerName: exampleTracker.TrackerName,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Location.GeofenceCollection("example", new()
    {
        CollectionName = "example",
    });

    var exampleTracker = new Aws.Location.Tracker("example", new()
    {
        TrackerName = "example",
    });

    var exampleTrackerAssociation = new Aws.Location.TrackerAssociation("example", new()
    {
        ConsumerArn = example.CollectionArn,
        TrackerName = exampleTracker.TrackerName,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.location.GeofenceCollection;
import com.pulumi.aws.location.GeofenceCollectionArgs;
import com.pulumi.aws.location.Tracker;
import com.pulumi.aws.location.TrackerArgs;
import com.pulumi.aws.location.TrackerAssociation;
import com.pulumi.aws.location.TrackerAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new GeofenceCollection("example", GeofenceCollectionArgs.builder()
            .collectionName("example")
            .build());

        var exampleTracker = new Tracker("exampleTracker", TrackerArgs.builder()
            .trackerName("example")
            .build());

        var exampleTrackerAssociation = new TrackerAssociation("exampleTrackerAssociation", TrackerAssociationArgs.builder()
            .consumerArn(example.collectionArn())
            .trackerName(exampleTracker.trackerName())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:location:GeofenceCollection
    properties:
      collectionName: example
  exampleTracker:
    type: aws:location:Tracker
    name: example
    properties:
      trackerName: example
  exampleTrackerAssociation:
    type: aws:location:TrackerAssociation
    name: example
    properties:
      consumerArn: ${example.collectionArn}
      trackerName: ${exampleTracker.trackerName}
Copy

Create TrackerAssociation Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new TrackerAssociation(name: string, args: TrackerAssociationArgs, opts?: CustomResourceOptions);
@overload
def TrackerAssociation(resource_name: str,
                       args: TrackerAssociationArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def TrackerAssociation(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       consumer_arn: Optional[str] = None,
                       tracker_name: Optional[str] = None)
func NewTrackerAssociation(ctx *Context, name string, args TrackerAssociationArgs, opts ...ResourceOption) (*TrackerAssociation, error)
public TrackerAssociation(string name, TrackerAssociationArgs args, CustomResourceOptions? opts = null)
public TrackerAssociation(String name, TrackerAssociationArgs args)
public TrackerAssociation(String name, TrackerAssociationArgs args, CustomResourceOptions options)
type: aws:location:TrackerAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TrackerAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TrackerAssociationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TrackerAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TrackerAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TrackerAssociationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var trackerAssociationResource = new Aws.Location.TrackerAssociation("trackerAssociationResource", new()
{
    ConsumerArn = "string",
    TrackerName = "string",
});
Copy
example, err := location.NewTrackerAssociation(ctx, "trackerAssociationResource", &location.TrackerAssociationArgs{
	ConsumerArn: pulumi.String("string"),
	TrackerName: pulumi.String("string"),
})
Copy
var trackerAssociationResource = new TrackerAssociation("trackerAssociationResource", TrackerAssociationArgs.builder()
    .consumerArn("string")
    .trackerName("string")
    .build());
Copy
tracker_association_resource = aws.location.TrackerAssociation("trackerAssociationResource",
    consumer_arn="string",
    tracker_name="string")
Copy
const trackerAssociationResource = new aws.location.TrackerAssociation("trackerAssociationResource", {
    consumerArn: "string",
    trackerName: "string",
});
Copy
type: aws:location:TrackerAssociation
properties:
    consumerArn: string
    trackerName: string
Copy

TrackerAssociation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The TrackerAssociation resource accepts the following input properties:

ConsumerArn
This property is required.
Changes to this property will trigger replacement.
string
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
TrackerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the tracker resource to be associated with a geofence collection.
ConsumerArn
This property is required.
Changes to this property will trigger replacement.
string
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
TrackerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the tracker resource to be associated with a geofence collection.
consumerArn
This property is required.
Changes to this property will trigger replacement.
String
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
trackerName
This property is required.
Changes to this property will trigger replacement.
String
The name of the tracker resource to be associated with a geofence collection.
consumerArn
This property is required.
Changes to this property will trigger replacement.
string
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
trackerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the tracker resource to be associated with a geofence collection.
consumer_arn
This property is required.
Changes to this property will trigger replacement.
str
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
tracker_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the tracker resource to be associated with a geofence collection.
consumerArn
This property is required.
Changes to this property will trigger replacement.
String
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
trackerName
This property is required.
Changes to this property will trigger replacement.
String
The name of the tracker resource to be associated with a geofence collection.

Outputs

All input properties are implicitly available as output properties. Additionally, the TrackerAssociation resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing TrackerAssociation Resource

Get an existing TrackerAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TrackerAssociationState, opts?: CustomResourceOptions): TrackerAssociation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        consumer_arn: Optional[str] = None,
        tracker_name: Optional[str] = None) -> TrackerAssociation
func GetTrackerAssociation(ctx *Context, name string, id IDInput, state *TrackerAssociationState, opts ...ResourceOption) (*TrackerAssociation, error)
public static TrackerAssociation Get(string name, Input<string> id, TrackerAssociationState? state, CustomResourceOptions? opts = null)
public static TrackerAssociation get(String name, Output<String> id, TrackerAssociationState state, CustomResourceOptions options)
resources:  _:    type: aws:location:TrackerAssociation    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ConsumerArn Changes to this property will trigger replacement. string
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
TrackerName Changes to this property will trigger replacement. string
The name of the tracker resource to be associated with a geofence collection.
ConsumerArn Changes to this property will trigger replacement. string
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
TrackerName Changes to this property will trigger replacement. string
The name of the tracker resource to be associated with a geofence collection.
consumerArn Changes to this property will trigger replacement. String
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
trackerName Changes to this property will trigger replacement. String
The name of the tracker resource to be associated with a geofence collection.
consumerArn Changes to this property will trigger replacement. string
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
trackerName Changes to this property will trigger replacement. string
The name of the tracker resource to be associated with a geofence collection.
consumer_arn Changes to this property will trigger replacement. str
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
tracker_name Changes to this property will trigger replacement. str
The name of the tracker resource to be associated with a geofence collection.
consumerArn Changes to this property will trigger replacement. String
The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.
trackerName Changes to this property will trigger replacement. String
The name of the tracker resource to be associated with a geofence collection.

Import

Using pulumi import, import Location Tracker Association using the tracker_name|consumer_arn. For example:

$ pulumi import aws:location/trackerAssociation:TrackerAssociation example "tracker_name|consumer_arn"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.