getSecretVersion method

  1. @override
Future<SecretVersion> getSecretVersion(
  1. GetSecretVersionRequest request
)
override

Gets metadata for a SecretVersion.

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<SecretVersion> getSecretVersion(
  GetSecretVersionRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_getSecretVersion case final getSecretVersion?) {
    return getSecretVersion(request);
  }
  throw UnsupportedError('getSecretVersion');
}