Skip to content

Commit

Permalink
feat(client-iot-data-plane): This release adds support for MQTT5 user…
Browse files Browse the repository at this point in the history
… properties when calling the AWS IoT GetRetainedMessage API
  • Loading branch information
awstools committed Apr 11, 2023
1 parent 25573e3 commit e663f3f
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 101 deletions.
4 changes: 2 additions & 2 deletions clients/client-iot-data-plane/src/IoTDataPlane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class IoTDataPlane extends IoTDataPlaneClient {
* <p>Gets the details of a single retained message for the specified topic.</p>
* <p>This action returns the message payload of the retained message, which can
* incur messaging costs. To list only the topic names of the retained messages, call
* <a href="/iot/latest/developerguide/API_iotdata_ListRetainedMessages.html">ListRetainedMessages</a>.</p>
* <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_iotdata_ListRetainedMessages.html">ListRetainedMessages</a>.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">GetRetainedMessage</a> action.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
* pricing - Messaging</a>.</p>
Expand Down Expand Up @@ -200,7 +200,7 @@ export class IoTDataPlane extends IoTDataPlaneClient {
* return any message payloads. Although this action doesn't return a message payload,
* it can still incur messaging costs.</p>
* <p>To get the message payload of a retained message, call
* <a href="https://docs.aws.amazon.com/iot/latest/developerguide/API_iotdata_GetRetainedMessage.html">GetRetainedMessage</a>
* <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_iotdata_GetRetainedMessage.html">GetRetainedMessage</a>
* with the topic name of the retained message.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">ListRetainedMessages</a> action.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface GetRetainedMessageCommandOutput extends GetRetainedMessageRespo
* <p>Gets the details of a single retained message for the specified topic.</p>
* <p>This action returns the message payload of the retained message, which can
* incur messaging costs. To list only the topic names of the retained messages, call
* <a href="/iot/latest/developerguide/API_iotdata_ListRetainedMessages.html">ListRetainedMessages</a>.</p>
* <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_iotdata_ListRetainedMessages.html">ListRetainedMessages</a>.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">GetRetainedMessage</a> action.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
* pricing - Messaging</a>.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface ListRetainedMessagesCommandOutput extends ListRetainedMessagesR
* return any message payloads. Although this action doesn't return a message payload,
* it can still incur messaging costs.</p>
* <p>To get the message payload of a retained message, call
* <a href="https://docs.aws.amazon.com/iot/latest/developerguide/API_iotdata_GetRetainedMessage.html">GetRetainedMessage</a>
* <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_iotdata_GetRetainedMessage.html">GetRetainedMessage</a>
* with the topic name of the retained message.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">ListRetainedMessages</a> action.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
Expand Down
11 changes: 11 additions & 0 deletions clients/client-iot-data-plane/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,17 @@ export interface GetRetainedMessageResponse {
* <p>The Epoch date and time, in milliseconds, when the retained message was stored by IoT.</p>
*/
lastModifiedTime?: number;

/**
* <p>A base64-encoded JSON string that includes an array of JSON objects, or null if the
* retained message doesn't include any user properties.</p>
* <p>The following example <code>userProperties</code> parameter is a JSON string that
* represents two user properties. Note that it will be base64-encoded:</p>
* <p>
* <code>[\{"deviceName": "alpha"\}, \{"deviceCnt": "45"\}]</code>
* </p>
*/
userProperties?: Uint8Array;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions clients/client-iot-data-plane/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ export const de_GetRetainedMessageCommand = async (
if (data.topic != null) {
contents.topic = __expectString(data.topic);
}
if (data.userProperties != null) {
contents.userProperties = context.base64Decoder(data.userProperties);
}
return contents;
};

Expand Down
Loading

0 comments on commit e663f3f

Please sign in to comment.