Closed wuhkuh closed 1 month ago
Hi @wuhkuh - thanks for reaching out.
No filters should be applied, when the array of filters to be applied is empty. I expected to receive all snapshots (an unfiltered response) for the request.
That's current behavior that it returns unfiltered response without param Filters
and that’s the same behavior for across SDKs. Can you help me understand your specific use case that you'd like to keep Filters
param with empty array there?
This code example will return all snapshots (unfiltered)
import { EC2Client, DescribeSnapshotsCommand } from "@aws-sdk/client-ec2"; // ES Modules import
const client = new EC2Client({
region: "us-west-1"
});
const command = new DescribeSnapshotsCommand({});
const response = await client.send(command);
Hope it helps, John
@wuhkuh - For more context, did you encounter this issue when updating the SDK dependency version, or is this new code?
This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.
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.
Checkboxes for prior research
Describe the bug
When I configure an empty array of filters for
DescribeSnapshotsCommand
, I get the responseInvalidParameterValue: The filter 'null' is invalid
from the backend.SDK version number
@aws-sdk/client-ec2@3.569.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.12.2
Reproduction Steps
Observed Behavior
I got the following response:
Expected Behavior
No filters should be applied, when the array of filters to be applied is empty. I expected to receive all snapshots (an unfiltered response) for the request.
Possible Solution
undefined
, so I don't have to do this everywhere myself, when I'm dynamically building the list of filters.Additional Information/Context
No response