Updated on 2025-10-24 GMT+08:00

Modifying Component Information

Function

After a component is created, change the component name as required.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:application:update

    Write

    application *

    -

    -

    -

URI

PUT /v1/components/{id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Definition:

Component ID.

Constraints:

N/A

Value range:

The value is user-defined. The value contains 24 characters.

Default value:

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Definition:

Component name.

Constraints:

The value can contain only letters, digits, hyphens (-), and underscores (_).

Value range:

The value is a string. It can contain 3 to 50 characters.

Default value:

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

String

Definition:

ID of the component to be modified.

Value range:

N/A

Example Requests

This API is used to change the component name.

PUT https://{Endpoint}/v1/components/{id}

{
  "name" : "This API is used to modify the test component information."
}

Example Responses

Status code: 200

The component is modified.

{
  "data" : "685d1e8e02a50263fb2c259c"
}

Status Codes

Status Code

Description

200

The component is modified.

Error Codes

See Error Codes.