Skip to content

AgentHealthCode enum missing "HEALTHY" value #7105

Open
@cladelpino

Description

@cladelpino

Checkboxes for prior research

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 = {
, 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

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.p2This is a standard priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions