aws-samples / aws-iot-twinmaker-samples

Apache License 2.0
97 stars 77 forks source link

Step 6 in Deploy needs update [startDateTime / endDateTime] #77

Closed dcolcott closed 2 years ago

dcolcott commented 2 years ago

startTime and endTime in step6 of Deploy Guide needs to be updated to startDateTime and endDateTime:

aws iottwinmaker get-property-value-history \ --region $AWS_DEFAULT_REGION \ --cli-input-json '{"componentName": "AlarmComponent","endTime": "2023-06-01T00:00:00Z","entityId": "Mixer_2_06ac63c4-d68d-4723-891a-8e758f8456ef","orderByTime": "ASCENDING","selectedProperties": ["alarm_status"],"startTime": "2022-06-01T00:00:00Z","workspaceId": "'${WORKSPACE_ID}'"}'

Parameter validation failed: Missing required parameter in input: "endDateTime" Missing required parameter in input: "startDateTime"

Works with below update:

aws iottwinmaker get-property-value-history \ --region $AWS_DEFAULT_REGION \ --cli-input-json '{"componentName": "AlarmComponent","endDateTime": "2023-06-01T00:00:00Z","entityId": "Mixer_2_06ac63c4-d68d-4723-891a-8e758f8456ef","orderByTime": "ASCENDING","selectedProperties": ["alarm_status"],"startDateTime": "2022-06-01T00:00:00Z","workspaceId": "'${WORKSPACE_ID}'"}'

johnnyw-aws commented 2 years ago

Hi @dcolcott, can you please confirm the CLI version you are using?

startTime and endTime are new fields that were added as part of TwinMaker's GA launch to support increased timestamp precision [1]. To maintain backwards-compatibility, we still support startDateTime and endDateTime but we recommend using the new fields moving forward [2].

liyuanqian commented 2 years ago

Hi @dcolcott, just as johnnyw-aws@ mentioned we have one CLI version requirement in the READ.ME part.

Ensure your AWS CLI version is at least 1.22.94. (or 2.5.5+ for AWS CLI v2)
aws --version

Appreciate it if you can check it and let us know if the issue still exists.

dcolcott commented 2 years ago

Ah OK, Im on aws-cli/2.4.5. I just need to update, thanks.