## UpdateSecretValue `client.Secrets.UpdateValue(ctx, body) (*SecretUpdateValueResponse, error)` **post** `/gitpod.v1.SecretService/UpdateSecretValue` Updates the value of an existing secret. Use this method to: - Rotate secret values - Update credentials ### Examples - Update secret value: Changes the value of an existing secret. ```yaml secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" value: "new-secret-value" ``` ### Parameters - `body SecretUpdateValueParams` - `SecretID param.Field[string]` - `Value param.Field[string]` value is the plaintext value of the secret ### Returns - `type SecretUpdateValueResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/gitpod-io/gitpod-sdk-go" "github.com/gitpod-io/gitpod-sdk-go/option" ) func main() { client := gitpod.NewClient( option.WithBearerToken("My Bearer Token"), ) response, err := client.Secrets.UpdateValue(context.TODO(), gitpod.SecretUpdateValueParams{ SecretID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"), Value: gitpod.F("new-secret-value"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### Response ```json {} ```