accessSecretVersion method

  1. @override
Future<AccessSecretVersionResponse> accessSecretVersion(
  1. AccessSecretVersionRequest request
)
override

Accesses a SecretVersion. This call returns the secret data.

projects/*/secrets/*/versions/latest is an alias to the most recently created SecretVersion.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<AccessSecretVersionResponse> accessSecretVersion(
  AccessSecretVersionRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_accessSecretVersion case final accessSecretVersion?) {
    return accessSecretVersion(request);
  }
  throw UnsupportedError('accessSecretVersion');
}