POST
/api/v1/rds/cluster/{Cluster_id}/instance/{instance_id}/failover/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{Cluster_id}/instance/{instance_id}/failover/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "name": "E2E-DBaaS-26321-2331", "group": "Default", "public_ip_required": true, "template_id": 21}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{Cluster_id}/instance/{instance_id}/failover/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "name": "E2E-DBaaS-26321-2331", "group": "Default", "public_ip_required": True, "template_id": 21, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{Cluster_id}/instance/{instance_id}/failover/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "name": "E2E-DBaaS-26321-2331", "group": "Default", "public_ip_required": true, "template_id": 21 }),});console.log(await response.json());Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Cluster_id
required
integer
Cluster Id
instance_id
required
integer
Example
17916Unique identifier of the DBaaS instance
Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID Find your project id here
location
required
string
Deployment region for the resource. Accepted values: Delhi, Chennai.
Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Name of the DBaaS instance to be promoted during failover
string
group
required
Instance group name
string
public_ip_required
required
Whether a public IP should be assigned after failover
boolean
template_id
required
Template ID to be used during failover
integer
Example
{ "name": "E2E-DBaaS-26321-2331", "group": "Default", "public_ip_required": true, "template_id": 21}Responses
Section titled “Responses”Failover operation initiated successfully
Media typeapplication/json
object
code
required
integer
data
required
object
message
required
string
cluster_id
required
integer
instance_id
required
integer
errors
required
object
message
required
string
Example
{ "code": 200, "data": { "message": "Failover initiated successfully", "cluster_id": 8475, "instance_id": 17916 }, "errors": {}, "message": "Failover initiated successfully"}