云服务器内容精选

  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 租户token 表3 请求Body参数 参数 是否必选 参数类型 描述 access_services 是 Array of AccessServiceInfo objects 接入服务授权信息列表。 表4 AccessServiceInfo 参数 是否必选 参数类型 描述 name 是 String 接入服务名称。最大长度为20个字符。 description 否 String 接入服务描述。最大长度为500个字符。 grant 否 Boolean 是否授权。值为true或false。
  • 响应参数 状态码: 200 表5 响应Header参数 参数 参数类型 描述 X-request-id String 请求ID,定位辅助信息。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 common_error_code String CBC公共错误码。 solution_msg String 解决方案描述。
  • 请求示例 POST https://{endpoint}/v1/{project_id}/access-service { "access_services" : [ { "name" : "DLI", "description" : "Data Lake Insight", "grant" : true }, { "name" : "DWS", "description" : "Data Warehouse Service", "grant" : true }, { "name" : "MA", "description" : "ModelArts", "grant" : true } ] }
  • 响应示例 状态码: 400 Bad Request { "error_code" : "common.01000001", "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException" } 状态码: 401 Unauthorized { "error_code": 'APIG.1002', "error_msg": 'Incorrect token or token resolution failed' } 状态码: 403 Forbidden { "error" : { "code" : "403", "message" : "X-Auth-Token is invalid in the request", "error_code" : null, "error_msg" : null, "title" : "Forbidden" }, "error_code" : "403", "error_msg" : "X-Auth-Token is invalid in the request", "title" : "Forbidden" } 状态码: 404 Not Found { "error_code" : "common.01000001", "error_msg" : "response status exception, code: 404" } 状态码: 408 Request Timeout { "error_code" : "common.00000408", "error_msg" : "timeout exception occurred" } 状态码: 500 Internal Server Error { "error_code" : "common.00000500", "error_msg" : "internal error" }