Method: projects.secrets.addVersion Stay organized with collections Save and categorize content based on your preferences.
Creates a newSecretVersion containing secret data and attaches it to an existingSecret.
HTTP request
POST https://secretmanager.googleapis.com/v1beta1/{parent=projects/*/secrets/*}:addVersion
The URL usesgRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The resource name of the Authorization requires the followingIAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{"payload":{object ( |
| Fields | |
|---|---|
payload |
Required. The secret payload of the |
Response body
If successful, the response body contains an instance ofSecretVersion.
Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see theAuthentication Overview.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-14 UTC.