diff --git a/discovery/secretmanager-v1.json b/discovery/secretmanager-v1.json index a37de11cba..500cda7557 100644 --- a/discovery/secretmanager-v1.json +++ b/discovery/secretmanager-v1.json @@ -175,6 +175,471 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "secrets": { + "methods": { + "addVersion": { + "description": "Creates a new SecretVersion containing secret data and attaches it to an existing Secret.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:addVersion", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.addVersion", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:addVersion", + "request": { + "$ref": "AddSecretVersionRequest" + }, + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a new Secret containing no SecretVersions.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "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" + } + }, + "path": "v1/{+parent}/secrets", + "request": { + "$ref": "Secret" + }, + "response": { + "$ref": "Secret" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Secret.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", + "httpMethod": "DELETE", + "id": "secretmanager.projects.locations.secrets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "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" + }, + "name": { + "description": "Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets metadata for a given Secret.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Secret" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:getIamPolicy", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "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).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "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.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Secrets.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "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" + }, + "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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/secrets", + "response": { + "$ref": "ListSecretsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates metadata of an existing Secret.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", + "httpMethod": "PATCH", + "id": "secretmanager.projects.locations.secrets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Specifies the fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Secret" + }, + "response": { + "$ref": "Secret" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "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.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:setIamPolicy", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "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.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "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.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:testIamPermissions", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "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.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "versions": { + "methods": { + "access": { + "description": "Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:access", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.versions.access", + "parameterOrder": [ + "name" + ], + "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.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:access", + "response": { + "$ref": "AccessSecretVersionResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "destroy": { + "description": "Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:destroy", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.versions.destroy", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:destroy", + "request": { + "$ref": "DestroySecretVersionRequest" + }, + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "disable": { + "description": "Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:disable", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.versions.disable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:disable", + "request": { + "$ref": "DisableSecretVersionRequest" + }, + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "enable": { + "description": "Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:enable", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.versions.enable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:enable", + "request": { + "$ref": "EnableSecretVersionRequest" + }, + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.versions.get", + "parameterOrder": [ + "name" + ], + "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.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists SecretVersions. This call does not return secret data.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.versions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "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" + }, + "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.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/versions", + "response": { + "$ref": "ListSecretVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } } }, "secrets": { @@ -189,7 +654,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*`.", + "description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+$", "required": true, @@ -217,7 +682,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*`.", + "description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -280,7 +745,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*`.", + "description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+$", "required": true, @@ -352,7 +817,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*`.", + "description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -471,7 +936,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "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.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -496,7 +961,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*`.", + "description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -524,7 +989,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*`.", + "description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -552,7 +1017,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*`.", + "description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -580,7 +1045,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "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.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -621,7 +1086,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*`.", + "description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+$", "required": true, @@ -643,7 +1108,7 @@ } } }, - "revision": "20231215", + "revision": "20240126", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -651,7 +1116,7 @@ "id": "AccessSecretVersionResponse", "properties": { "name": { - "description": "The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`.", + "description": "The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", "type": "string" }, "payload": { @@ -759,7 +1224,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, @@ -1097,7 +1562,7 @@ }, "replication": { "$ref": "Replication", - "description": "Required. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created." + "description": "Optional. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created." }, "rotation": { "$ref": "Rotation", @@ -1120,7 +1585,7 @@ "format": "int64", "type": "string" }, - "description": "Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. At launch Access by Allias will only be supported on GetSecretVersion and AccessSecretVersion.", + "description": "Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.", "type": "object" } }, diff --git a/discovery/secretmanager-v1beta1.json b/discovery/secretmanager-v1beta1.json index 9b2eda6dbf..7dea95678c 100644 --- a/discovery/secretmanager-v1beta1.json +++ b/discovery/secretmanager-v1beta1.json @@ -628,7 +628,7 @@ } } }, - "revision": "20231215", + "revision": "20240126", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -727,7 +727,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/src/apis/secretmanager/v1.ts b/src/apis/secretmanager/v1.ts index 64f76b0ee4..0c4c509a54 100644 --- a/src/apis/secretmanager/v1.ts +++ b/src/apis/secretmanager/v1.ts @@ -129,7 +129,7 @@ export namespace secretmanager_v1 { */ export interface Schema$AccessSecretVersionResponse { /** - * The resource name of the SecretVersion in the format `projects/x/secrets/x/versions/x`. + * The resource name of the SecretVersion in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. */ name?: string | null; /** @@ -203,7 +203,7 @@ export namespace secretmanager_v1 { */ members?: string[] | null; /** - * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). */ role?: string | null; } @@ -464,7 +464,7 @@ export namespace secretmanager_v1 { */ name?: string | null; /** - * Required. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created. + * Optional. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created. */ replication?: Schema$Replication; /** @@ -480,7 +480,7 @@ export namespace secretmanager_v1 { */ ttl?: string | null; /** - * Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. At launch Access by Allias will only be supported on GetSecretVersion and AccessSecretVersion. + * Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion. */ versionAliases?: {[key: string]: string} | null; } @@ -602,8 +602,10 @@ export namespace secretmanager_v1 { export class Resource$Projects$Locations { context: APIRequestContext; + secrets: Resource$Projects$Locations$Secrets; constructor(context: APIRequestContext) { this.context = context; + this.secrets = new Resource$Projects$Locations$Secrets(this.context); } /** @@ -812,6 +814,1542 @@ export namespace secretmanager_v1 { pageToken?: string; } + export class Resource$Projects$Locations$Secrets { + context: APIRequestContext; + versions: Resource$Projects$Locations$Secrets$Versions; + constructor(context: APIRequestContext) { + this.context = context; + this.versions = new Resource$Projects$Locations$Secrets$Versions( + this.context + ); + } + + /** + * Creates a new SecretVersion containing secret data and attaches it to an existing Secret. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + addVersion( + params: Params$Resource$Projects$Locations$Secrets$Addversion, + options: StreamMethodOptions + ): GaxiosPromise; + addVersion( + params?: Params$Resource$Projects$Locations$Secrets$Addversion, + options?: MethodOptions + ): GaxiosPromise; + addVersion( + params: Params$Resource$Projects$Locations$Secrets$Addversion, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addVersion( + params: Params$Resource$Projects$Locations$Secrets$Addversion, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addVersion( + params: Params$Resource$Projects$Locations$Secrets$Addversion, + callback: BodyResponseCallback + ): void; + addVersion(callback: BodyResponseCallback): void; + addVersion( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Addversion + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Addversion; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$Addversion; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}:addVersion').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Creates a new Secret containing no SecretVersions. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + create( + params: Params$Resource$Projects$Locations$Secrets$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Projects$Locations$Secrets$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Projects$Locations$Secrets$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Secrets$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Projects$Locations$Secrets$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/secrets').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Deletes a Secret. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + delete( + params: Params$Resource$Projects$Locations$Secrets$Delete, + options: StreamMethodOptions + ): GaxiosPromise; + delete( + params?: Params$Resource$Projects$Locations$Secrets$Delete, + options?: MethodOptions + ): GaxiosPromise; + delete( + params: Params$Resource$Projects$Locations$Secrets$Delete, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Secrets$Delete, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + delete( + params: Params$Resource$Projects$Locations$Secrets$Delete, + callback: BodyResponseCallback + ): void; + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets metadata for a given Secret. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Secrets$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Secrets$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Secrets$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Secrets$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Secrets$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + getIamPolicy( + params: Params$Resource$Projects$Locations$Secrets$Getiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + getIamPolicy( + params?: Params$Resource$Projects$Locations$Secrets$Getiampolicy, + options?: MethodOptions + ): GaxiosPromise; + getIamPolicy( + params: Params$Resource$Projects$Locations$Secrets$Getiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Secrets$Getiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + getIamPolicy( + params: Params$Resource$Projects$Locations$Secrets$Getiampolicy, + callback: BodyResponseCallback + ): void; + getIamPolicy(callback: BodyResponseCallback): void; + getIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Getiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Getiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$Getiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:getIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists Secrets. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Secrets$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Secrets$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Secrets$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Secrets$List, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Secrets$List, + callback: BodyResponseCallback + ): void; + list(callback: BodyResponseCallback): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/secrets').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Updates metadata of an existing Secret. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Projects$Locations$Secrets$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Projects$Locations$Secrets$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Projects$Locations$Secrets$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Secrets$Patch, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Projects$Locations$Secrets$Patch, + callback: BodyResponseCallback + ): void; + patch(callback: BodyResponseCallback): void; + patch( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + setIamPolicy( + params: Params$Resource$Projects$Locations$Secrets$Setiampolicy, + options: StreamMethodOptions + ): GaxiosPromise; + setIamPolicy( + params?: Params$Resource$Projects$Locations$Secrets$Setiampolicy, + options?: MethodOptions + ): GaxiosPromise; + setIamPolicy( + params: Params$Resource$Projects$Locations$Secrets$Setiampolicy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Secrets$Setiampolicy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + setIamPolicy( + params: Params$Resource$Projects$Locations$Secrets$Setiampolicy, + callback: BodyResponseCallback + ): void; + setIamPolicy(callback: BodyResponseCallback): void; + setIamPolicy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Setiampolicy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Setiampolicy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$Setiampolicy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:setIamPolicy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * 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. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + testIamPermissions( + params: Params$Resource$Projects$Locations$Secrets$Testiampermissions, + options: StreamMethodOptions + ): GaxiosPromise; + testIamPermissions( + params?: Params$Resource$Projects$Locations$Secrets$Testiampermissions, + options?: MethodOptions + ): GaxiosPromise; + testIamPermissions( + params: Params$Resource$Projects$Locations$Secrets$Testiampermissions, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Secrets$Testiampermissions, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + testIamPermissions( + params: Params$Resource$Projects$Locations$Secrets$Testiampermissions, + callback: BodyResponseCallback + ): void; + testIamPermissions( + callback: BodyResponseCallback + ): void; + testIamPermissions( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Testiampermissions + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Testiampermissions; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = + {} as Params$Resource$Projects$Locations$Secrets$Testiampermissions; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+resource}:testIamPermissions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['resource'], + pathParams: ['resource'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Secrets$Addversion + extends StandardParameters { + /** + * Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/x/secrets/x` or `projects/x/locations/x/secrets/x`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$AddSecretVersionRequest; + } + export interface Params$Resource$Projects$Locations$Secrets$Create + extends StandardParameters { + /** + * Required. The resource name of the project to associate with the Secret, in the format `projects/x` or `projects/x/locations/x`. + */ + parent?: string; + /** + * 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. + */ + secretId?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Secret; + } + export interface Params$Resource$Projects$Locations$Secrets$Delete + extends StandardParameters { + /** + * 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. + */ + etag?: string; + /** + * Required. The resource name of the Secret to delete in the format `projects/x/secrets/x`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Secrets$Get + extends StandardParameters { + /** + * Required. The resource name of the Secret, in the format `projects/x/secrets/x` or `projects/x/locations/x/secrets/x`. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Secrets$Getiampolicy + extends StandardParameters { + /** + * 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). + */ + 'options.requestedPolicyVersion'?: number; + /** + * 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. + */ + resource?: string; + } + export interface Params$Resource$Projects$Locations$Secrets$List + extends StandardParameters { + /** + * 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. + */ + filter?: string; + /** + * 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. + */ + pageSize?: number; + /** + * Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token. + */ + pageToken?: string; + /** + * Required. The resource name of the project associated with the Secrets, in the format `projects/x` or `projects/x/locations/x` + */ + parent?: string; + } + export interface Params$Resource$Projects$Locations$Secrets$Patch + extends StandardParameters { + /** + * Output only. The resource name of the Secret in the format `projects/x/secrets/x`. + */ + name?: string; + /** + * Required. Specifies the fields to be updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$Secret; + } + export interface Params$Resource$Projects$Locations$Secrets$Setiampolicy + extends StandardParameters { + /** + * 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. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SetIamPolicyRequest; + } + export interface Params$Resource$Projects$Locations$Secrets$Testiampermissions + extends StandardParameters { + /** + * 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. + */ + resource?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$TestIamPermissionsRequest; + } + + export class Resource$Projects$Locations$Secrets$Versions { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Accesses a SecretVersion. This call returns the secret data. `projects/x/secrets/x/versions/latest` is an alias to the most recently created SecretVersion. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + access( + params: Params$Resource$Projects$Locations$Secrets$Versions$Access, + options: StreamMethodOptions + ): GaxiosPromise; + access( + params?: Params$Resource$Projects$Locations$Secrets$Versions$Access, + options?: MethodOptions + ): GaxiosPromise; + access( + params: Params$Resource$Projects$Locations$Secrets$Versions$Access, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + access( + params: Params$Resource$Projects$Locations$Secrets$Versions$Access, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + access( + params: Params$Resource$Projects$Locations$Secrets$Versions$Access, + callback: BodyResponseCallback + ): void; + access( + callback: BodyResponseCallback + ): void; + access( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Versions$Access + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Versions$Access; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = + {} as Params$Resource$Projects$Locations$Secrets$Versions$Access; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:access').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + destroy( + params: Params$Resource$Projects$Locations$Secrets$Versions$Destroy, + options: StreamMethodOptions + ): GaxiosPromise; + destroy( + params?: Params$Resource$Projects$Locations$Secrets$Versions$Destroy, + options?: MethodOptions + ): GaxiosPromise; + destroy( + params: Params$Resource$Projects$Locations$Secrets$Versions$Destroy, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + destroy( + params: Params$Resource$Projects$Locations$Secrets$Versions$Destroy, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + destroy( + params: Params$Resource$Projects$Locations$Secrets$Versions$Destroy, + callback: BodyResponseCallback + ): void; + destroy(callback: BodyResponseCallback): void; + destroy( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Versions$Destroy + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Versions$Destroy; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = + {} as Params$Resource$Projects$Locations$Secrets$Versions$Destroy; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:destroy').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + disable( + params: Params$Resource$Projects$Locations$Secrets$Versions$Disable, + options: StreamMethodOptions + ): GaxiosPromise; + disable( + params?: Params$Resource$Projects$Locations$Secrets$Versions$Disable, + options?: MethodOptions + ): GaxiosPromise; + disable( + params: Params$Resource$Projects$Locations$Secrets$Versions$Disable, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + disable( + params: Params$Resource$Projects$Locations$Secrets$Versions$Disable, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + disable( + params: Params$Resource$Projects$Locations$Secrets$Versions$Disable, + callback: BodyResponseCallback + ): void; + disable(callback: BodyResponseCallback): void; + disable( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Versions$Disable + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Versions$Disable; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = + {} as Params$Resource$Projects$Locations$Secrets$Versions$Disable; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:disable').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + enable( + params: Params$Resource$Projects$Locations$Secrets$Versions$Enable, + options: StreamMethodOptions + ): GaxiosPromise; + enable( + params?: Params$Resource$Projects$Locations$Secrets$Versions$Enable, + options?: MethodOptions + ): GaxiosPromise; + enable( + params: Params$Resource$Projects$Locations$Secrets$Versions$Enable, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + enable( + params: Params$Resource$Projects$Locations$Secrets$Versions$Enable, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + enable( + params: Params$Resource$Projects$Locations$Secrets$Versions$Enable, + callback: BodyResponseCallback + ): void; + enable(callback: BodyResponseCallback): void; + enable( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Versions$Enable + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Versions$Enable; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = + {} as Params$Resource$Projects$Locations$Secrets$Versions$Enable; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:enable').replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets metadata for a SecretVersion. `projects/x/secrets/x/versions/latest` is an alias to the most recently created SecretVersion. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Projects$Locations$Secrets$Versions$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Projects$Locations$Secrets$Versions$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Projects$Locations$Secrets$Versions$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Secrets$Versions$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Projects$Locations$Secrets$Versions$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Versions$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Versions$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$Versions$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Lists SecretVersions. This call does not return secret data. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Projects$Locations$Secrets$Versions$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Projects$Locations$Secrets$Versions$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Projects$Locations$Secrets$Versions$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Secrets$Versions$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Projects$Locations$Secrets$Versions$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Secrets$Versions$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Secrets$Versions$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Locations$Secrets$Versions$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://secretmanager.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+parent}/versions').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Projects$Locations$Secrets$Versions$Access + extends StandardParameters { + /** + * Required. The resource name of the SecretVersion in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. `projects/x/secrets/x/versions/latest` or `projects/x/locations/x/secrets/x/versions/latest` is an alias to the most recently created SecretVersion. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Secrets$Versions$Destroy + extends StandardParameters { + /** + * Required. The resource name of the SecretVersion to destroy in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DestroySecretVersionRequest; + } + export interface Params$Resource$Projects$Locations$Secrets$Versions$Disable + extends StandardParameters { + /** + * Required. The resource name of the SecretVersion to disable in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DisableSecretVersionRequest; + } + export interface Params$Resource$Projects$Locations$Secrets$Versions$Enable + extends StandardParameters { + /** + * Required. The resource name of the SecretVersion to enable in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$EnableSecretVersionRequest; + } + export interface Params$Resource$Projects$Locations$Secrets$Versions$Get + extends StandardParameters { + /** + * Required. The resource name of the SecretVersion in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. `projects/x/secrets/x/versions/latest` or `projects/x/locations/x/secrets/x/versions/latest` is an alias to the most recently created SecretVersion. + */ + name?: string; + } + export interface Params$Resource$Projects$Locations$Secrets$Versions$List + extends StandardParameters { + /** + * 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. + */ + filter?: string; + /** + * 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. + */ + pageSize?: number; + /** + * Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][]. + */ + pageToken?: string; + /** + * Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/x/secrets/x` or `projects/x/locations/x/secrets/x`. + */ + parent?: string; + } + export class Resource$Projects$Secrets { context: APIRequestContext; versions: Resource$Projects$Secrets$Versions; @@ -1617,7 +3155,7 @@ export namespace secretmanager_v1 { export interface Params$Resource$Projects$Secrets$Addversion extends StandardParameters { /** - * Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/x/secrets/x`. + * Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/x/secrets/x` or `projects/x/locations/x/secrets/x`. */ parent?: string; @@ -1629,7 +3167,7 @@ export namespace secretmanager_v1 { export interface Params$Resource$Projects$Secrets$Create extends StandardParameters { /** - * Required. The resource name of the project to associate with the Secret, in the format `projects/x`. + * Required. The resource name of the project to associate with the Secret, in the format `projects/x` or `projects/x/locations/x`. */ parent?: string; /** @@ -1656,7 +3194,7 @@ export namespace secretmanager_v1 { export interface Params$Resource$Projects$Secrets$Get extends StandardParameters { /** - * Required. The resource name of the Secret, in the format `projects/x/secrets/x`. + * Required. The resource name of the Secret, in the format `projects/x/secrets/x` or `projects/x/locations/x/secrets/x`. */ name?: string; } @@ -1686,7 +3224,7 @@ export namespace secretmanager_v1 { */ pageToken?: string; /** - * Required. The resource name of the project associated with the Secrets, in the format `projects/x`. + * Required. The resource name of the project associated with the Secrets, in the format `projects/x` or `projects/x/locations/x` */ parent?: string; } @@ -2274,14 +3812,14 @@ export namespace secretmanager_v1 { export interface Params$Resource$Projects$Secrets$Versions$Access extends StandardParameters { /** - * Required. The resource name of the SecretVersion in the format `projects/x/secrets/x/versions/x`. `projects/x/secrets/x/versions/latest` is an alias to the most recently created SecretVersion. + * Required. The resource name of the SecretVersion in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. `projects/x/secrets/x/versions/latest` or `projects/x/locations/x/secrets/x/versions/latest` is an alias to the most recently created SecretVersion. */ name?: string; } export interface Params$Resource$Projects$Secrets$Versions$Destroy extends StandardParameters { /** - * Required. The resource name of the SecretVersion to destroy in the format `projects/x/secrets/x/versions/x`. + * Required. The resource name of the SecretVersion to destroy in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. */ name?: string; @@ -2293,7 +3831,7 @@ export namespace secretmanager_v1 { export interface Params$Resource$Projects$Secrets$Versions$Disable extends StandardParameters { /** - * Required. The resource name of the SecretVersion to disable in the format `projects/x/secrets/x/versions/x`. + * Required. The resource name of the SecretVersion to disable in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. */ name?: string; @@ -2305,7 +3843,7 @@ export namespace secretmanager_v1 { export interface Params$Resource$Projects$Secrets$Versions$Enable extends StandardParameters { /** - * Required. The resource name of the SecretVersion to enable in the format `projects/x/secrets/x/versions/x`. + * Required. The resource name of the SecretVersion to enable in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. */ name?: string; @@ -2317,7 +3855,7 @@ export namespace secretmanager_v1 { export interface Params$Resource$Projects$Secrets$Versions$Get extends StandardParameters { /** - * Required. The resource name of the SecretVersion in the format `projects/x/secrets/x/versions/x`. `projects/x/secrets/x/versions/latest` is an alias to the most recently created SecretVersion. + * Required. The resource name of the SecretVersion in the format `projects/x/secrets/x/versions/x` or `projects/x/locations/x/secrets/x/versions/x`. `projects/x/secrets/x/versions/latest` or `projects/x/locations/x/secrets/x/versions/latest` is an alias to the most recently created SecretVersion. */ name?: string; } @@ -2336,7 +3874,7 @@ export namespace secretmanager_v1 { */ pageToken?: string; /** - * Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/x/secrets/x`. + * Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/x/secrets/x` or `projects/x/locations/x/secrets/x`. */ parent?: string; } diff --git a/src/apis/secretmanager/v1beta1.ts b/src/apis/secretmanager/v1beta1.ts index 57b23fe92f..3ab2dfe4c2 100644 --- a/src/apis/secretmanager/v1beta1.ts +++ b/src/apis/secretmanager/v1beta1.ts @@ -189,7 +189,7 @@ export namespace secretmanager_v1beta1 { */ members?: string[] | null; /** - * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). */ role?: string | null; }