Secret Manager API (secretmanager:v1)

2024-02-01

15 new methods

Additions

    Methods
  • secretmanager.projects.locations.secrets.list

      Path: v1/{+parent}/secrets

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets

      HTTP Method: GET

      Parameters:

        parent

          Description: Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`

          Pattern: ^projects/[^/]+/locations/[^/]+$

          Location: path

          Required: Yes

          Type: string

        pageSize

          Description: Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.

          Location: query

          Type: integer

          Format: int32

        pageToken

          Description: Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token.

          Location: query

          Type: string

        filter

          Description: Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed.

          Location: query

          Type: string

      Parameter Order: parent

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Lists Secrets.

  • secretmanager.projects.locations.secrets.create

      Path: v1/{+parent}/secrets

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets

      HTTP Method: POST

      Parameters:

        parent

          Description: Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+$

          Location: path

          Required: Yes

          Type: string

        secretId

          Description: Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters.

          Location: query

          Type: string

      Parameter Order: parent

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Creates a new Secret containing no SecretVersions.

  • secretmanager.projects.locations.secrets.addVersion

      Path: v1/{+parent}:addVersion

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:addVersion

      HTTP Method: POST

      Parameters:

        parent

          Description: Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: parent

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Creates a new SecretVersion containing secret data and attaches it to an existing Secret.

  • secretmanager.projects.locations.secrets.get

      Path: v1/{+name}

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}

      HTTP Method: GET

      Parameters:

        name

          Description: Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: name

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Gets metadata for a given Secret.

  • secretmanager.projects.locations.secrets.patch

      Path: v1/{+name}

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}

      HTTP Method: PATCH

      Parameters:

        name

          Description: Output only. The resource name of the Secret in the format `projects/*/secrets/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+$

          Location: path

          Required: Yes

          Type: string

        updateMask

          Description: Required. Specifies the fields to be updated.

          Location: query

          Type: string

          Format: google-fieldmask

      Parameter Order: name

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Updates metadata of an existing Secret.

  • secretmanager.projects.locations.secrets.delete

      Path: v1/{+name}

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}

      HTTP Method: DELETE

      Parameters:

        name

          Description: Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+$

          Location: path

          Required: Yes

          Type: string

        etag

          Description: Optional. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds.

          Location: query

          Type: string

      Parameter Order: name

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Deletes a Secret.

  • secretmanager.projects.locations.secrets.setIamPolicy

      Path: v1/{+resource}:setIamPolicy

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:setIamPolicy

      HTTP Method: POST

      Parameters:

        resource

          Description: REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: resource

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.

  • secretmanager.projects.locations.secrets.getIamPolicy

      Path: v1/{+resource}:getIamPolicy

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:getIamPolicy

      HTTP Method: GET

      Parameters:

        resource

          Description: REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+$

          Location: path

          Required: Yes

          Type: string

        options.requestedPolicyVersion

          Description: Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).

          Location: query

          Type: integer

          Format: int32

      Parameter Order: resource

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.

  • secretmanager.projects.locations.secrets.testIamPermissions

      Path: v1/{+resource}:testIamPermissions

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:testIamPermissions

      HTTP Method: POST

      Parameters:

        resource

          Description: REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: resource

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

  • secretmanager.projects.locations.secrets.versions.list

      Path: v1/{+parent}/versions

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions

      HTTP Method: GET

      Parameters:

        parent

          Description: Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+$

          Location: path

          Required: Yes

          Type: string

        pageSize

          Description: Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.

          Location: query

          Type: integer

          Format: int32

        pageToken

          Description: Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].

          Location: query

          Type: string

        filter

          Description: Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed.

          Location: query

          Type: string

      Parameter Order: parent

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Lists SecretVersions. This call does not return secret data.

  • secretmanager.projects.locations.secrets.versions.get

      Path: v1/{+name}

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}

      HTTP Method: GET

      Parameters:

        name

          Description: Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: name

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.

  • secretmanager.projects.locations.secrets.versions.access

      Path: v1/{+name}:access

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:access

      HTTP Method: GET

      Parameters:

        name

          Description: Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: name

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.

  • secretmanager.projects.locations.secrets.versions.disable

      Path: v1/{+name}:disable

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:disable

      HTTP Method: POST

      Parameters:

        name

          Description: Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: name

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.

  • secretmanager.projects.locations.secrets.versions.enable

      Path: v1/{+name}:enable

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:enable

      HTTP Method: POST

      Parameters:

        name

          Description: Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: name

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.

  • secretmanager.projects.locations.secrets.versions.destroy

      Path: v1/{+name}:destroy

      Flat Path: v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:destroy

      HTTP Method: POST

      Parameters:

        name

          Description: Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.

          Pattern: ^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$

          Location: path

          Required: Yes

          Type: string

      Parameter Order: name

      Scopes: https://www.googleapis.com/auth/cloud-platform

      Description: Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.