google-cloud-secretmanager overview (2.0.7)

com.google.cloud.secretmanager.v1

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
  • SecretVersion

Sample for SecretManagerServiceClient:


 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);
 }
 

com.google.cloud.secretmanager.v1.stub

com.google.cloud.secretmanager.v1beta1

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
  • SecretVersion

Sample for SecretManagerServiceClient:


 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);
 }
 

com.google.cloud.secretmanager.v1beta1.stub