- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
BatchPutPropertyValuesCommand
Sets values for multiple time series properties.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTTwinMakerClient, BatchPutPropertyValuesCommand } from "@aws-sdk/client-iottwinmaker"; // ES Modules import
// const { IoTTwinMakerClient, BatchPutPropertyValuesCommand } = require("@aws-sdk/client-iottwinmaker"); // CommonJS import
const client = new IoTTwinMakerClient(config);
const input = { // BatchPutPropertyValuesRequest
workspaceId: "STRING_VALUE", // required
entries: [ // Entries // required
{ // PropertyValueEntry
entityPropertyReference: { // EntityPropertyReference
componentName: "STRING_VALUE",
componentPath: "STRING_VALUE",
externalIdProperty: { // ExternalIdProperty
"<keys>": "STRING_VALUE",
},
entityId: "STRING_VALUE",
propertyName: "STRING_VALUE", // required
},
propertyValues: [ // PropertyValues
{ // PropertyValue
timestamp: new Date("TIMESTAMP"),
value: { // DataValue
booleanValue: true || false,
doubleValue: Number("double"),
integerValue: Number("int"),
longValue: Number("long"),
stringValue: "STRING_VALUE",
listValue: [ // DataValueList
{
booleanValue: true || false,
doubleValue: Number("double"),
integerValue: Number("int"),
longValue: Number("long"),
stringValue: "STRING_VALUE",
listValue: [
"<DataValue>",
],
mapValue: { // DataValueMap
"<keys>": "<DataValue>",
},
relationshipValue: { // RelationshipValue
targetEntityId: "STRING_VALUE",
targetComponentName: "STRING_VALUE",
},
expression: "STRING_VALUE",
},
],
mapValue: {
"<keys>": "<DataValue>",
},
relationshipValue: {
targetEntityId: "STRING_VALUE",
targetComponentName: "STRING_VALUE",
},
expression: "STRING_VALUE",
},
time: "STRING_VALUE",
},
],
},
],
};
const command = new BatchPutPropertyValuesCommand(input);
const response = await client.send(command);
// { // BatchPutPropertyValuesResponse
// errorEntries: [ // ErrorEntries // required
// { // BatchPutPropertyErrorEntry
// errors: [ // Errors // required
// { // BatchPutPropertyError
// errorCode: "STRING_VALUE", // required
// errorMessage: "STRING_VALUE", // required
// entry: { // PropertyValueEntry
// entityPropertyReference: { // EntityPropertyReference
// componentName: "STRING_VALUE",
// componentPath: "STRING_VALUE",
// externalIdProperty: { // ExternalIdProperty
// "<keys>": "STRING_VALUE",
// },
// entityId: "STRING_VALUE",
// propertyName: "STRING_VALUE", // required
// },
// propertyValues: [ // PropertyValues
// { // PropertyValue
// timestamp: new Date("TIMESTAMP"),
// value: { // DataValue
// booleanValue: true || false,
// doubleValue: Number("double"),
// integerValue: Number("int"),
// longValue: Number("long"),
// stringValue: "STRING_VALUE",
// listValue: [ // DataValueList
// {
// booleanValue: true || false,
// doubleValue: Number("double"),
// integerValue: Number("int"),
// longValue: Number("long"),
// stringValue: "STRING_VALUE",
// listValue: [
// "<DataValue>",
// ],
// mapValue: { // DataValueMap
// "<keys>": "<DataValue>",
// },
// relationshipValue: { // RelationshipValue
// targetEntityId: "STRING_VALUE",
// targetComponentName: "STRING_VALUE",
// },
// expression: "STRING_VALUE",
// },
// ],
// mapValue: {
// "<keys>": "<DataValue>",
// },
// relationshipValue: {
// targetEntityId: "STRING_VALUE",
// targetComponentName: "STRING_VALUE",
// },
// expression: "STRING_VALUE",
// },
// time: "STRING_VALUE",
// },
// ],
// },
// },
// ],
// },
// ],
// };
BatchPutPropertyValuesCommand Input
See BatchPutPropertyValuesCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
entries Required | PropertyValueEntry[] | undefined | An object that maps strings to the property value entries to set. Each string in the mapping must be unique to this object. |
workspaceId Required | string | undefined | The ID of the workspace that contains the properties to set. |
BatchPutPropertyValuesCommand Output
See BatchPutPropertyValuesCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
errorEntries Required | BatchPutPropertyErrorEntry[] | undefined | Entries that caused errors in the batch put operation. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerException | server | An unexpected error has occurred. |
ResourceNotFoundException | client | The resource wasn't found. |
ThrottlingException | client | The rate exceeds the limit. |
ValidationException | client | Failed |
IoTTwinMakerServiceException | Base exception class for all service exceptions from IoTTwinMaker service. |