christophgysin / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update missing properties (Filters) for SecretsManager.ListSecretsRequest

mrowles opened this issue · comments

Is your feature request related to a problem? Please describe.

I noticed SecretsManager > listSecrets request params are missing 'Filter' param, which is really useful for environments with a large list of secrets (described here in the AWS CLI and here in the NodeJS/TS AWS SDK).

Describe the solution you'd like

import { SecretsManager } from 'https://deno.land/x/aws_sdk@v0.0.1/client-secrets-manager/SecretsManager.ts';
import {
  CreateSecretRequest,
  ListSecretsRequest,
  ListSecretsResponse,
  SecretListEntry,
  UpdateSecretRequest,
} from 'https://deno.land/x/aws_sdk@v0.0.1/client-secrets-manager/models/index.ts';

const listSecretsRequest: ListSecretsRequest = {
    // this errors out
    Filters: [{
        Key: 'name',
        Values: ['someSecretName'],
    }],
};

const existingSecretsResponse: ListSecretsResponse = await secretsManager.listSecrets(
    listSecretsRequest,
);

Describe alternatives you've considered

Right now, I am just getting the whole list and filtering after the fact in code.

Additional context

N/A

There seems to be a typo in your example. When adding the missing apostroph, the above works for me as expected.

Can you reproduce this with typo corrected? If so, can you provide a full example I can run, and the error you get?

@christophgysin I have updated the code with the imports just to be sure.

The missing apostrophe was a typo in the example, sorry, fixed now.

Can you try to reproduce this with the latest version v0.0.5?

@christophgysin That worked thanks. I had to add the --unstable flag to the deno command. Legend!!! I used the v0.0.1 because that is what version it suggests on the Deno site, just FYI.

Where does it recommend to use v0.0.1?

@christophgysin It appears as though the default lands on v0.0.5 now, I'm not sure what I'm on about. Maybe it's just Google search results point at 0.0.1 :/ All good. Cheers for the help!