destroySecretVersion method

  1. @override
Future<SecretVersion> destroySecretVersion(
  1. DestroySecretVersionRequest request
)
override

Destroys a SecretVersion.

Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.

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

  if (_destroySecretVersion case final destroySecretVersion?) {
    return destroySecretVersion(request);
  }
  throw UnsupportedError('destroySecretVersion');
}