Creating a Project
Function
This API is provided for the administrator to create a project.
The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.
URI
POST /v3/projects
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Fill application/json;charset=utf8 in this field. |
| X-Auth-Token | Yes | String | Token with Security Administrator permissions. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Yes | Object | Project information. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Project name, which must start with ID of an existing region_ and can contain less than or equal to 64 characters. For example, the ID of the CN North-Beijing1 region is cn-north-1. You can create a subproject named cn-north-1_IAMProject in this region. |
| parent_id | Yes | String | Project ID of the corresponding region. For example, the project ID of the CN North-Beijing1 region is 04dd42abe48026ad2fa3c01ad7fa...... For details about how to obtain a project ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information. |
| domain_id | No | String | ID of the account to which the project belongs. |
| description | No | String | Project description, which can contain a maximum of 255 characters. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| Object | Project information. |
| Parameter | Type | Description |
|---|---|---|
| is_domain | Boolean | The value is false. |
| description | String | Description of the project. |
| 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 North-Beijing1 region is 04dd42abe48026ad2fa3c01ad7fa...... |
| domain_id | String | Account ID of the project. |
| name | String | Project name. |
Example Request
POST https://iam.myhuaweicloud.com/v3/projects
{
"project": {
"name": "cn-north-1_IAMProject",
"parent_id": "aa2d97d7e62c4b7da3ffdfc11551f878",
"domain_id": "d78cbac186b744899480f25bd0...",
"description": "IAMDescription"
}
} Example Response
Status code: 201
The project is created successfully.
{
"project": {
"is_domain": false,
"description": "IAMDescription",
"links": {
"self": "https://iam.myhuaweicloud.com/v3/projects/07707ab14980265e2f5fc003a021bbc3"
},
"enabled": true,
"id": "07707ab14980265e2f5fc003a021bbc3",
"parent_id": "aa2d97d7e62c4b7da3ffdfc11551f878",
"domain_id": "d78cbac186b744899480f25bd02...",
"name": "cn-north-1_IAMProject"
}
} Status Codes
| Status Code | Description |
|---|---|
| 201 | The project is created successfully. |
| 400 | Invalid parameters. |
| 401 | Authentication failed. |
| 403 | Access denied. |
| 409 | A resource conflict occurs. |
Error Codes
None
Last Article: Listing Projects Accessible to an IAM User
Next Article: Modifying Project Information
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.