- 2.53.0 (latest)
- 2.52.0
- 2.51.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.10
- 2.2.0
- 2.1.7
- 2.0.7
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);
}
Classes
AccessSecretVersionRequest
Request message for SecretManagerService.AccessSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.AccessSecretVersionRequest
AccessSecretVersionRequest.Builder
Request message for SecretManagerService.AccessSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.AccessSecretVersionRequest
AccessSecretVersionResponse
Response message for SecretManagerService.AccessSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.AccessSecretVersionResponse
AccessSecretVersionResponse.Builder
Response message for SecretManagerService.AccessSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.AccessSecretVersionResponse
AddSecretVersionRequest
Request message for SecretManagerService.AddSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.AddSecretVersionRequest
AddSecretVersionRequest.Builder
Request message for SecretManagerService.AddSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.AddSecretVersionRequest
CreateSecretRequest
Request message for SecretManagerService.CreateSecret.
Protobuf type google.cloud.secrets.v1beta1.CreateSecretRequest
CreateSecretRequest.Builder
Request message for SecretManagerService.CreateSecret.
Protobuf type google.cloud.secrets.v1beta1.CreateSecretRequest
DeleteSecretRequest
Request message for SecretManagerService.DeleteSecret.
Protobuf type google.cloud.secrets.v1beta1.DeleteSecretRequest
DeleteSecretRequest.Builder
Request message for SecretManagerService.DeleteSecret.
Protobuf type google.cloud.secrets.v1beta1.DeleteSecretRequest
DestroySecretVersionRequest
Request message for SecretManagerService.DestroySecretVersion.
Protobuf type google.cloud.secrets.v1beta1.DestroySecretVersionRequest
DestroySecretVersionRequest.Builder
Request message for SecretManagerService.DestroySecretVersion.
Protobuf type google.cloud.secrets.v1beta1.DestroySecretVersionRequest
DisableSecretVersionRequest
Request message for SecretManagerService.DisableSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.DisableSecretVersionRequest
DisableSecretVersionRequest.Builder
Request message for SecretManagerService.DisableSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.DisableSecretVersionRequest
EnableSecretVersionRequest
Request message for SecretManagerService.EnableSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.EnableSecretVersionRequest
EnableSecretVersionRequest.Builder
Request message for SecretManagerService.EnableSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.EnableSecretVersionRequest
GetSecretRequest
Request message for SecretManagerService.GetSecret.
Protobuf type google.cloud.secrets.v1beta1.GetSecretRequest
GetSecretRequest.Builder
Request message for SecretManagerService.GetSecret.
Protobuf type google.cloud.secrets.v1beta1.GetSecretRequest
GetSecretVersionRequest
Request message for SecretManagerService.GetSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.GetSecretVersionRequest
GetSecretVersionRequest.Builder
Request message for SecretManagerService.GetSecretVersion.
Protobuf type google.cloud.secrets.v1beta1.GetSecretVersionRequest
ListSecretVersionsRequest
Request message for SecretManagerService.ListSecretVersions.
Protobuf type google.cloud.secrets.v1beta1.ListSecretVersionsRequest
ListSecretVersionsRequest.Builder
Request message for SecretManagerService.ListSecretVersions.
Protobuf type google.cloud.secrets.v1beta1.ListSecretVersionsRequest
ListSecretVersionsResponse
Response message for SecretManagerService.ListSecretVersions.
Protobuf type google.cloud.secrets.v1beta1.ListSecretVersionsResponse
ListSecretVersionsResponse.Builder
Response message for SecretManagerService.ListSecretVersions.
Protobuf type google.cloud.secrets.v1beta1.ListSecretVersionsResponse
ListSecretsRequest
Request message for SecretManagerService.ListSecrets.
Protobuf type google.cloud.secrets.v1beta1.ListSecretsRequest
ListSecretsRequest.Builder
Request message for SecretManagerService.ListSecrets.
Protobuf type google.cloud.secrets.v1beta1.ListSecretsRequest
ListSecretsResponse
Response message for SecretManagerService.ListSecrets.
Protobuf type google.cloud.secrets.v1beta1.ListSecretsResponse
ListSecretsResponse.Builder
Response message for SecretManagerService.ListSecrets.
Protobuf type google.cloud.secrets.v1beta1.ListSecretsResponse
ProjectName
ProjectName.Builder
Builder for projects/{project}.
Replication
A policy that defines the replication configuration of data.
Protobuf type google.cloud.secrets.v1beta1.Replication
Replication.Automatic
A replication policy that replicates the Secret payload without any restrictions.
Protobuf type google.cloud.secrets.v1beta1.Replication.Automatic
Replication.Automatic.Builder
A replication policy that replicates the Secret payload without any restrictions.
Protobuf type google.cloud.secrets.v1beta1.Replication.Automatic
Replication.Builder
A policy that defines the replication configuration of data.
Protobuf type google.cloud.secrets.v1beta1.Replication
Replication.UserManaged
A replication policy that replicates the Secret payload into the locations specified in [Secret.replication.user_managed.replicas][]
Protobuf type google.cloud.secrets.v1beta1.Replication.UserManaged
Replication.UserManaged.Builder
A replication policy that replicates the Secret payload into the locations specified in [Secret.replication.user_managed.replicas][]
Protobuf type google.cloud.secrets.v1beta1.Replication.UserManaged
Replication.UserManaged.Replica
Represents a Replica for this Secret.
Protobuf type google.cloud.secrets.v1beta1.Replication.UserManaged.Replica
Replication.UserManaged.Replica.Builder
Represents a Replica for this Secret.
Protobuf type google.cloud.secrets.v1beta1.Replication.UserManaged.Replica
ResourcesProto
Secret
A Secret is a logical secret whose value and versions can be accessed. A Secret is made up of zero or more SecretVersions that represent the secret data.
Protobuf type google.cloud.secrets.v1beta1.Secret
Secret.Builder
A Secret is a logical secret whose value and versions can be accessed. A Secret is made up of zero or more SecretVersions that represent the secret data.
Protobuf type google.cloud.secrets.v1beta1.Secret
SecretManagerServiceClient
Service Description: Secret Manager Service
Manages secrets and operations using those secrets. Implements a REST model with the following objects:
- Secret
- SecretVersion
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
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);
}
Note: close() needs to be called on the SecretManagerServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of SecretManagerServiceSettings to create(). For example:
To customize credentials:
SecretManagerServiceSettings secretManagerServiceSettings =
SecretManagerServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SecretManagerServiceClient secretManagerServiceClient =
SecretManagerServiceClient.create(secretManagerServiceSettings);
To customize the endpoint:
SecretManagerServiceSettings secretManagerServiceSettings =
SecretManagerServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
SecretManagerServiceClient secretManagerServiceClient =
SecretManagerServiceClient.create(secretManagerServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
SecretManagerServiceClient.ListSecretVersionsFixedSizeCollection
SecretManagerServiceClient.ListSecretVersionsPage
SecretManagerServiceClient.ListSecretVersionsPagedResponse
SecretManagerServiceClient.ListSecretsFixedSizeCollection
SecretManagerServiceClient.ListSecretsPage
SecretManagerServiceClient.ListSecretsPagedResponse
SecretManagerServiceGrpc
Secret Manager Service Manages secrets and operations using those secrets. Implements a REST model with the following objects:
- Secret
- SecretVersion
SecretManagerServiceGrpc.SecretManagerServiceBlockingStub
Secret Manager Service Manages secrets and operations using those secrets. Implements a REST model with the following objects:
- Secret
- SecretVersion
SecretManagerServiceGrpc.SecretManagerServiceFutureStub
Secret Manager Service Manages secrets and operations using those secrets. Implements a REST model with the following objects:
- Secret
- SecretVersion
SecretManagerServiceGrpc.SecretManagerServiceImplBase
Secret Manager Service Manages secrets and operations using those secrets. Implements a REST model with the following objects:
- Secret
- SecretVersion
SecretManagerServiceGrpc.SecretManagerServiceStub
Secret Manager Service Manages secrets and operations using those secrets. Implements a REST model with the following objects:
- Secret
- SecretVersion
SecretManagerServiceSettings
Settings class to configure an instance of SecretManagerServiceClient.
The default instance has everything set to sensible defaults:
- The default service address (secretmanager.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the total timeout of createSecret to 30 seconds:
SecretManagerServiceSettings.Builder secretManagerServiceSettingsBuilder =
SecretManagerServiceSettings.newBuilder();
secretManagerServiceSettingsBuilder
.createSecretSettings()
.setRetrySettings(
secretManagerServiceSettingsBuilder
.createSecretSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
SecretManagerServiceSettings secretManagerServiceSettings =
secretManagerServiceSettingsBuilder.build();
SecretManagerServiceSettings.Builder
Builder for SecretManagerServiceSettings.
SecretName
SecretName.Builder
Builder for projects/{project}/secrets/{secret}.
SecretPayload
A secret payload resource in the Secret Manager API. This contains the sensitive secret data that is associated with a SecretVersion.
Protobuf type google.cloud.secrets.v1beta1.SecretPayload
SecretPayload.Builder
A secret payload resource in the Secret Manager API. This contains the sensitive secret data that is associated with a SecretVersion.
Protobuf type google.cloud.secrets.v1beta1.SecretPayload
SecretVersion
A secret version resource in the Secret Manager API.
Protobuf type google.cloud.secrets.v1beta1.SecretVersion
SecretVersion.Builder
A secret version resource in the Secret Manager API.
Protobuf type google.cloud.secrets.v1beta1.SecretVersion
SecretVersionName
SecretVersionName.Builder
Builder for projects/{project}/secrets/{secret}/versions/{secret_version}.
ServiceProto
UpdateSecretRequest
Request message for SecretManagerService.UpdateSecret.
Protobuf type google.cloud.secrets.v1beta1.UpdateSecretRequest
UpdateSecretRequest.Builder
Request message for SecretManagerService.UpdateSecret.
Protobuf type google.cloud.secrets.v1beta1.UpdateSecretRequest
Interfaces
AccessSecretVersionRequestOrBuilder
AccessSecretVersionResponseOrBuilder
AddSecretVersionRequestOrBuilder
CreateSecretRequestOrBuilder
DeleteSecretRequestOrBuilder
DestroySecretVersionRequestOrBuilder
DisableSecretVersionRequestOrBuilder
EnableSecretVersionRequestOrBuilder
GetSecretRequestOrBuilder
GetSecretVersionRequestOrBuilder
ListSecretVersionsRequestOrBuilder
ListSecretVersionsResponseOrBuilder
ListSecretsRequestOrBuilder
ListSecretsResponseOrBuilder
Replication.AutomaticOrBuilder
Replication.UserManaged.ReplicaOrBuilder
Replication.UserManagedOrBuilder
ReplicationOrBuilder
SecretOrBuilder
SecretPayloadOrBuilder
SecretVersionOrBuilder
UpdateSecretRequestOrBuilder
Enums
Replication.ReplicationCase
SecretVersion.State
The state of a SecretVersion, indicating if it can be accessed.
Protobuf enum google.cloud.secrets.v1beta1.SecretVersion.State