Outscale: improve ex_create_api_access_rule.
diff --git a/libcloud/compute/drivers/outscale.py b/libcloud/compute/drivers/outscale.py
index 6cfddc7..5a59803 100644
--- a/libcloud/compute/drivers/outscale.py
+++ b/libcloud/compute/drivers/outscale.py
@@ -7870,6 +7870,11 @@
:return: a dict containing the API access rule created.
:rtype: ``dict``
"""
+
+ if not ca_ids and not ip_ranges:
+ raise ValueError(
+ "Either ca_ids or ip_ranges argument must be provided.")
+
action = "CreateApiAccessRule"
data = {"DryRun": dry_run}
if description is not None: