Skip to content

Commit 8ea87b4

Browse files
author
awstools
committedDec 16, 2024
feat(client-greengrassv2): Add support for runtime in GetCoreDevice and ListCoreDevices APIs.
1 parent 32c9cb1 commit 8ea87b4

File tree

5 files changed

+126
-4
lines changed

5 files changed

+126
-4
lines changed
 

‎clients/client-greengrassv2/src/commands/GetCoreDeviceCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export interface GetCoreDeviceCommandOutput extends GetCoreDeviceResponse, __Met
7272
* // coreVersion: "STRING_VALUE",
7373
* // platform: "STRING_VALUE",
7474
* // architecture: "STRING_VALUE",
75+
* // runtime: "STRING_VALUE",
7576
* // status: "HEALTHY" || "UNHEALTHY",
7677
* // lastStatusUpdateTimestamp: new Date("TIMESTAMP"),
7778
* // tags: { // TagMap

‎clients/client-greengrassv2/src/commands/ListCoreDevicesCommand.ts

+12-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,14 @@ export interface ListCoreDevicesCommandOutput extends ListCoreDevicesResponse, _
4343
* <p>When the core device receives a deployment from the Amazon Web Services Cloud</p>
4444
* </li>
4545
* <li>
46-
* <p>When the status of any component on the core device becomes
47-
* <code>BROKEN</code>
48-
* </p>
46+
* <p>For Greengrass nucleus 2.12.2 and earlier, the core device sends status updates when the
47+
* status of any component on the core device becomes <code>ERRORED</code> or
48+
* <code>BROKEN</code>.</p>
49+
* </li>
50+
* <li>
51+
* <p>For Greengrass nucleus 2.12.3 and later, the core device sends status updates when the
52+
* status of any component on the core device becomes <code>ERRORED</code>,
53+
* <code>BROKEN</code>, <code>RUNNING</code>, or <code>FINISHED</code>.</p>
4954
* </li>
5055
* <li>
5156
* <p>At a <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-nucleus-component.html#greengrass-nucleus-component-configuration-fss">regular interval that you can configure</a>, which defaults to 24 hours</p>
@@ -67,6 +72,7 @@ export interface ListCoreDevicesCommandOutput extends ListCoreDevicesResponse, _
6772
* status: "HEALTHY" || "UNHEALTHY",
6873
* maxResults: Number("int"),
6974
* nextToken: "STRING_VALUE",
75+
* runtime: "STRING_VALUE",
7076
* };
7177
* const command = new ListCoreDevicesCommand(input);
7278
* const response = await client.send(command);
@@ -76,6 +82,9 @@ export interface ListCoreDevicesCommandOutput extends ListCoreDevicesResponse, _
7682
* // coreDeviceThingName: "STRING_VALUE",
7783
* // status: "HEALTHY" || "UNHEALTHY",
7884
* // lastStatusUpdateTimestamp: new Date("TIMESTAMP"),
85+
* // platform: "STRING_VALUE",
86+
* // architecture: "STRING_VALUE",
87+
* // runtime: "STRING_VALUE",
7988
* // },
8089
* // ],
8190
* // nextToken: "STRING_VALUE",

‎clients/client-greengrassv2/src/models/models_0.ts

+66
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,36 @@ export interface CoreDevice {
935935
* @public
936936
*/
937937
lastStatusUpdateTimestamp?: Date | undefined;
938+
939+
/**
940+
* <p>The operating system platform that the core device runs.</p>
941+
* @public
942+
*/
943+
platform?: string | undefined;
944+
945+
/**
946+
* <p>The computer architecture of the core device.</p>
947+
* @public
948+
*/
949+
architecture?: string | undefined;
950+
951+
/**
952+
* <p>The runtime for the core device. The runtime can be:</p>
953+
* <ul>
954+
* <li>
955+
* <p>
956+
* <code>aws_nucleus_classic</code>
957+
* </p>
958+
* </li>
959+
* <li>
960+
* <p>
961+
* <code>aws_nucleus_lite</code>
962+
* </p>
963+
* </li>
964+
* </ul>
965+
* @public
966+
*/
967+
runtime?: string | undefined;
938968
}
939969

940970
/**
@@ -2423,6 +2453,24 @@ export interface GetCoreDeviceResponse {
24232453
*/
24242454
architecture?: string | undefined;
24252455

2456+
/**
2457+
* <p>The runtime for the core device. The runtime can be:</p>
2458+
* <ul>
2459+
* <li>
2460+
* <p>
2461+
* <code>aws_nucleus_classic</code>
2462+
* </p>
2463+
* </li>
2464+
* <li>
2465+
* <p>
2466+
* <code>aws_nucleus_lite</code>
2467+
* </p>
2468+
* </li>
2469+
* </ul>
2470+
* @public
2471+
*/
2472+
runtime?: string | undefined;
2473+
24262474
/**
24272475
* <p>The status of the core device. The core device status can be:</p>
24282476
* <ul>
@@ -2749,6 +2797,24 @@ export interface ListCoreDevicesRequest {
27492797
* @public
27502798
*/
27512799
nextToken?: string | undefined;
2800+
2801+
/**
2802+
* <p>The runtime to be used by the core device. The runtime can be:</p>
2803+
* <ul>
2804+
* <li>
2805+
* <p>
2806+
* <code>aws_nucleus_classic</code>
2807+
* </p>
2808+
* </li>
2809+
* <li>
2810+
* <p>
2811+
* <code>aws_nucleus_lite</code>
2812+
* </p>
2813+
* </li>
2814+
* </ul>
2815+
* @public
2816+
*/
2817+
runtime?: string | undefined;
27522818
}
27532819

27542820
/**

‎clients/client-greengrassv2/src/protocols/Aws_restJson1.ts

+6
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ export const se_ListCoreDevicesCommand = async (
548548
[_st]: [, input[_st]!],
549549
[_mR]: [() => input.maxResults !== void 0, () => input[_mR]!.toString()],
550550
[_nT]: [, input[_nT]!],
551+
[_r]: [, input[_r]!],
551552
});
552553
let body: any;
553554
b.m("GET").h(headers).q(query).b(body);
@@ -1040,6 +1041,7 @@ export const de_GetCoreDeviceCommand = async (
10401041
coreVersion: __expectString,
10411042
lastStatusUpdateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
10421043
platform: __expectString,
1044+
runtime: __expectString,
10431045
status: __expectString,
10441046
tags: _json,
10451047
});
@@ -1916,8 +1918,11 @@ const de_connectivityInfoList = (output: any, context: __SerdeContext): Connecti
19161918
*/
19171919
const de_CoreDevice = (output: any, context: __SerdeContext): CoreDevice => {
19181920
return take(output, {
1921+
architecture: __expectString,
19191922
coreDeviceThingName: __expectString,
19201923
lastStatusUpdateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1924+
platform: __expectString,
1925+
runtime: __expectString,
19211926
status: __expectString,
19221927
}) as any;
19231928
};
@@ -2172,6 +2177,7 @@ const _iET = "iotEndpointType";
21722177
const _mR = "maxResults";
21732178
const _nT = "nextToken";
21742179
const _pTA = "parentTargetArn";
2180+
const _r = "runtime";
21752181
const _rAS = "retryAfterSeconds";
21762182
const _rOF = "recipeOutputFormat";
21772183
const _ra = "retry-after";

‎codegen/sdk-codegen/aws-models/greengrassv2.json

+41-1
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,24 @@
958958
"traits": {
959959
"smithy.api#documentation": "<p>The time at which the core device's status last updated, expressed in ISO 8601\n format.</p>"
960960
}
961+
},
962+
"platform": {
963+
"target": "com.amazonaws.greengrassv2#CoreDevicePlatformString",
964+
"traits": {
965+
"smithy.api#documentation": "<p>The operating system platform that the core device runs.</p>"
966+
}
967+
},
968+
"architecture": {
969+
"target": "com.amazonaws.greengrassv2#CoreDeviceArchitectureString",
970+
"traits": {
971+
"smithy.api#documentation": "<p>The computer architecture of the core device.</p>"
972+
}
973+
},
974+
"runtime": {
975+
"target": "com.amazonaws.greengrassv2#CoreDeviceRuntimeString",
976+
"traits": {
977+
"smithy.api#documentation": "<p>The runtime for the core device. The runtime can be:</p>\n <ul>\n <li>\n <p>\n <code>aws_nucleus_classic</code>\n </p>\n </li>\n <li>\n <p>\n <code>aws_nucleus_lite</code>\n </p>\n </li>\n </ul>"
978+
}
961979
}
962980
},
963981
"traits": {
@@ -982,6 +1000,15 @@
9821000
}
9831001
}
9841002
},
1003+
"com.amazonaws.greengrassv2#CoreDeviceRuntimeString": {
1004+
"type": "string",
1005+
"traits": {
1006+
"smithy.api#length": {
1007+
"min": 1,
1008+
"max": 255
1009+
}
1010+
}
1011+
},
9851012
"com.amazonaws.greengrassv2#CoreDeviceStatus": {
9861013
"type": "enum",
9871014
"members": {
@@ -2425,6 +2452,12 @@
24252452
"smithy.api#documentation": "<p>The computer architecture of the core device.</p>"
24262453
}
24272454
},
2455+
"runtime": {
2456+
"target": "com.amazonaws.greengrassv2#CoreDeviceRuntimeString",
2457+
"traits": {
2458+
"smithy.api#documentation": "<p>The runtime for the core device. The runtime can be:</p>\n <ul>\n <li>\n <p>\n <code>aws_nucleus_classic</code>\n </p>\n </li>\n <li>\n <p>\n <code>aws_nucleus_lite</code>\n </p>\n </li>\n </ul>"
2459+
}
2460+
},
24282461
"status": {
24292462
"target": "com.amazonaws.greengrassv2#CoreDeviceStatus",
24302463
"traits": {
@@ -4828,7 +4861,7 @@
48284861
}
48294862
],
48304863
"traits": {
4831-
"smithy.api#documentation": "<p>Retrieves a paginated list of Greengrass core devices.</p>\n <note>\n <p>IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the\n IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud,\n then the reported status of that device might not reflect its current status. The status\n timestamp indicates when the device status was last updated.</p>\n <p>Core devices send status updates at the following times:</p>\n <ul>\n <li>\n <p>When the IoT Greengrass Core software starts</p>\n </li>\n <li>\n <p>When the core device receives a deployment from the Amazon Web Services Cloud</p>\n </li>\n <li>\n <p>When the status of any component on the core device becomes\n <code>BROKEN</code>\n </p>\n </li>\n <li>\n <p>At a <a href=\"https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-nucleus-component.html#greengrass-nucleus-component-configuration-fss\">regular interval that you can configure</a>, which defaults to 24 hours</p>\n </li>\n <li>\n <p>For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and\n cloud deployment</p>\n </li>\n </ul>\n </note>",
4864+
"smithy.api#documentation": "<p>Retrieves a paginated list of Greengrass core devices.</p>\n <note>\n <p>IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the\n IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud,\n then the reported status of that device might not reflect its current status. The status\n timestamp indicates when the device status was last updated.</p>\n <p>Core devices send status updates at the following times:</p>\n <ul>\n <li>\n <p>When the IoT Greengrass Core software starts</p>\n </li>\n <li>\n <p>When the core device receives a deployment from the Amazon Web Services Cloud</p>\n </li>\n <li>\n <p>For Greengrass nucleus 2.12.2 and earlier, the core device sends status updates when the\n status of any component on the core device becomes <code>ERRORED</code> or\n <code>BROKEN</code>.</p>\n </li>\n <li>\n <p>For Greengrass nucleus 2.12.3 and later, the core device sends status updates when the\n status of any component on the core device becomes <code>ERRORED</code>,\n <code>BROKEN</code>, <code>RUNNING</code>, or <code>FINISHED</code>.</p>\n </li>\n <li>\n <p>At a <a href=\"https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-nucleus-component.html#greengrass-nucleus-component-configuration-fss\">regular interval that you can configure</a>, which defaults to 24 hours</p>\n </li>\n <li>\n <p>For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and\n cloud deployment</p>\n </li>\n </ul>\n </note>",
48324865
"smithy.api#http": {
48334866
"method": "GET",
48344867
"uri": "/greengrass/v2/coreDevices",
@@ -4872,6 +4905,13 @@
48724905
"smithy.api#documentation": "<p>The token to be used for the next set of paginated results.</p>",
48734906
"smithy.api#httpQuery": "nextToken"
48744907
}
4908+
},
4909+
"runtime": {
4910+
"target": "com.amazonaws.greengrassv2#CoreDeviceRuntimeString",
4911+
"traits": {
4912+
"smithy.api#documentation": "<p>The runtime to be used by the core device. The runtime can be:</p>\n <ul>\n <li>\n <p>\n <code>aws_nucleus_classic</code>\n </p>\n </li>\n <li>\n <p>\n <code>aws_nucleus_lite</code>\n </p>\n </li>\n </ul>",
4913+
"smithy.api#httpQuery": "runtime"
4914+
}
48754915
}
48764916
},
48774917
"traits": {

0 commit comments

Comments
 (0)
Please sign in to comment.