# LocationActionProperty

Describes an action to send device location updates from an MQTT message to an Amazon Location tracker resource.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const locationActionProperty: iot.CfnTopicRule.LocationActionProperty = {
  deviceId: 'deviceId',
  latitude: 'latitude',
  longitude: 'longitude',
  roleArn: 'roleArn',
  trackerName: 'trackerName',

  // the properties below are optional
  timestamp: {
    value: 'value',

    // the properties below are optional
    unit: 'unit',
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

location_action_property = iot.CfnTopicRule.LocationActionProperty(
    device_id="deviceId",
    latitude="latitude",
    longitude="longitude",
    role_arn="roleArn",
    tracker_name="trackerName",

    # the properties below are optional
    timestamp=iot.CfnTopicRule.TimestampProperty(
        value="value",

        # the properties below are optional
        unit="unit"
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;

LocationActionProperty locationActionProperty = LocationActionProperty.builder()
        .deviceId("deviceId")
        .latitude("latitude")
        .longitude("longitude")
        .roleArn("roleArn")
        .trackerName("trackerName")

        // the properties below are optional
        .timestamp(TimestampProperty.builder()
                .value("value")

                // the properties below are optional
                .unit("unit")
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;

var locationActionProperty = new LocationActionProperty {
    DeviceId = "deviceId",
    Latitude = "latitude",
    Longitude = "longitude",
    RoleArn = "roleArn",
    TrackerName = "trackerName",

    // the properties below are optional
    Timestamp = new TimestampProperty {
        Value = "value",

        // the properties below are optional
        Unit = "unit"
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

locationActionProperty := &LocationActionProperty{
	DeviceId: jsii.String("deviceId"),
	Latitude: jsii.String("latitude"),
	Longitude: jsii.String("longitude"),
	RoleArn: jsii.String("roleArn"),
	TrackerName: jsii.String("trackerName"),

	// the properties below are optional
	Timestamp: &TimestampProperty{
		Value: jsii.String("value"),

		// the properties below are optional
		Unit: jsii.String("unit"),
	},
}
```

## Properties

- `deviceId`: string (required) — The unique ID of the device providing the location data.

- `latitude`: string (required) — A string that evaluates to a double value that represents the latitude of the device's location.

- `longitude`: string (required) — A string that evaluates to a double value that represents the longitude of the device's location.

- `roleArn`: string (required) — The IAM role that grants permission to write to the Amazon Location resource.

- `timestamp`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTopicRule.TimestampProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iot.CfnTopicRule.TimestampProperty.html) — The time that the location data was sampled.

  The default value is the time the MQTT message was processed.

- `trackerName`: string (required) — The name of the tracker resource in Amazon Location in which the location is updated.
