Schedule Instance Related Interface
Create a Scheduling Instance
- Description
Create a scheduling instance to bind the scheduled IP.
Two white lists need to be enabled: AdasAutoSchedule (high defense automation scheduling) and RouteOpenSourceAddress (custom routing white list).
Creating a scheduling instance requires identity verification. If you do not pass the identity verification, you can go to the identity verification under the security authentication in Baidu Open Cloud Console for authentication.
-
Request syntax
POST /v{version}/schedule?clientToken={clientToken} HTTP/1.1 Host: adas.baidubce.com Authorization: authorization string
- Request header
There are no other special headers except the public headers.
- Request parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
clientToken | String | Yes | Query parameter | Idempotent Token |
- Response header fields
There are no other special headers except the public headers.
- Response parameter
Parameter name | Type | Description |
---|---|---|
scheduleId | String | Created scheduling instance id |
Request example
POST /v1/schedule?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
HOST adas.baidubce.com
Authorization bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"scheduleId":"sche-12345678"
}
Configure a Scheduling Instance
- Description
Configuration can be performed only when the scheduling instance is normal, that is, the status of the scheduling instance must be normal.
You need to specify scheduleIp, Region, healthCheckPort, where region can only be a public cloud region, and healthCheckPort is a TCP port opened by the backend machine.
-
Request syntax
PUT /v{version}/schedule/{scheduleId}?action={action}&clientToken={clientToken} HTTP/1.1 Host: adas.baidubce.com Authorization: authorization string
{ "scheduleIp": "182.61.1.1", "region": "bj", "healthCheckPort": 80,
} - Request header
There are no other special headers except the public headers.
- Request parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
scheduleId | String | Yes | Query parameter | Scheduling instance ID |
action | String | Yes | Query parameter | The action performed on the instance. The value of this parameter is update in this interface. |
clientToken | String | Yes | Query parameter | Idempotent Token |
scheduleIp | String | Yes | RequestBody parameter | Configure the scheduling instance IP: eip |
region | String | Yes | RequestBody parameter | Region to which the scheduling instance IP belongs |
healthCheckPort | String | Yes | RequestBody parameter | Port of the backend used for health check. |
- Response status code
Return 200 on success, see Error Code when return error.
- Response header fields
There are no other special headers except the public headers.
- Response parameter
No special return parameters
Request example
PUT /v1/schedule/sche-1234abcd?action=update&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
HOST adas.baidubce.com
Authorization bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"scheduleIp": "182.61.1.1",
"region": "bj",
"healthCheckPort": 80,
}
Response example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
Query the List of Scheduling Instances
- Description
You can specify scheduleIp, region, status, and query the list of scheduling instances with specified conditions.
You can query the scheduling instance of the specified region according to the region field. Region is bj, gz, su, hk02, hkg and fsh. You can query the list of BGP AdasAutoSchedule instances in the specified region.
You can query the scheduling instances in different scheduling states according to the status field.
-
Request structure
GET /v{version}/schedule?scheduleIp={scheduleIp}®ion={region}&clientToken={clientToken} HTTP/1.1 Host: adas.baidubce.com Authorization: authorization string
- Request header
There are no other special headers except the public headers.
- Request parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
scheduleIp | String | No | Query parameter | Scheduling instance IP to query is dotted decimal |
region | String | No | Query parameter | Region to which the scheduling instance to query belongs |
status | String | No | Query parameter | Status of the scheduling instance to query |
marker | String | No | Query parameter | The starting location of query for batch acquisition of lists, and is one string generated by the system. |
maxKeys | int | No | Query parameter | Maximum number contained in each page, generally not exceeding 1000. The default value is 1000. |
clientToken | String | Yes | Query parameter | Idempotent Token |
- Response status code
Return 200 on success, see Error Code when return error
- Response header fields
There are no other special headers except the public headers.
- Response parameter
Parameter name | Type | Description |
---|---|---|
scheduleList | list<ScheduleInstanceModel> | Scheduling instance list |
marker | String | Mark the starting position of the query. The item does not exist if the result list is empty |
isTruncated | boolean | True means there are additional data in the following pages and false means the current page is the last page. |
nextMarker | String | The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false. |
maxKeys | int | Maximum number contained in each page. |
Request example
GET /v1/schedule?region=bj&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
HOST adas.baidubce.com
Authorization bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"nextMarker": "sche-62a7vb3m",
"marker": "sche-1234abcd",
"maxKeys": 1000,
"isTruncated": true,
"scheduleList": [
{
'scheduleId': 'sche-1234abcd',
'scheduleIp': '180.76.1.1',
'region': 'bj',
'scheduleBandwidthInGbps': 5,
'cname': '1234abcd.baiduads.com',
'status': "normal",
'rsIp': '180.76.1.1',
'healthCheckPort': 80,
'adasBgpIp': '180.76.198.100',
'adasId': 'adas-0343ebb9',
'updateTime': "2018-04-23 14:14:16",
'scheduleStartTime': "2018-04-23 14:14:16",
},
...
]
}
Query the Scheduling Instance Details
- Description
Specify the scheduling instance ID to query the scheduling instance details.
-
Request syntax
GET /v{version}/schedule/{scheduleId}?clientToken={clientToken} HTTP/1.1 Host: adas.baidubce.com Authorization: authorization string
- Request header
There are no other special headers except the public headers.
- Request parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
scheduleId | String | Yes | Query parameter | Scheduling instance ID |
clientToken | String | Yes | Query parameter | Idempotent Token |
- Response status code
Return 200 on success, see Error Code when return error.
- Response header fields
There are no other special headers except the public headers.
- Response parameter
Parameter name | Type | Description |
---|---|---|
schedule | ScheduleInstanceModel | Scheduling instance information |
Request example
GET /v1/schedule/{sche-1234abcd}?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
HOST adas.baidubce.com
Authorization bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"schedule": {
'scheduleId': 'sche-1234abcd',
'scheduleIp': '180.76.1.1',
'region': 'bj',
'scheduleBandwidthInGbps': "5",
'cname': '1234abcd.baiduads.com',
'status': "normal",
'healthCheckPort': "80",
'adasBgpIp': '180.76.198.100',
'adasId': 'adas-0343ebb9',
'updateTime': "2018-04-23 14:14:16",
'scheduleStartTime': "2018-04-23 14:14:16",
}
}
Delete Scheduling Instance
- Description
Delete the scheduling instance
-
Request syntax
DELETE /v{version}/schedule/{scheduleId}?clientToken={clientToken} HTTP/1.1 Host: adas.baidubce.com Authorization: authorization string
- Request header
There are no other special headers except the public headers.
- Request parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
scheduleId | String | Yes | Query parameter | Scheduling instance ID |
clientToken | String | Yes | Query parameter | Idempotent Token |
- Response status code
Return 200 on success, see Error Code when return error.
- Response header fields
There are no other special headers except the public headers.
- Response parameter
No special return parameters
Request example
DELETE /v1/schedule/sche-1234abcd?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
HOST adas.baidubce.com
Authorization bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS