Obtaining Custom Node Configuration Templates of a Resource Pool
Function
This API is used to obtain the structure definition and parameter specifications of a node configuration template. It is used when you need to view the template structure of custom node configurations (such as parameter fields, verification rules, and example values), verify whether the configuration template complies with specifications, or select a configuration template, you can use this API to obtain the template metadata (such as parameter description, type restriction, and dependency). Before using this API, ensure that the target configuration template has been registered with the system and is accessible, you have the permissions to view the template, and the system configuration management service functions properly. After the query operation is complete, the system returns complete definitions of the template, including the parameter list, version number, and update time. The query operation does not affect the template content or node configuration. If the template is not registered, you do not have sufficient permissions, or the system service is abnormal, an error message (for example, "404 Not Found", "403 Forbidden", or "503 Service Unavailable") is returned.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
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, no identity policy-based permission required for calling this API.
URI
GET /v2/{project_id}/pools/{pool_name}/node-config-template
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
| pool_name | Yes | String | Definition: Pool name. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| X-request-id | String | This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. |
| Parameter | Type | Description |
|---|---|---|
| apiVersion | String | Definition: API version. Range: The value is fixed to v2. |
| kind | String | Definition: Configuration type. Range: The value is fixed to NodeConfigTemplate. |
| metadata | nodeconfigtemplateMetaV2 object | Definition: Node configuration template metadata. |
| spec | nodeconfigtemplatesSpec object | Definition: Node configuration template specifications. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition: Node name. Range: The value is fixed to node-config-template. |
| Parameter | Type | Description |
|---|---|---|
| templates | Array of nodeconfigTemplateItem objects | Definition: Node configuration template list. |
| Parameter | Type | Description |
|---|---|---|
| configs | Object | Definition: Supported configuration items and default values. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| X-request-id | String | This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Example Requests
None
Example Responses
Status code: 200
Custom node configuration template.
Obtain custom node configuration templates of a resource pool.
{
"apiversion" : "v2",
"kind" : "NodeConfigTemplate",
"metadata" : {
"name" : "node-config-template"
},
"spec" : {
"templates" : [ {
"configs" : null
} ]
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Custom node configuration template. |
| 400 | Error response |
Error Codes
See Error Codes.
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