Open
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
, but it is missing the "HEALTHY" value, which the SDK can return when an instance belongs to an ASG in my latest tests.Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/client-inspector@3.777.0 (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