aws / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.
Apache License 2.0
3.05k stars 574 forks source link

pinpoint listTemplates method is not returning all documented fields #6021

Closed ontr2023 closed 2 months ago

ontr2023 commented 5 months ago

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

aBurmeseDev commented 5 months ago

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 commented 2 months ago

@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.

github-actions[bot] commented 2 months ago

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.