CDN Pro
获取有关部署任务的详细信息,包括操作类型、提交时间、任务执行状态以及部署失败时的描述信息。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*idString | 部署任务id。 |
参数名称 | 描述 |
---|---|
nameString | 部署任务的名称。 |
submissionTimeString | RFC 3339格式的日期,表示任务的创建时间。 |
actionsList | 部署任务所要执行的操作,可以包括加速项目和证书的部署或卸载操作。 |
actionString | 取值范围: deploy_property,remove_property,deploy_cert,remove_cert
指定操作类型,包括部署加速项目、卸载加速项目、部署证书以及卸载证书。 |
propertyIdString | 指定要部署或卸载的加速项目ID。 |
certificateIdString | 指定要部署或卸载的证书ID。 |
versionString | 指定要部署或卸载的证书或加速项目的版本。 |
targetString | 取值范围: staging,production
部署任务对应的环境。 |
finishTimeString | RFC 3339格式的日期,表示任务完成的时间。 |
statusString | 取值范围: waiting,in progress,failed,succeeded
部署任务的执行状态,包括等待中,进行中,部署失败,部署成功等状态。
|
statusDetailsString | 部署任务执行状态的描述信息。
|
apiRequestIdString | 创建部署任务时的API请求ID。 |
webhookString | 部署任务完成时要调用的webhook的ID。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
AccessDenied | This user is not allowed to perform this request. | 403 | 无操作权限。 |
InvalidDeploymentTaskId | The specified deployment task ID does not exist. | 404 | 指定的部署任务ID不存在。 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/cdn/deploymentTasks/{id}" \ -X "GET" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json"
{ "submissionTime": "2019-11-14T01:20:22Z", "actions": [ { "certificateId": "61c0dcc92ef4ea6a9ff8c09f", "action": "deploy_cert", "version": "1" } ], "target": "production", "finishTime": "2019-11-14T01:24:18Z", "status": "succeeded", "apiRequestId": "47636a8908b0f618", "statusDetails": "Task has successfully finished" }