Skip to content

Commit e4ef962

Browse files
committed
Fix readme
1 parent b080b5e commit e4ef962

1 file changed

Lines changed: 20 additions & 8 deletions

File tree

  • samples/service_clients/commands/commands-sandbox

samples/service_clients/commands/commands-sandbox/README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,12 @@ update-command-execution <execution-id> IN_PROGRESS
437437

438438
You can also provide a result with the update:
439439
```
440-
update-command-execution <execution-id> SUCCEEDED result=battery_ok:true;message:"all good"
440+
update-command-execution <execution-id> IN_PROGRESS result=battery_ok:true;message:"doing something"
441441
```
442442

443443
Then this AWS CLI command
444444
```shell
445-
aws iot get-command-execution --target-arn "<thing ARN>" --execution-id <IoT command execution ID>
445+
aws iot get-command-execution --target-arn "<thing ARN>" --execution-id <IoT command execution ID> --include-result
446446
```
447447

448448
should return something like
@@ -453,6 +453,14 @@ should return something like
453453
"commandArn": "arn:aws:iot:...:command/MyJsonCommand",
454454
"targetArn": "arn:aws:iot:...:thing/MyIotThing",
455455
"status": "IN_PROGRESS",
456+
"result": {
457+
"battery_ok": {
458+
"B": true
459+
},
460+
"message": {
461+
"S": "doing something"
462+
}
463+
},
456464
"executionTimeoutSeconds": 300
457465
}
458466
```
@@ -471,11 +479,7 @@ update-command-execution <execution-id> SUCCEEDED
471479
```
472480
or
473481
```
474-
update-command-execution <execution-id> SUCCEEDED result=status:"task complete";success:true
475-
```
476-
or
477-
```
478-
update-command-execution <execution-id> FAILED reason-code=SHORT_FAILURE_CODE reason-description="A longer description"
482+
update-command-execution <execution-id> FAILED reason-code=SHORT_FAILURE_CODE reason-description="A longer description" result=status:"task complete";success:false
479483
```
480484

481485
will yield something like
@@ -517,6 +521,14 @@ which will yield
517521
"reasonCode": "SHORT_FAILURE_CODE",
518522
"reasonDescription": "A longer description"
519523
},
524+
"result": {
525+
"success": {
526+
"B": false
527+
},
528+
"status": {
529+
"S": "task complete"
530+
}
531+
},
520532
"executionTimeoutSeconds": 300
521533
}
522534
```
@@ -564,4 +576,4 @@ Additionally, example code might theoretically modify or delete existing AWS res
564576

565577
- Be aware of the resources that these examples create or delete.
566578
- Be aware of the costs that might be charged to your account as a result.
567-
- Back up your important data.
579+
- Back up your important data.

0 commit comments

Comments
 (0)