Package com.google.cloud.secretmanager.v1beta1
@Generated("by gapic-generator-java")
package com.google.cloud.secretmanager.v1beta1
A client to Secret Manager API
The interfaces provided are listed below, along with usage samples.
======================= SecretManagerServiceClient =======================
Service Description: Secret Manager Service
Manages secrets and operations using those secrets. Implements a REST model with the following objects:
- [Secret][google.cloud.secrets.v1beta1.Secret]
- [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion]
Sample for SecretManagerServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecretManagerServiceClient secretManagerServiceClient =
SecretManagerServiceClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String secretId = "secretId945974251";
Secret secret = Secret.newBuilder().build();
Secret response = secretManagerServiceClient.createSecret(parent, secretId, secret);
}
-
ClassesClassDescriptionService Description: Secret Manager ServiceSettings class to configure an instance of
SecretManagerServiceClient.Builder for SecretManagerServiceSettings.