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,
});
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)
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
})
}
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,
});
});
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());
}
}
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}
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 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.
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",
});
example, err := location.NewTrackerAssociation(ctx, "trackerAssociationResource", &location.TrackerAssociationArgs{
ConsumerArn: pulumi.String("string"),
TrackerName: pulumi.String("string"),
})
var trackerAssociationResource = new TrackerAssociation("trackerAssociationResource", TrackerAssociationArgs.builder()
.consumerArn("string")
.trackerName("string")
.build());
tracker_association_resource = aws.location.TrackerAssociation("trackerAssociationResource",
consumer_arn="string",
tracker_name="string")
const trackerAssociationResource = new aws.location.TrackerAssociation("trackerAssociationResource", {
consumerArn: "string",
trackerName: "string",
});
type: aws:location:TrackerAssociation
properties:
consumerArn: string
trackerName: string
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:
- Consumer
Arn 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.
- Tracker
Name string - The name of the tracker resource to be associated with a geofence collection.
- Consumer
Arn 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.
- Tracker
Name string - The name of the tracker resource to be associated with a geofence collection.
- consumer
Arn 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.
- tracker
Name String - The name of the tracker resource to be associated with a geofence collection.
- consumer
Arn 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.
- tracker
Name 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.
- consumer
Arn 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.
- tracker
Name 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.
- Consumer
Arn 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.
- Tracker
Name string - The name of the tracker resource to be associated with a geofence collection.
- Consumer
Arn 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.
- Tracker
Name string - The name of the tracker resource to be associated with a geofence collection.
- consumer
Arn 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.
- tracker
Name String - The name of the tracker resource to be associated with a geofence collection.
- consumer
Arn 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.
- tracker
Name 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.
- consumer
Arn 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.
- tracker
Name 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"
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.