Create a Private Module Version
Function
Create a Private Module Version (CreatePrivateModuleVersion)
Create a private module version.
-
The module_version follows the Semantic Versioning specification and is user-customizable. Each component (Major.Minor.Patch) is an unsigned 64-bit integer (uint64).
-
If both module_name and module_id are provided, RFS checks whether they match. If module name does not match the current private module ID, error code 400 is returned.
-
RFS performs validations on private modules, including file size, decompression capability, and number of files. However, it does not perform detailed verification, such as syntax checking.
URI
POST /v1/private-modules/{module_name}/versions
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| module_name | Yes | String | Name of a private module. The name is unique within its domain (domain_id) and region. Only letters, digits, underscores (_), and hyphens (-) are allowed. The name is case-sensitive and must start with a letter. Minimum: 1 Maximum: 128 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Client-Request-Id | Yes | String | A unique request ID is specified by a user to locate a request. UUID is recommended. Minimum: 36 Maximum: 128 |
Response Parameters
Status code: 201
The private module version created successfully. No content returned.
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. Minimum: 11 Maximum: 11 |
| error_msg | String | Response message. |
| encoded_authorization_message | String | The message contains information about unauthorized requests. |
| details | Array of Detail objects | Detailed error information. It is returned by the service when the "permission denied" error occurs. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. |
| error_msg | String | Response message. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. Minimum: 11 Maximum: 11 |
| error_msg | String | Response message. |
| encoded_authorization_message | String | The message contains information about unauthorized requests. |
| details | Array of Detail objects | Detailed error information. It is returned by the service when the "permission denied" error occurs. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. |
| error_msg | String | Response message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. Minimum: 11 Maximum: 11 |
| error_msg | String | Response message. |
| encoded_authorization_message | String | The message contains information about unauthorized requests. |
| details | Array of Detail objects | Detailed error information. It is returned by the service when the "permission denied" error occurs. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. |
| error_msg | String | Response message. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. Minimum: 11 Maximum: 11 |
| error_msg | String | Response message. |
| encoded_authorization_message | String | The message contains information about unauthorized requests. |
| details | Array of Detail objects | Detailed error information. It is returned by the service when the "permission denied" error occurs. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. |
| error_msg | String | Response message. |
Status code: 409
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. Minimum: 11 Maximum: 11 |
| error_msg | String | Response message. |
| encoded_authorization_message | String | The message contains information about unauthorized requests. |
| details | Array of Detail objects | Detailed error information. It is returned by the service when the "permission denied" error occurs. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. |
| error_msg | String | Response message. |
Status code: 429
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. Minimum: 11 Maximum: 11 |
| error_msg | String | Response message. |
| encoded_authorization_message | String | The message contains information about unauthorized requests. |
| details | Array of Detail objects | Detailed error information. It is returned by the service when the "permission denied" error occurs. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. |
| error_msg | String | Response message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Response code. Minimum: 11 Maximum: 11 |
| error_msg | String | Response message. |
| encoded_authorization_message | String | The message contains information about unauthorized requests. |
| details | Array of Detail objects | Detailed error information. It is returned by the service when the "permission denied" error occurs. |
Example Requests
Create a private module version of the user in the current region
POST https://{endpoint}/v1/private-modules/{module_name}/versions
{
"module_id" : "fd0e12bc-a1a4-4cac-8cbe-b023c389736b",
"module_version" : "1.0.1",
"module_uri" : "https://integration-test.obs.{region}.huawei.com/mock_zip_template_for_module_service.zip"
} Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 201 | The private module version created successfully. No content returned. |
| 400 | Invalid request. |
| 401 | Authentication failed. |
| 403 | |
| 404 | The private module does not exist. |
| 409 | Creation request conflict. The specified private module version already exists. |
| 429 | Too frequent requests. |
| 500 | Internal server error. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot