aws logo
AWS Classic v5.41.0, May 15 23

aws.location.TrackerAssociation

Explore with Pulumi AI

Resource for managing an AWS Location Tracker Association.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

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

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

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

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleGeofenceCollection, err := location.NewGeofenceCollection(ctx, "exampleGeofenceCollection", &location.GeofenceCollectionArgs{
			CollectionName: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		exampleTracker, err := location.NewTracker(ctx, "exampleTracker", &location.TrackerArgs{
			TrackerName: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		_, err = location.NewTrackerAssociation(ctx, "exampleTrackerAssociation", &location.TrackerAssociationArgs{
			ConsumerArn: exampleGeofenceCollection.CollectionArn,
			TrackerName: exampleTracker.TrackerName,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 exampleGeofenceCollection = new GeofenceCollection("exampleGeofenceCollection", GeofenceCollectionArgs.builder()        
            .collectionName("example")
            .build());

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

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

    }
}
import pulumi
import pulumi_aws as aws

example_geofence_collection = aws.location.GeofenceCollection("exampleGeofenceCollection", collection_name="example")
example_tracker = aws.location.Tracker("exampleTracker", tracker_name="example")
example_tracker_association = aws.location.TrackerAssociation("exampleTrackerAssociation",
    consumer_arn=example_geofence_collection.collection_arn,
    tracker_name=example_tracker.tracker_name)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleGeofenceCollection = new aws.location.GeofenceCollection("exampleGeofenceCollection", {collectionName: "example"});
const exampleTracker = new aws.location.Tracker("exampleTracker", {trackerName: "example"});
const exampleTrackerAssociation = new aws.location.TrackerAssociation("exampleTrackerAssociation", {
    consumerArn: exampleGeofenceCollection.collectionArn,
    trackerName: exampleTracker.trackerName,
});
resources:
  exampleGeofenceCollection:
    type: aws:location:GeofenceCollection
    properties:
      collectionName: example
  exampleTracker:
    type: aws:location:Tracker
    properties:
      trackerName: example
  exampleTrackerAssociation:
    type: aws:location:TrackerAssociation
    properties:
      consumerArn: ${exampleGeofenceCollection.collectionArn}
      trackerName: ${exampleTracker.trackerName}

Create TrackerAssociation Resource

new TrackerAssociation(name: string, args: TrackerAssociationArgs, opts?: CustomResourceOptions);
@overload
def TrackerAssociation(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       consumer_arn: Optional[str] = None,
                       tracker_name: Optional[str] = None)
@overload
def TrackerAssociation(resource_name: str,
                       args: TrackerAssociationArgs,
                       opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args TrackerAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args 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 string
The unique name of the resource.
args TrackerAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TrackerAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args TrackerAssociationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The TrackerAssociation resource accepts the following input properties:

ConsumerArn 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 string

The name of the tracker resource to be associated with a geofence collection.

ConsumerArn 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 string

The name of the tracker resource to be associated with a geofence collection.

consumerArn 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 String

The name of the tracker resource to be associated with a geofence collection.

consumerArn 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 string

The name of the tracker resource to be associated with a geofence collection.

consumer_arn 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 str

The name of the tracker resource to be associated with a geofence collection.

consumerArn 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 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)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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 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 string

The name of the tracker resource to be associated with a geofence collection.

ConsumerArn 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 string

The name of the tracker resource to be associated with a geofence collection.

consumerArn 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 String

The name of the tracker resource to be associated with a geofence collection.

consumerArn 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 string

The name of the tracker resource to be associated with a geofence collection.

consumer_arn 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 str

The name of the tracker resource to be associated with a geofence collection.

consumerArn 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 String

The name of the tracker resource to be associated with a geofence collection.

Import

Location Tracker Association can be imported using the tracker_name|consumer_arn, e.g.,

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

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.