
# 修改流水线信息 - UpdatePipelineInfo
#### 功能介绍
修改流水线信息
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-pipeline/pipeline_03_0006.html)。
#### URI
PUT /v5/{project_id}/api/pipelines/{pipeline_id}
表1路径参数 
| 参数          | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|:---|
| project_id  | 是    | String | **参数解释**： 项目ID，获取方式请参见[获取项目ID](https://support.huaweicloud.com/api-pipeline/pipeline_03_0036.html)。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。                               |
| pipeline_id | 是    | String | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口获取，其中pipelines.pipelineId即为流水线ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。 |
   
表2Query参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|:---|:---|:---|:---|
| component_id | 否    | String | **参数解释**： 流水线微服务ID。可以通过[查询微服务列表](https://support.huaweicloud.com/api-pipeline/ListMicroservice.html)接口获取，其中data.id即为微服务ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，仅由数字和字母组成。 **默认取值**： 不涉及。 |
   
#### 请求参数
表3请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | **参数解释**： 用户Token。通过调用[IAM服务获取用户Token接口](https://support.huaweicloud.com/api-iam/iam_30_0003.html)获取（响应消息头中X-Subject-Token的值）。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。 |
   
表4请求Body参数 
| 参数                  | 是否必选 | 参数类型                                                                                   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|:---|
| name                | 是    | String                                                                                 | **参数解释**： 流水线名称。 **约束限制**： 不涉及。 **取值范围**： 仅包含中文、大小写英文字母、数字、'-'和'_'，且长度为\[1,128\]个字符。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                    |
| description         | 否    | String                                                                                 | **参数解释**： 流水线描述。 **约束限制**： 不涉及。 **取值范围**： 不超过1024字符。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                    |
| is_publish          | 是    | Boolean                                                                                | **参数解释**： 是否为变更流水线。 **约束限制**： 不涉及。 **取值范围**： - true：变更流水线。   - false：非变更流水线。    **默认取值**： 不涉及。 |
| sources             | 否    | Array of [CodeSource] objects                 | **参数解释**： 流水线源信息。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                         |
| variables           | 否    | Array of [CustomVariable] objects         | **参数解释**： 流水线自定义全局变量列表。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                   |
| schedules           | 否    | Array of [PipelineSchedule] objects     | **参数解释**： 流水线定时执行配置列表。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                    |
| triggers            | 否    | Array of [PipelineTrigger] objects       | **参数解释**： 流水线代码事件触发配置。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                    |
| manifest_version    | 否    | String                                                                                 | **参数解释**： 流水线结构定义版本。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 3.0。                                                                                                                                                                                                                                                                                                      |
| definition          | 是    | String                                                                                 | **参数解释**： 流水线结构定义JSON。该字段结构复杂，建议使用页面编辑流水线后，从[查询流水线详情](https://support.huaweicloud.com/api-pipeline/ShowPipelineDetail.html)接口获取。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                          |
| project_name        | 否    | String                                                                                 | **参数解释**： 项目名称。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                           |
| group_id            | 否    | String                                                                                 | **参数解释**： 流水线组ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，仅由数字和字母组成。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                             |
| id                  | 否    | String                                                                                 | **参数解释**： 复制场景使用，为流水线组ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，仅由数字和字母组成。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                     |
| concurrency_control | 否    | [PipelineConcurrencyMgmt] object | **参数解释**： 流水线并发控制信息。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                      |
   
 表5CodeSource 
| 参数     | 是否必选 | 参数类型                                                 | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|:---|
| type   | 否    | String                                               | **参数解释**： 流水线源类型。 **约束限制**： 不涉及。 **取值范围**： - code：代码仓。   - artifact：制品仓。    **默认取值**： 不涉及。 |
| params | 否    | [params] object | **参数解释**： 流水线源参数，包含流水线源的详细信息。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                         |
   
 表6params 
| 参数             | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|:---|:---|:---|:---|
| git_type       | 否    | String | **参数解释**： 代码仓类型。 **约束限制**： 不涉及。 **取值范围**： - codehub。   - gitee   - github   - gitcode   - gitlab   - git。    **默认取值**： 不涉及。 |
| codehub_id     | 否    | String | **参数解释**： CodeArts Repo代码仓ID。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| endpoint_id    | 否    | String | **参数解释**： 代码源扩展点ID。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| default_branch | 否    | String | **参数解释**： 默认分支。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| git_url        | 否    | String | **参数解释**： Git仓库https地址，例如https://example.com/CloudPipelinezycs00001/2000.git。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ssh_git_url    | 否    | String | **参数解释**： ssh_git链接地址，例如https://example.com/CloudPipelinezycs00001/2000.git。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| web_url        | 否    | String | **参数解释**： 网页url。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| repo_name      | 否    | String | **参数解释**： 流水线源名称。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| alias          | 否    | String | **参数解释**： 代码仓别名。 **约束限制**： 不涉及。 **取值范围**： 仅支持输入大小写英文字母、数字、"_"，至多128个字符。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
   
 表7CustomVariable 
| 参数           | 是否必选 | 参数类型             | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|:---|:---|:---|:---|
| pipeline_id  | 否    | String           | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口，其中pipelines.pipelineId即为流水线ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                           |
| name         | 否    | String           | **参数解释**： 自定义参数名称。 **约束限制**： 不涉及。 **取值范围**： 仅支持大小写英文字母、数字、"_"，不超过128个字符。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| sequence     | 否    | Integer          | **参数解释**： 参数序号，从1开始。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| type         | 否    | String           | **参数解释**： 自定义参数类型。 **约束限制**： 不涉及。 **取值范围**： - autoIncrement：自增长参数。   - enum：枚举参数。   - string：字符串参数。    **默认取值**： 不涉及。 |
| value        | 否    | String           | **参数解释**： 自定义参数默认值。 **约束限制**： 不涉及。 **取值范围**： 最长8192字符。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| is_secret    | 否    | Boolean          | **参数解释**： 是否私密参数。 **约束限制**： 不涉及。 **取值范围**： - true：是私密参数。   - false：不是私密参数。    **默认取值**： false。                                                                                                                                                            |
| description  | 否    | String           | **参数解释**： 参数描述。 **约束限制**： 不涉及。 **取值范围**： 最长1024字符。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| is_runtime   | 否    | Boolean          | **参数解释**： 是否运行时设置参数。 **约束限制**： 不涉及。 **取值范围**： - true：是运行时设置参数。   - false：不是运行时设置参数。    **默认取值**： false。                                                                                                                                                   |
| limits       | 否    | Array of objects | **参数解释**： 枚举值列表。 **约束限制**： 不涉及。 **取值范围**： 每个枚举值不超过1024字符。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| is_reset     | 否    | Boolean          | **参数解释**： 是否重置。自增长参数被编辑，则使用编辑后的值，否则进行末位数字递增。 **约束限制**： 不涉及。 **取值范围**： - true：使用编辑后的参数值。   - false：使用自增长参数。    **默认取值**： false。                                                                                                                            |
| latest_value | 否    | String           | **参数解释**： 最近一次运行的参数值。 **约束限制**： 不涉及。 **取值范围**： 最长8192字符。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
   
 表8PipelineSchedule 
| 参数           | 是否必选 | 参数类型              | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|:---|:---|:---|:---|
| uuid         | 否    | String            | **参数解释**： 定时任务ID。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| type         | 否    | String            | **参数解释**： 任务类型。 **约束限制**： 不涉及。 **取值范围**： - periodic：周期触发。   - fixed：时间间隔内周期触发。    **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| name         | 否    | String            | **参数解释**： 任务名称。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| enable       | 否    | String            | **参数解释**： 是否启用。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| days_of_week | 否    | Array of integers | **参数解释**： 一周内具体执行日。周日至周六对应1-7。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| time_zone    | 否    | String            | **参数解释**： 时区。 **约束限制**： 不涉及。 **取值范围**： - "China Standard Time"。   - "GMT Standard Time"。   - "South Africa Standard Time"。   - "Russian Standard Time"。   - "SE Asia Standard Time"。   - "Singapore Standard Time"。   - "Pacific SA Standard Time"。   - "E. South America Standard Time"。   - "Central Standard Time (Mexico)"。   - "Egypt Standard Time"。   - "Saudi Arabia Standard Time"。    **默认取值**： 不涉及。 |
   
 表9PipelineTrigger 
| 参数             | 是否必选 | 参数类型                                                                 | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|:---|
| pipeline_id    | 否    | String                                                               | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口，其中pipelines.pipelineId即为流水线ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| git_url        | 否    | String                                                               | **参数解释**： 代码仓git链接。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| git_type       | 否    | String                                                               | **参数解释**： git代码仓类型。 **约束限制**： 不涉及。 **取值范围**： - codehub。   - gitee   - github   - gitcode   - gitlab   - git。    **默认取值**： 不涉及。 |
| is_auto_commit | 否    | Boolean                                                              | **参数解释**： 是否自动提交。gitee仓库特有，webhook触发流水线后，自动添加评论。 **约束限制**： 不涉及。 **取值范围**： - true：是自动提交。   - false：不是自动提交。    **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| events         | 否    | Array of [CodeEvent] objects | **参数解释**： 触发事件列表。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| hook_id        | 否    | String                                                               | **参数解释**： 系统生成的回调ID。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| repo_id        | 否    | String                                                               | **参数解释**： Repo仓库ID。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| endpoint_id    | 否    | String                                                               | **参数解释**： 代码源扩展点ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符，由数字和字母组成。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| callback_url   | 否    | String                                                               | **参数解释**： 回调链接，注册Webhook时生成。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| security_token | 否    | String                                                               | **参数解释**： 用户token，注册Webhook时生成。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
   
 表10CodeEvent 
| 参数     | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|:---|:---|:---|:---|
| type   | 否    | String  | **参数解释**： 事件类型。 **约束限制**： 不涉及。 **取值范围**： - merge_request：MR 触发。   - push：代码Push触发。   - tag_push：标签触发。   - issue：Gitee仓库ISSUE触发。   - note：Gitee仓库评论触发。    **默认取值**： 不涉及。 |
| enable | 否    | Boolean | **参数解释**： 代码仓是否可用。 **约束限制**： 不涉及。 **取值范围**： - true：代码仓可用。   - false：代码仓不可用。    **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
   
 表11PipelineConcurrencyMgmt 
| 参数                 | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|:---|:---|:---|:---|
| pipeline_id        | 否    | String  | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口，其中pipelines.pipelineId即为流水线ID。 **约束限制**： 不涉及。 **取值范围**： 32位字符串。 **默认取值**： 不涉及。                                                                                                                                                                                         |
| concurrency_number | 否    | Integer | **参数解释**： 流水线并发个数。流水线并发个数，最大并发受套餐和购买并发数限制。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                 |
| exceed_action      | 否    | String  | **参数解释**： 超出并发数时排队策略。 **约束限制**： 不涉及。 **取值范围**： - ABORT：忽略不执行。   - QUEUE：排队等待。    **默认取值**： 不涉及。 |
| create_time        | 否    | Long    | **参数解释**： 创建时间。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                            |
| update_time        | 否    | Long    | **参数解释**： 更新时间。 **约束限制**： 不涉及。 **取值范围**： 不涉及。 **默认取值**： 不涉及。                                                                                                                                                                                                                                                                                                            |
| enable             | 否    | Boolean | **参数解释**： 是否启用。 **约束限制**： 不涉及。 **取值范围**： - true：启用。   - false：未启用。    **默认取值**： 不涉及。            |
   
#### 响应参数
**状态码：200**
表12响应Body参数 
| 参数          | 参数类型   | 描述                                                                                                                                                                                                                                                                           |
|:---|:---|:---|
| pipeline_id | String | **参数解释**： 流水线ID，可以通过[查询流水线列表](https://support.huaweicloud.com/api-pipeline/ListPipelines.html)接口，其中pipelines.pipelineId即为流水线ID。 **取值范围**： 32位字符，仅由数字和字母组成。 |
   
#### 请求示例
```
PUT https://{endpoint}/v5/d80a8a6530324b7bac972cbb8a9f28ec/api/pipelines/dab5232b7b354b6db37e695690218c9b
{
  "id" : "c0473f77481c4a12b254012876df71b6",
  "name" : "新建流水线-20240202101359",
  "description" : null,
  "manifest_version" : 3.0,
  "is_publish" : false,
  "sources" : [ ],
  "variables" : [ ],
  "schedules" : null,
  "triggers" : [ ],
  "project_name" : null,
  "group_id" : null,
  "concurrency_control" : {
    "pipeline_id" : null,
    "concurrency_number" : 5,
    "exceed_action" : "ABORT",
    "create_time" : null,
    "update_time" : null,
    "enable" : false
  },
  "definition" : "{\"stages\":[{\"name\":\"阶段_1\",\"sequence\":\"0\",\"jobs\":[{\"id\":\"\",\"stage_id\":1706840051315,\"identifier\":\"JOB_HwdAJ\",\"name\":\"Subpipeline\",\"depends_on\":[],\"timeout\":\"\",\"timeout_unit\":\"\",\"steps\":[{\"name\":\"Subpipeline\",\"task\":\"official_devcloud_subPipeline\",\"sequence\":0,\"inputs\":[{\"key\":\"SYSTEM_DEVCLOUD_SUBPIPELINE_TRIGGER_ID\",\"value\":\"dab5232b7b354b6db37e695690218c9b\"},{\"key\":\"_OFFICIAL_DEVCLOUD_JOB_NAME_\",\"value\":\"新建流水线-空\"},{\"key\":\"_OFFICIAL_DEVCLOUD_JOB_VERSION_\",\"value\":\"3.0\"}],\"business_type\":\"Normal\",\"runtime_attribution\":\"agent\",\"identifier\":\"1706840079615af0c7bda-8885-4c31-b9e8-1b393b5b0e97\",\"multi_step_editable\":0,\"official_task_version\":\"0.0.18\",\"endpoint_ids\":[]}],\"resource\":\"{\\\"type\\\":\\\"system\\\",\\\"arch\\\":\\\"x86\\\"}\",\"condition\":\"${{ default() }}\",\"exec_type\":\"OCTOPUS_JOB\",\"sequence\":0,\"pipeline_id\":\"c0473f77481c4a12b254012876df71b6\"}],\"identifier\":\"1706840051315bca51592-c211-49fe-ab76-bcf86f5efa84\",\"pre\":[{\"task\":\"official_devcloud_autoTrigger\",\"sequence\":0}],\"post\":null,\"depends_on\":[],\"run_always\":false,\"pipeline_id\":\"c0473f77481c4a12b254012876df71b6\"}]}"
}
```
#### 响应示例
**状态码：200**
OK
```
{
  "pipeline_id" : "8bfbd69eac154a0da341705a36294aca"
}
```
#### SDK代码示例
SDK代码示例如下。
- [Java]
  ```
  package com.huaweicloud.sdk.test;
  import com.huaweicloud.sdk.core.auth.ICredential;
  import com.huaweicloud.sdk.core.auth.BasicCredentials;
  import com.huaweicloud.sdk.core.exception.ConnectionException;
  import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
  import com.huaweicloud.sdk.core.exception.ServiceResponseException;
  import com.huaweicloud.sdk.codeartspipeline.v2.region.CodeArtsPipelineRegion;
  import com.huaweicloud.sdk.codeartspipeline.v2.*;
  import com.huaweicloud.sdk.codeartspipeline.v2.model.*;
  import java.util.List;
  import java.util.ArrayList;
  public class UpdatePipelineInfoSolution {
      public static void main(String[] args) {
          // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
          // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
          String ak = System.getenv("CLOUD_SDK_AK");
          String sk = System.getenv("CLOUD_SDK_SK");
          ICredential auth = new BasicCredentials()
                  .withAk(ak)
                  .withSk(sk);
          CodeArtsPipelineClient client = CodeArtsPipelineClient.newBuilder()
                  .withCredential(auth)
                  .withRegion(CodeArtsPipelineRegion.valueOf("<YOUR REGION>"))
                  .build();
          UpdatePipelineInfoRequest request = new UpdatePipelineInfoRequest();
          request.withProjectId("{project_id}");
          request.withPipelineId("{pipeline_id}");
          PipelineDTO body = new PipelineDTO();
          PipelineConcurrencyMgmt concurrencyControlbody = new PipelineConcurrencyMgmt();
          concurrencyControlbody.withConcurrencyNumber(5)
              .withExceedAction("ABORT")
              .withEnable(false);
          body.withConcurrencyControl(concurrencyControlbody);
          body.withId("c0473f77481c4a12b254012876df71b6");
          body.withDefinition("{"stages":[{"name":"阶段_1","sequence":"0","jobs":[{"id":"","stage_id":1706840051315,"identifier":"JOB_HwdAJ","name":"Subpipeline","depends_on":[],"timeout":"","timeout_unit":"","steps":[{"name":"Subpipeline","task":"official_devcloud_subPipeline","sequence":0,"inputs":[{"key":"SYSTEM_DEVCLOUD_SUBPIPELINE_TRIGGER_ID","value":"dab5232b7b354b6db37e695690218c9b"},{"key":"_OFFICIAL_DEVCLOUD_JOB_NAME_","value":"新建流水线-空"},{"key":"_OFFICIAL_DEVCLOUD_JOB_VERSION_","value":"3.0"}],"business_type":"Normal","runtime_attribution":"agent","identifier":"1706840079615af0c7bda-8885-4c31-b9e8-1b393b5b0e97","multi_step_editable":0,"official_task_version":"0.0.18","endpoint_ids":[]}],"resource":"{\"type\":\"system\",\"arch\":\"x86\"}","condition":"${{ default() }}","exec_type":"OCTOPUS_JOB","sequence":0,"pipeline_id":"c0473f77481c4a12b254012876df71b6"}],"identifier":"1706840051315bca51592-c211-49fe-ab76-bcf86f5efa84","pre":[{"task":"official_devcloud_autoTrigger","sequence":0}],"post":null,"depends_on":[],"run_always":false,"pipeline_id":"c0473f77481c4a12b254012876df71b6"}]}");
          body.withManifestVersion("3.0");
          body.withIsPublish(false);
          body.withName("新建流水线-20240202101359");
          request.withBody(body);
          try {
              UpdatePipelineInfoResponse response = client.updatePipelineInfo(request);
              System.out.println(response.toString());
          } catch (ConnectionException e) {
              e.printStackTrace();
          } catch (RequestTimeoutException e) {
              e.printStackTrace();
          } catch (ServiceResponseException e) {
              e.printStackTrace();
              System.out.println(e.getHttpStatusCode());
              System.out.println(e.getRequestId());
              System.out.println(e.getErrorCode());
              System.out.println(e.getErrorMsg());
          }
      }
  }
  ```
- [Python]
  ```
  # coding: utf-8
  import os
  from huaweicloudsdkcore.auth.credentials import BasicCredentials
  from huaweicloudsdkcodeartspipeline.v2.region.codeartspipeline_region import CodeArtsPipelineRegion
  from huaweicloudsdkcore.exceptions import exceptions
  from huaweicloudsdkcodeartspipeline.v2 import *
  if __name__ == "__main__":
      # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak = os.environ["CLOUD_SDK_AK"]
      sk = os.environ["CLOUD_SDK_SK"]
      credentials = BasicCredentials(ak, sk)
      client = CodeArtsPipelineClient.new_builder() \
          .with_credentials(credentials) \
          .with_region(CodeArtsPipelineRegion.value_of("<YOUR REGION>")) \
          .build()
      try:
          request = UpdatePipelineInfoRequest()
          request.project_id = "{project_id}"
          request.pipeline_id = "{pipeline_id}"
          concurrencyControlbody = PipelineConcurrencyMgmt(
              concurrency_number=5,
              exceed_action="ABORT",
              enable=False
          )
          request.body = PipelineDTO(
              concurrency_control=concurrencyControlbody,
              id="c0473f77481c4a12b254012876df71b6",
              definition="{"stages":[{"name":"阶段_1","sequence":"0","jobs":[{"id":"","stage_id":1706840051315,"identifier":"JOB_HwdAJ","name":"Subpipeline","depends_on":[],"timeout":"","timeout_unit":"","steps":[{"name":"Subpipeline","task":"official_devcloud_subPipeline","sequence":0,"inputs":[{"key":"SYSTEM_DEVCLOUD_SUBPIPELINE_TRIGGER_ID","value":"dab5232b7b354b6db37e695690218c9b"},{"key":"_OFFICIAL_DEVCLOUD_JOB_NAME_","value":"新建流水线-空"},{"key":"_OFFICIAL_DEVCLOUD_JOB_VERSION_","value":"3.0"}],"business_type":"Normal","runtime_attribution":"agent","identifier":"1706840079615af0c7bda-8885-4c31-b9e8-1b393b5b0e97","multi_step_editable":0,"official_task_version":"0.0.18","endpoint_ids":[]}],"resource":"{\"type\":\"system\",\"arch\":\"x86\"}","condition":"${{ default() }}","exec_type":"OCTOPUS_JOB","sequence":0,"pipeline_id":"c0473f77481c4a12b254012876df71b6"}],"identifier":"1706840051315bca51592-c211-49fe-ab76-bcf86f5efa84","pre":[{"task":"official_devcloud_autoTrigger","sequence":0}],"post":null,"depends_on":[],"run_always":false,"pipeline_id":"c0473f77481c4a12b254012876df71b6"}]}",
              manifest_version="3.0",
              is_publish=False,
              name="新建流水线-20240202101359"
          )
          response = client.update_pipeline_info(request)
          print(response)
      except exceptions.ClientRequestException as e:
          print(e.status_code)
          print(e.request_id)
          print(e.error_code)
          print(e.error_msg)
  ```
- [Go]
  ```
  package main
  import (
  "fmt"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
      codeartspipeline "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/codeartspipeline/v2"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/codeartspipeline/v2/model"
      region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/codeartspipeline/v2/region"
  )
  func main() {
      // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak := os.Getenv("CLOUD_SDK_AK")
      sk := os.Getenv("CLOUD_SDK_SK")
      auth, err := basic.NewCredentialsBuilder().
          WithAk(ak).
          WithSk(sk).
          SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      hcClient, err := codeartspipeline.CodeArtsPipelineClientBuilder().
           WithRegion(region.ValueOf("<YOUR REGION>")).
           WithCredential(auth).
           SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      client := codeartspipeline.NewCodeArtsPipelineClient(hcClient)
      request := &model.UpdatePipelineInfoRequest{}
  request.ProjectId = "{project_id}"
  request.PipelineId = "{pipeline_id}"
  concurrencyNumberConcurrencyControl:= int32(5)
  exceedActionConcurrencyControl:= "ABORT"
  enableConcurrencyControl:= false
  concurrencyControlbody := &model.PipelineConcurrencyMgmt{
  ConcurrencyNumber: &concurrencyNumberConcurrencyControl,
  ExceedAction: &exceedActionConcurrencyControl,
  Enable: &enableConcurrencyControl,
  }
  idPipelineDto:= "c0473f77481c4a12b254012876df71b6"
  manifestVersionPipelineDto:= "3.0"
  request.Body = &model.PipelineDto{
  ConcurrencyControl: concurrencyControlbody,
  Id: &idPipelineDto,
  Definition: "{"stages":[{"name":"阶段_1","sequence":"0","jobs":[{"id":"","stage_id":1706840051315,"identifier":"JOB_HwdAJ","name":"Subpipeline","depends_on":[],"timeout":"","timeout_unit":"","steps":[{"name":"Subpipeline","task":"official_devcloud_subPipeline","sequence":0,"inputs":[{"key":"SYSTEM_DEVCLOUD_SUBPIPELINE_TRIGGER_ID","value":"dab5232b7b354b6db37e695690218c9b"},{"key":"_OFFICIAL_DEVCLOUD_JOB_NAME_","value":"新建流水线-空"},{"key":"_OFFICIAL_DEVCLOUD_JOB_VERSION_","value":"3.0"}],"business_type":"Normal","runtime_attribution":"agent","identifier":"1706840079615af0c7bda-8885-4c31-b9e8-1b393b5b0e97","multi_step_editable":0,"official_task_version":"0.0.18","endpoint_ids":[]}],"resource":"{\"type\":\"system\",\"arch\":\"x86\"}","condition":"${{ default() }}","exec_type":"OCTOPUS_JOB","sequence":0,"pipeline_id":"c0473f77481c4a12b254012876df71b6"}],"identifier":"1706840051315bca51592-c211-49fe-ab76-bcf86f5efa84","pre":[{"task":"official_devcloud_autoTrigger","sequence":0}],"post":null,"depends_on":[],"run_always":false,"pipeline_id":"c0473f77481c4a12b254012876df71b6"}]}",
  ManifestVersion: &manifestVersionPipelineDto,
  IsPublish: false,
  Name: "新建流水线-20240202101359",
  }
  response, err := client.UpdatePipelineInfo(request)
  if err == nil {
          fmt.Printf("%+v\n", response)
      } else {
          fmt.Println(err)
      }
  }
  ```
- [更多]
  更多编程语言的SDK代码示例，请参见[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/CodeArtsPipeline/sdk?api=UpdatePipelineInfo)的代码示例页签，可生成自动对应的SDK代码示例。
#### 状态码
| 状态码 | 描述           |
|:---|:---|
| 200 | OK           |
| 401 | Unauthorized |
| 403 | Forbidden    |
| 404 | Not Found    |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-pipeline/ErrorCode.html)。
