更新时间:2025-03-31 GMT+08:00

修改企业项目

功能介绍

修改企业项目。当前仅支持修改名称和描述。

调用方法

请参见如何调用API。

URI

PUT /v1.0/enterprise-projects/{enterprise_project_id}

表1 路径参数

参数

是否必选

参数类型

描述

enterprise_project_id

String

企业项目ID,不能为0。

可以通过查询企业项目列表接口获取。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。说明:由于EPS是全局服务,因此调用IAM服务获取用户Token接口时需要注意作用域即scope字段应该设置为domain。响应消息头中X-Subject-Token的值即为用户Token。

X-Security-Token

String

如果正在使用临时安全凭据,则此header是必需的,该值是临时安全凭据的安全令牌(会话令牌)。

表3 请求Body参数

参数

是否必选

参数类型

描述

name

String

只能由中文字符、英文字母(a~zA~Z)、数字(0~9)、下划线(_)、中划线(-)组成,且长度为[1-255]个字符。名称不能为大小写混合的default,且在租户账号内唯一。

description

String

最大长度512个字符。

type

String

企业项目类型

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

enterprise_project

EpDetail object

企业项目。

表5 EpDetail

参数

参数类型

描述

id

String

企业项目ID

name

String

企业项目名称

description

String

企业项目描述

status

Integer

企业项目状态。1启用,2停用

created_at

String

创建时间,格式为UTC格式。如:2018-05-18T06:49:06Z。

updated_at

String

修改时间,格式为UTC格式。如:2018-05-28T02:21:36Z。

type

String

项目类型。prod-商用项目;poc-测试项目

状态码:400

表6 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表7 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:401

表8 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表9 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:402

表10 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表11 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:403

表12 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

error_code

String

错误码

error_msg

String

错误信息

encoded_authorization_message

String

编码 (加密) 后的详细拒绝原因

details

Array of RespErrorMessage objects

PDP5错误信息及依赖云服务错误信息

表13 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:404

表14 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表15 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:405

表16 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表17 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:406

表18 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表19 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:407

表20 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表21 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:408

表22 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表23 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:409

表24 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表25 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:410

表26 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表27 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:500

表28 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表29 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:501

表30 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表31 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:502

表32 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表33 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:503

表34 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表35 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

状态码:504

表36 响应Body参数

参数

参数类型

描述

error

RespErrorMessage object

错误请求信息

表37 RespErrorMessage

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误信息

请求示例

修改企业项目

PUT https://{Endpoint}/v1.0/enterprise-projects/{enterprise_project_id}

{
  "name" : "enterprise_project1",
  "description" : "描述"
}

响应示例

状态码:200

OK

{
  "enterprise_project" : {
    "id" : "5aa119a8-d25b-45a7-8d1b-88e127885635",
    "name" : "enterprise_project1",
    "description" : "描述",
    "status" : 1,
    "type" : "prod",
    "created_at" : "2016-03-28T00:00:00Z",
    "updated_at" : "2016-03-28T00:00:00Z"
  }
}

状态码

状态码

描述

200

OK

400

Bad Request

401

Unauthorized

402

Payment Required

403

Forbidden

404

Not Found

405

Method Not Allowed

406

Not Acceptable

407

Proxy Authentication Required

408

Request Timeout

409

Conflict

410

Gone

500

Internal Server Error

501

Not Implemented

502

Bad Gateway

503

Service Unavailable

504

Gateway Timeout

错误码

请参见错误码