Updated on 2024-07-30 GMT+08:00

Modifying Project Information

Function

This API is provided for the administrator to modify project information.

The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.

Debugging

You can debug this API in API Explorer.

URI

PATCH /v3/projects/{project_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

ID of the project to be modified. For details about how to obtain the project ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information.

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Fill application/json;charset=utf8 in this field.

X-Auth-Token

Yes

String

Access token issued to a user to bear its identity and permissions.

For details about the permissions required by the token, see Actions.

Table 3 Parameters in the request body

Parameter

Mandatory

Type

Description

project

Yes

Object

Project information.

Table 4 project

Parameter

Mandatory

Type

Description

name

No

String

Project name, which must start with ID of an existing region_ and can contain less than or equal to 64 characters. The region which the project belongs to cannot be changed. For example, if the original project name is ap-southeast-1_IAMProject, the new project name must also start with ap-southeast-1_. Either name or description must be specified.

description

No

String

Project description, which can contain a maximum of 255 characters. Either name or description must be specified.

Response Parameters

Table 5 Parameters in the response body

Parameter

Type

Description

project

Object

Project information.

Table 6 project

Parameter

Type

Description

is_domain

Boolean

The value is false.

description

String

Description of the project.

extra

Object

Additional information about the project.

links

Object

Project resource link.

enabled

Boolean

Enabling status of the project.

id

String

Project ID.

parent_id

String

Project ID of the corresponding region. For example, the project ID of the CN-Hong Kong region is 04dd42abe48026ad2fa3c01ad7fa......

domain_id

String

Account ID of the project.

name

String

Project name.

Example Request

Request for changing the project name to ap-southeast-1_IAMNewProject and description to IAMDescription

PATCH https://iam.myhuaweicloud.com/v3/projects/{project_id}
{
    "project": {
        "name": "ap-southeast-1_IAMNewProject",
        "description": "IAMDescription"
    }
}

Example Response

Status code: 200

The request is successful.

{
    "project": {
        "is_domain": false,
        "description": "IAMDescription",
        "links": {
            "self": "https://iam.myhuaweicloud.com/v3/projects/07707ab14980265e2f5fc003a021bbc3"
        },
        "extra": {},
        "enabled": true,
        "id": "07707ab14980265e2f5fc003a021bbc3",
        "parent_id": "aa2d97d7e62c4b7da3ffdfc11551f878",
        "domain_id": "d78cbac186b744899480f25bd...",
        "name": "ap-southeast-1_IAMNewProject"
    }
}

Status Codes

Status Code

Description

200

The request is successful.

400

Invalid parameters.

401

Authentication failed.

403

Access denied.

409

A resource conflict occurs.

Error Codes

None