Skip to content

feature: Support arrays in list/detail pattern #14601

@erezrokah

Description

@erezrokah

Context

The SDK allows using a PreResourceResolver resolver to implement a list/detail pattern in a performant way (running the detail in parallel). This works well in most case where the details API accepts a single item and returns a single item such as

input := acm.DescribeCertificateInput{CertificateArn: resource.Item.(types.CertificateSummary).CertificateArn}

Problem

Some details APIs accept an array of items and return an array of items so they can't be used with PreResourceResolver. For example:

out, err := svc.DescribeFindings(ctx, &inspector.DescribeFindingsInput{FindingArns: response.FindingArns})

To make things more complicated in the example above ⬆️ the list operation has a max items of 100, and the details operation has a max items of 10 🙃

Proposed solutions

  1. Change the signature of PreResourceResolver to support an array of items
  2. Add new methods to RowResolver to handle it (not sure we can)
  3. Need to look at the code more...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions