updateCmekSettings method

  1. @override
Future<CmekSettings> updateCmekSettings(
  1. UpdateCmekSettingsRequest request
)
override

Updates the Log Router CMEK settings for the given resource.

Note: CMEK for the Log Router can currently only be configured for Google Cloud organizations. Once configured, it applies to all projects and folders in the Google Cloud organization.

UpdateCmekSettings will fail if 1) kms_key_name is invalid, or 2) the associated service account does not have the required roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key, or 3) access to the key is disabled.

See Enabling CMEK for Log Router for more information.

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

  if (_updateCmekSettings case final updateCmekSettings?) {
    return updateCmekSettings(request);
  }
  throw UnsupportedError('updateCmekSettings');
}