enableSecretVersion method

  1. @override
Future<SecretVersion> enableSecretVersion(
  1. EnableSecretVersionRequest request
)
override

Enables a SecretVersion.

Sets the state of the SecretVersion to ENABLED.

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

  if (_enableSecretVersion case final enableSecretVersion?) {
    return enableSecretVersion(request);
  }
  throw UnsupportedError('enableSecretVersion');
}