You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate the region exists for the given cloud provider.
22
+
23
+
Args:
24
+
cloud_provider: The cloud provider to validate the region for
25
+
region: The region to validate
26
+
27
+
Returns:
28
+
None
29
+
30
+
Raises:
31
+
ValueError: If the region is not valid for the given cloud provider
32
+
"""
33
+
34
+
ifcloud_provider=="gcp"andregion.count("-") !=1:
35
+
raiseValueError(f"Invalid region for GCP: {region}. Must follow the format 'region-zonenumber'. Refer to https://neo4j.com/docs/aura/managing-instances/regions/ for valid regions.")
raiseValueError(f"Invalid region for AWS: {region}. Must follow the format 'region-zone-number'. Refer to https://neo4j.com/docs/aura/managing-instances/regions/ for valid regions.")
raiseValueError(f"Invalid region for Azure: {region}. Must follow the format 'regionzone'. Refer to https://neo4j.com/docs/aura/managing-instances/regions/ for valid regions.")
40
+
41
+
22
42
classAuraAPIClient:
23
43
"""Client for interacting with Neo4j Aura API."""
24
44
@@ -172,12 +192,17 @@ def create_instance(self, tenant_id: str, name: str, memory: int = 1, region: st
0 commit comments