All URIs are relative to http://0.0.0.0/v2
Method | HTTP request | Description |
---|---|---|
create_aws_region | POST /service_discovery/aws | Add a new AWS region |
create_consul | POST /service_discovery/consul | Add a new Consul server |
delete_aws_region | DELETE /service_discovery/aws/{id} | Delete an AWS region |
delete_consul | DELETE /service_discovery/consul/{id} | Delete a Consul server |
get_aws_region | GET /service_discovery/aws/{id} | Return an AWS region |
get_aws_regions | GET /service_discovery/aws | Return an array of all configured AWS regions |
get_consul | GET /service_discovery/consul/{id} | Return one Consul server |
get_consuls | GET /service_discovery/consul | Return an array of all configured Consul servers |
replace_aws_region | PUT /service_discovery/aws/{id} | Replace an AWS region |
replace_consul | PUT /service_discovery/consul/{id} | Replace a Consul server |
AwsRegion create_aws_region(body)
Add a new AWS region
Add a new AWS region. Credentials are not required in case Dataplane API is running in an EC2 instance with proper IAM role attached.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.AwsRegion() # AwsRegion |
try:
# Add a new AWS region
api_response = api_instance.create_aws_region(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->create_aws_region: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | AwsRegion |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Consul create_consul(body)
Add a new Consul server
Adds a new Consul server.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.Consul() # Consul |
try:
# Add a new Consul server
api_response = api_instance.create_consul(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->create_consul: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | Consul |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_aws_region(id)
Delete an AWS region
Delete an AWS region configuration by it's id.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
id = 'id_example' # str | AWS region ID
try:
# Delete an AWS region
api_instance.delete_aws_region(id)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->delete_aws_region: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | AWS region ID |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_consul(id)
Delete a Consul server
Deletes a Consul server configuration by it's id.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
id = 'id_example' # str | Consul server Index
try:
# Delete a Consul server
api_instance.delete_consul(id)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->delete_consul: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Consul server Index |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2001 get_aws_region(id)
Return an AWS region
Return one AWS Region configuration by it's id.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
id = 'id_example' # str | AWS region id
try:
# Return an AWS region
api_response = api_instance.get_aws_region(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->get_aws_region: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | AWS region id |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 get_aws_regions()
Return an array of all configured AWS regions
Return all configured AWS regions.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
try:
# Return an array of all configured AWS regions
api_response = api_instance.get_aws_regions()
pprint(api_response)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->get_aws_regions: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2003 get_consul(id)
Return one Consul server
Returns one Consul server configuration by it's id.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
id = 'id_example' # str | Consul server id
try:
# Return one Consul server
api_response = api_instance.get_consul(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->get_consul: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Consul server id |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2002 get_consuls()
Return an array of all configured Consul servers
Returns all configured Consul servers.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
try:
# Return an array of all configured Consul servers
api_response = api_instance.get_consuls()
pprint(api_response)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->get_consuls: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AwsRegion replace_aws_region(body, id)
Replace an AWS region
Replace an AWS region configuration by its id.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.AwsRegion() # AwsRegion |
id = 'id_example' # str | AWS Region ID
try:
# Replace an AWS region
api_response = api_instance.replace_aws_region(body, id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->replace_aws_region: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | AwsRegion | ||
id | str | AWS Region ID |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Consul replace_consul(body, id)
Replace a Consul server
Replaces a Consul server configuration by it's id.
from __future__ import print_function
import time
import dataplaneapi
from dataplaneapi.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = dataplaneapi.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = dataplaneapi.ServiceDiscoveryApi(dataplaneapi.ApiClient(configuration))
body = dataplaneapi.Consul() # Consul |
id = 'id_example' # str | Consul Index
try:
# Replace a Consul server
api_response = api_instance.replace_consul(body, id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ServiceDiscoveryApi->replace_consul: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | Consul | ||
id | str | Consul Index |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]