Skip to content

Secret Manager doesn't tell me which parameters are required #637

@JustinBeckwith

Description

@JustinBeckwith

Looking at this ol favorite:

const sm = new SecretManagerServiceClient();
const [secrets] = await sm.listSecrets({
  parent: 'projects/el-gato',
});

Looking at the listSecrets method, I see it takes an options bag. Great! I dig deeper:

listSecrets(request: protos.google.cloud.secretmanager.v1.IListSecretsRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.secretmanager.v1.ISecret[], protos.google.cloud.secretmanager.v1.IListSecretsRequest | null, protos.google.cloud.secretmanager.v1.IListSecretsResponse]>;

Ok, fine, what does IListSecretsRequest look like:

/** Properties of a ListSecretsRequest. */
interface IListSecretsRequest {

    /** ListSecretsRequest parent */
    parent?: (string|null);

    /** ListSecretsRequest pageSize */
    pageSize?: (number|null);

    /** ListSecretsRequest pageToken */
    pageToken?: (string|null);
}

This has 2 separate problems:

  1. I have no idea which of these parameters are required. I know that when I ran my code without it, I got an exception for not passing a parent :)

  2. I have no idea what any of these properties mean (I mean I do, but a mortal wouldn't). Aren't there better descriptions somewhere for these properties in the protos?

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions