-
Notifications
You must be signed in to change notification settings - Fork 646
Closed
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
In the context of AWS Inspector "Classic".
When fetching agents linked to an assessment using a ListAssessmentRunAgentsRequest, an AgentFilter can be used to only fetch agents with certain values of AgentHealth and AgentHealthCode.
The AgentHealthCode enum is defined in
| export const AgentHealthCode = { |
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/[email protected] (but also latest)
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
node v22.14.0
Reproduction Steps
const assesmentRunArn = ....
const agentsWithoutFilters = [];
const listAssessmentRunAgentsWithoutFilterPaginator = paginateListAssessmentRunAgents({
client: inspector,
pageSize: 50,
},
{ assessmentRunArn }
);
for await (const page of listAssessmentRunAgentsWithoutFilterPaginator) {
if (page.assessmentRunAgents != null) {
agentsWithoutFilters.push(...page.assessmentRunAgents.map(a => a.agentId));
}
}
assert( agentsWithoutFilters.filter(agent=>agent.agentHealthCode === "HEALTHY").length > 0 )
Observed Behavior
If a filter is used that contains all possible values of AgentHealthCode, the response will not have the "HEALTHY" agents.
Expected Behavior
The AgentHealthCode enum should contain the "HEALTHY" value since it is a possible return type of the call.
Possible Solution
Add "HEALTHY" to the AgentHealthCode enum
Additional Information/Context
No response
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.