aws / aws-sdk-js

AWS SDK for JavaScript in the browser and Node.js
https://aws.amazon.com/developer/language/javascript/
Apache License 2.0
7.59k stars 1.55k forks source link

AWS sdk is not accepting parameters as mentioned in the document #4561

Closed shubham-sp444 closed 8 months ago

shubham-sp444 commented 9 months ago

Describe the bug

SDK used:- https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/RedshiftServerless.html#listEndpointAccess-property

getting an error saying Unexpected key 'ownerAccount' found in params, this is not working locally as well as calling from the lambda. Property is also missing from the types.

Screenshot 2023-12-27 at 2 26 17 PM

Expected Behavior

It should accept the property as mentioned in the AWS document.

Current Behavior

error: UnexpectedParameter: Unexpected key 'ownerAccount' found in params at ParamValidator.fail (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:50:37) at ParamValidator.validateStructure (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:78:14) at ParamValidator.validateMember (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:89:21) at ParamValidator.validate (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:34:10) at Request.VALIDATE_PARAMETERS (/var/runtime/node_modules/aws-sdk/lib/event_listeners.js:166:42) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20) at callNextListener (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:96:12) at /var/runtime/node_modules/aws-sdk/lib/event_listeners.js:120:11 at finish (/var/runtime/node_modules/aws-sdk/lib/config.js:396:7) at /var/runtime/node_modules/aws-sdk/lib/config.js:414:9 { code: 'UnexpectedParameter', time: 2023-12-26T13:22:29.456Z },

Reproduction Steps

Try to call the API: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/RedshiftServerless.html#listEndpointAccess-property

and use the ownerAccount property

Possible Solution

No response

Additional Information/Context

No response

SDK version used

V2 javascript

Environment details (OS name and version, etc.)

I've used node 14 and 16 both , and currently running on MacOS Ventura 13.4 with Apple M1 Pro chip ( for local ).

aBurmeseDev commented 8 months ago

Looks like this's duplicate of https://github.com/aws/aws-sdk/issues/814. Please refer to that issue. Closing.

shubham-sp444 commented 8 months ago

Looks like this's duplicate of aws/aws-sdk#814. Please refer to that issue. Closing.

Hello @aBurmeseDev , It has the same issue but it's a different SDK with the issue, Please keep it open until both SDKs are fixed.

aBurmeseDev commented 8 months ago

@shubham-sp444 - Can you clarify which different SDK other than JavaScript seems to be having same issue? It looks like you opened two duplicate issues in same repo.

shubham-sp444 commented 8 months ago

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/RedshiftServerless.html#listEndpointAccess-property

This issue is for listEndpointAccess

while another issue is for createEndpointAccess.

Both refer to different SDKs