-
Notifications
You must be signed in to change notification settings - Fork 50
REST API Region Zone Information Guide
-
Reference: [Region/Zone REST API Specification (since v0.8.5)](CB-Spider-User-Interface)
-
Reference: [AdminWeb Region/Zone Usage Guide](AdminWeb-Region-Zone-Information-Guide)
-
APIs to get Region/Zone information using Driver Name and Credential Name before connection configuration
- ※ Connection Configuration (Connection Config): A connection name (Connection ID) composed of DriverName + CredentialName + RegionName
-
(Preparation) Check registered cloud driver and credential information (obtain
DriverName,CredentialName)curl -sX GET http://localhost:1024/spider/driver |json_pp;curl -sX GET http://localhost:1024/spider/credential |json_pp;
-
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp -
output:
{ "regionzone" : [ { "DisplayName" : "ap-northeast-2", "KeyValueList" : [], "Name" : "ap-northeast-2", "ZoneList" : [ { "DisplayName" : "ap-northeast-2a", "KeyValueList" : null, "Name" : "ap-northeast-2a", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2b", "KeyValueList" : null, "Name" : "ap-northeast-2b", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2c", "KeyValueList" : null, "Name" : "ap-northeast-2c", "Status" : "Available" }, --More--
-
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/ap-northeast-2?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp -
output:
{ "DisplayName" : "ap-northeast-2", "KeyValueList" : [], "Name" : "ap-northeast-2", "ZoneList" : [ { "DisplayName" : "ap-northeast-2a", "KeyValueList" : null, "Name" : "ap-northeast-2a", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2b", "KeyValueList" : null, "Name" : "ap-northeast-2b", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2c", "KeyValueList" : null, "Name" : "ap-northeast-2c", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2d", "KeyValueList" : null, --More--
-
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp -
output:
{ "Regions" : [ { "Endpoint" : "ec2.ap-south-2.amazonaws.com", "OptInStatus" : "not-opted-in", "RegionName" : "ap-south-2" }, { "Endpoint" : "ec2.ap-south-1.amazonaws.com", "OptInStatus" : "opt-in-not-required", "RegionName" : "ap-south-1" }, { "Endpoint" : "ec2.eu-south-1.amazonaws.com", "OptInStatus" : "opted-in", "RegionName" : "eu-south-1" }, { "Endpoint" : "ec2.eu-south-2.amazonaws.com", "OptInStatus" : "not-opted-in", "RegionName" : "eu-south-2" }, { "Endpoint" : "ec2.me-central-1.amazonaws.com", "OptInStatus" : "opted-in", "RegionName" : "me-central-1" --More--
- APIs to get Region/Zeon information using the connection name (ConnectionName)
curl -sX GET http://localhost:1024/spider/connectionconfig |json_pp;
-
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=aws-config01" | json_pp -
output:
{ "regionzone" : [ { "DisplayName" : "ap-northeast-2", "KeyValueList" : [], "Name" : "ap-northeast-2", "ZoneList" : [ { "DisplayName" : "ap-northeast-2a", "KeyValueList" : null, "Name" : "ap-northeast-2a", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2b", "KeyValueList" : null, "Name" : "ap-northeast-2b", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2c", "KeyValueList" : null, "Name" : "ap-northeast-2c", "Status" : "Available" }, { --More--
-
curl -sX GET "http://localhost:1024/spider/regionzone/ap-northeast-2?ConnectionName=aws-config01" | json_pp -
output:
{ "DisplayName" : "ap-northeast-2", "KeyValueList" : [], "Name" : "ap-northeast-2", "ZoneList" : [ { "DisplayName" : "ap-northeast-2a", "KeyValueList" : null, "Name" : "ap-northeast-2a", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2b", "KeyValueList" : null, "Name" : "ap-northeast-2b", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2c", "KeyValueList" : null, "Name" : "ap-northeast-2c", "Status" : "Available" }, { "DisplayName" : "ap-northeast-2d", "KeyValueList" : null, --More--
-
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=aws-config01" | json_pp -
output:
{ "Regions" : [ { "Endpoint" : "ec2.ap-south-2.amazonaws.com", "OptInStatus" : "not-opted-in", "RegionName" : "ap-south-2" }, { "Endpoint" : "ec2.ap-south-1.amazonaws.com", "OptInStatus" : "opt-in-not-required", "RegionName" : "ap-south-1" }, { "Endpoint" : "ec2.eu-south-1.amazonaws.com", "OptInStatus" : "opted-in", "RegionName" : "eu-south-1" }, { "Endpoint" : "ec2.eu-south-2.amazonaws.com", "OptInStatus" : "not-opted-in", "RegionName" : "eu-south-2" }, { "Endpoint" : "ec2.me-central-1.amazonaws.com", "OptInStatus" : "opted-in", "RegionName" : "me-central-1" --More--
-
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=aws-config01" | json_pp -
output:
[ { "AvailabilityZones" : [ { "GroupName" : "ap-south-1", "Messages" : null, "NetworkBorderGroup" : "ap-south-1", "OptInStatus" : "opt-in-not-required", "ParentZoneId" : null, "ParentZoneName" : null, "RegionName" : "ap-south-1", "State" : "available", "ZoneId" : "aps1-az1", "ZoneName" : "ap-south-1a", "ZoneType" : "availability-zone" }, { "GroupName" : "ap-south-1", "Messages" : null, "NetworkBorderGroup" : "ap-south-1", "OptInStatus" : "opt-in-not-required", "ParentZoneId" : null, "ParentZoneName" : null, "RegionName" : "ap-south-1", "State" : "available", "ZoneId" : "aps1-az3", --More--
-
For the RegionZopnePreConfig API that uses only DriverName and CredentialName before connection configuration
-
Due to CSP characteristics, there are CSPs for which Region information is absolutely required
- AWS, Alibaba: It is mandatory to set the target Region for CSP API execution requests
- Tencent: The Driver verifies whether the Zone setting is configured before Connection setup (not required in the Tencent API, but respected for driver stability)
-
-
Currently, for AWS, Alibaba, and Tencent, the default Region/Zone is set to each CSP’s Seoul Region and the first Zone
-
You can change it to any desired Region/Zone if needed
-
References,
-
[Mock]
- Before connection configuration
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=mock-driver-01&CredentialName=mock-credential-01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/neptune?DriverName=mock-driver-01&CredentialName=mock-credential-01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=mock-driver-01&CredentialName=mock-credential-01" | json_pp
- After connection configuration
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=mock-config-01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/neptune?ConnectionName=mock-config-01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=mock-config-01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=mock-config-01" | json_pp
[AWS] (cloudos_meta.yaml: using default Region/Zone)
- Before connection configuration
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/ap-northeast-2?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=aws-driver01&CredentialName=aws-credential01" | json_pp
- After connection configuration
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=aws-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/ap-northeast-2?ConnectionName=aws-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=aws-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=aws-config01" | json_pp
[Azure]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=azure-driver01&CredentialName=azure-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/australiacentral?DriverName=azure-driver01&CredentialName=azure-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=azure-driver01&CredentialName=azure-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=azure-northeu-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/australiacentral?ConnectionName=azure-northeu-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=azure-northeu-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=azure-northeu-config" | json_pp
[GCP]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=gcp-driver01&CredentialName=gcp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/me-central1?DriverName=gcp-driver01&CredentialName=gcp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=gcp-driver01&CredentialName=gcp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=gcp-iowa-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/me-central1?ConnectionName=gcp-iowa-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=gcp-iowa-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=gcp-iowa-config" | json_pp
[Alibaba] (cloudos_meta.yaml: using default Region/Zone)
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=alibaba-driver01&CredentialName=alibaba-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/cn-hangzhou?DriverName=alibaba-driver01&CredentialName=alibaba-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=alibaba-driver01&CredentialName=alibaba-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=alibaba-beijing-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/cn-hangzhou?ConnectionName=alibaba-beijing-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=alibaba-beijing-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=alibaba-beijing-config" | json_pp
[Tencent] (cloudos_meta.yaml: using default Region/Zone)
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=tencent-driver01&CredentialName=tencent-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/sa-saopaulo?DriverName=tencent-driver01&CredentialName=tencent-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=tencent-driver01&CredentialName=tencent-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=tencent-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/sa-saopaulo?ConnectionName=tencent-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=tencent-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=tencent-seoul1-config" | json_pp
[OpenStack]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=openstack-driver01&CredentialName=openstack-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/RegionOne?DriverName=openstack-driver01&CredentialName=openstack-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=openstack-driver01&CredentialName=openstack-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=openstack-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/RegionOne?ConnectionName=openstack-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=openstack-config01" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=openstack-config01" | json_pp
[ncp]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=ncp-driver01&CredentialName=ncp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/SGN?DriverName=ncp-driver01&CredentialName=ncp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=ncp-driver01&CredentialName=ncp-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=ncp-korea1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/SGN?ConnectionName=ncp-korea1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=ncp-korea1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=ncp-korea1-config" | json_pp
[NHN]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=nhn-driver01&CredentialName=nhn-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/JP1?DriverName=nhn-driver01&CredentialName=nhn-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=nhn-driver01&CredentialName=nhn-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=nhn-korea-pangyo-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/JP1?ConnectionName=nhn-korea-pangyo-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=nhn-korea-pangyo-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=nhn-korea-pangyo-config" | json_pp
[KT]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=kt-driver01&CredentialName=kt-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/KR1?DriverName=kt-driver01&CredentialName=kt-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=kt-driver01&CredentialName=kt-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=kt-mokdong1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/KR1?ConnectionName=kt-mokdong1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=kt-mokdong1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=kt-mokdong1-config" | json_pp
[KTCLASSIC]
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone?DriverName=ktclassic-driver01&CredentialName=ktclassic-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/regionzone/KOR-Seoul?DriverName=ktclassic-driver01&CredentialName=ktclassic-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/preconfig/orgregion?DriverName=ktclassic-driver01&CredentialName=ktclassic-credential01" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone?ConnectionName=ktclassic-korea-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/regionzone/KOR-Seoul?ConnectionName=ktclassic-korea-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgregion?ConnectionName=ktclassic-korea-seoul1-config" | json_pp
curl -sX GET "http://localhost:1024/spider/orgzone?ConnectionName=ktclassic-korea-seoul1-config" | json_pp
-
Install & Start Guide
-
Features & Usage
-
- AdminWeb Tool Guide
- CLI Tool Guide
- REST API Guide
- NLI Guide
-
Design
-
Developer Guide
-
Cloud Driver Developer Guide
- Cloud Driver Developer Guide-WIP
- VM SSH Key Development Guide-WIP
- VM User Development Guide
- What is the CSP SDK API Version of drivers
- Region Zone Info and Driver API
- (StartVM TerminateVM) API Call Counts and Waiting
- StartVM and TerminateVM Main Flow of drivers
- VM Root Disk Configuration Guide
- Security Group Rules and Driver API
- Network Load Balancer and Driver API
- VM Snapshot, MyImage and Disk Overview
- Kubernetes and Driver API(PMKS, K8S)
- Tag and Cloud Driver API
- AnyCall API Extension Guide
-
Test Reports
- v0.2.8-for-espresso-release
- v0.3.0-espresso-release
- Azure:Terminating VM
- cb-user@VM: ssh login, sudo run
- v0.3.14 test for SG Source
- v0.4.0-cafemocha-release
- Test via REST API Gateway
- Test Reports of v0.4.11 (IID2 initial Version)
- Test Reports of v0.4.12 (Register & Unregister existing Resources)
- Test Reports for v0.6.0 Release
- How to ...
- How to Use AWS S3 with Credentials
- How to Use Alibaba ECS i1.* Instance Types
- How to provision GPU VMs
- How to Resolve the 'Failed to Connect to Database' Error
- How to test CB Spider with Mock Driver
- How to install CB Spider on WSL2 under 공유기/사설망
- How to install CB Spider on macOS
- How to run CB Spider Container on macOS
- How to install OpenStack on a VM for CB Spider Testing
- How to get Azure available Regions
- How to profile memory usage in Golang
- Deprecated:How to install protoc and plugins
- [For Cloud-Migrator]