rotateSecret method
Do a managed rotation for a Secret.
This can only be triggered after Managed rotation has been enabled.
This method will add a secret version and update the password in Cloud SQL.
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> rotateSecret(RotateSecretRequest request) async {
if (isClosed) throw StateError('Service is closed');
if (_rotateSecret case final rotateSecret?) {
return rotateSecret(request);
}
throw UnsupportedError('rotateSecret');
}