Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types in example syntax for GetStatementResultCommand appear to be incorrect #6850

Open
DevonStern opened this issue Jan 28, 2025 · 2 comments
Assignees
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue

Comments

@DevonStern
Copy link

Describe the issue

The syntax example for GetStatementResultCommand shows GetStatementResultRequest as the type for the input GetStatementResultResponse as the type for the output. However, below the example it shows GetStatementResultCommandInput as the input type and GetStatementResultCommandOutput as the output type.

Links

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift-data/command/GetStatementResultCommand/

@DevonStern DevonStern added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Jan 28, 2025
@aBurmeseDev aBurmeseDev self-assigned this Jan 28, 2025
@aBurmeseDev
Copy link
Member

Hi @DevonStern - thanks for reaching out and sorry about the confusion around this.

The behavior you're seeing is by design in AWS SDK for JavaScript v3, which differs from v2 in its modular structure. Each AWS service package in v3 comes with its own set of specific commands.

Let's break down your example:

  • The actual service API is called GetStatementResult
  • This API has its own request/response structure defined by the AWS service team GetStatementResultRequest/GetStatementResultResponse
  • The AWS JavaScript SDK v3 then wraps this API into a command pattern with its own input/output interface (client+command) GetStatementResultCommandInput/GetStatementResultCommandOutput
  • This pattern is consistent across all AWS services in SDK v3 docs. For instance, you'll see the same structure in other services like S3's PutObjectCommand.

The modular approach in v3 provides better organization and more precise control over service operations compared to the previous version. You can learn more details in this blog: https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/

Hope it helps!
John

@aBurmeseDev aBurmeseDev added response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jan 29, 2025
@DevonStern
Copy link
Author

Thank you for the clarification, @aBurmeseDev

In that case, it might be that some other pages need to have their examples updated to match that pattern. For example, on the pages for ExecuteStatementCommand and BatchExecuteStatementCommand it shows input/output as the types in the example rather than request/response. Is that correct?

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days. label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

2 participants