aws-sdk-js-v3 icon indicating copy to clipboard operation
aws-sdk-js-v3 copied to clipboard

pinpoint listTemplates method is not returning all documented fields

Open ontr2023 opened this issue 1 year ago • 1 comments

Describe the bug

listTemplates function does not return the expected response.

ARN is a critical field which needs to be returned.

Expected Behavior

Expected response:

{ // ListTemplatesResponse TemplatesResponse: { // TemplatesResponse Item: [ // ListOfTemplateResponse // required { // TemplateResponse Arn: "STRING_VALUE", CreationDate: "STRING_VALUE", // required DefaultSubstitutions: "STRING_VALUE", LastModifiedDate: "STRING_VALUE", // required tags: { // MapOf__string "": "STRING_VALUE", }, TemplateDescription: "STRING_VALUE", TemplateName: "STRING_VALUE", // required TemplateType: "EMAIL" || "SMS" || "VOICE" || "PUSH" || "INAPP", // required Version: "STRING_VALUE", }, ], NextToken: "STRING_VALUE", }, };

Current Behavior

Current response:

{ "$metadata": { "httpStatusCode": 200, "requestId": "XXXX", "cfId": "XXX", "attempts": 1, "totalRetryDelay": 0 }, "TemplatesResponse": { "Item": [ { "CreationDate": "2023-11-21T12:39:19.924Z", "LastModifiedDate": "2024-03-18T22:02:29.208Z", "TemplateName": "email_template", "TemplateType": "EMAIL", "Version": "2" }, { "CreationDate": "2023-12-06T11:27:19.965Z", "LastModifiedDate": "2024-03-18T21:57:03.242Z", "TemplateName": "sms_template", "TemplateType": "SMS", "Version": "2" } ] } }

Reproduction Steps

Make a sample call per documentation.

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pinpoint/command/ListTemplatesCommand/

Possible Solution

No response

Additional Information/Context

No response

SDK version used

"@aws-sdk/client-pinpoint": "^3.549.0"

Environment details (OS name and version, etc.)

MacOS Sonoma v14.4

ontr2023 avatar Apr 06 '24 11:04 ontr2023

Hi @ontr2023 - thanks for reporting.

I was able to reproduce reported behavior with both JS SDK and AWS CLI, my guess is service API related. However, service documentation states that ARN isn't required property in TemplateResponse. I'm reaching out to Pinpoint team to get some clarification on this and will circle back here.

P127258770

aBurmeseDev avatar Apr 24 '24 07:04 aBurmeseDev

@ontr2023 - per update from service team, this has been updated and released as of today. thank you again for reporting this and please feel free to reach out again!

Closing the issue now.

aBurmeseDev avatar Jul 15 '24 22:07 aBurmeseDev

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

github-actions[bot] avatar Jul 30 '24 00:07 github-actions[bot]