How do you create a Tracker via API?
0
I’ve been struggling to create a form that can be filled out to create a tracker at a given location. I have maps set up but haven't been able to create the tracker to be able to pin it; I found the parameters from the AWS SDK but am having trouble implementing it. Here is a snippet of my code:
import {AWS} from 'aws-sdk';
export default function Setup() {
var location = new AWS.Location({apiVersion: '2020-11-19'});
var params = {
TrackerName: 'STRING_VALUE', /* required */
Description: 'STRING_VALUE',
KmsKeyId: 'STRING_VALUE',
PricingPlanDataSource: 'STRING_VALUE',
Tags: {
'<TagKey>': 'STRING_VALUE',
/* '<TagKey>': ... */
}
};
location.createTracker(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
return(
<form>
<div class="form-group">
<label for="truckName">Tracker Name</label>
<input type="text" class="form-control" id="truckName" placeholder="Enter Truck Name" />
<small id="trackerHelp" class="form-text text-muted">Please enter the name of your tracker.</small>
</div>
<button type="submit" class="btn btn-primary" onclick="Setup">Submit</button>
</form>
);
}
asked 12 days ago5 views
1 Answers
0
Can you elaborate more on your use case? What SDK are you using? Can you share a code snippet and any errors you're getting?
answered 11 days ago
Relevant questions
create Secret with namy generated password/keys with CDK
asked 2 months agoHow do you create a Tracker via API?
asked 12 days agoCreating an alarm out of log group's metric filter.
asked 2 years agoAWS Glue Job schedule missing
asked 10 days agoRegistered for aws sagemaker studio but not able to create account
asked 11 days agoHow do I complete connections in apprunner?
Accepted Answerasked 2 months agoCreate API GW Websocket API that is only accessible from within a VPC.
asked 19 days agoHow to delete recorded events for user-interactions dataset ?
Accepted Answerasked 9 months agoFetching Device Position @ Midnight Daily
asked 3 months agomturk sandbox creates project, but production environment does not
Accepted Answerasked a year ago
I am trying to use the AWS SDK for Location Services (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Location.html#createTracker-property) and I am expecting a form to show up on the screen to enable a user the ability to create a Tracker. So far I have struggled getting the actual API call up and connected to the form; nothing renders.