Querying OS Configuration Parameters
Function
This API is used to obtain the configuration parameters of ModelArts OS, such as network CIIDR and user resource quota. This API is used when you need to query the network configuration, resource allocation, or system management of ModelArts OS. Before using this API, ensure that you have the permission to access ModelArts OS and the service is running properly. After the query, the configuration parameters are returned for future resource planning and system optimization. If you do not have the required permission, the service is unavailable, or the request parameter is invalid, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v1/{project_id}/os-user-config
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: User project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
networkCidrs |
Array of strings |
Definition: Network configuration item. |
|
networkQuota |
Integer |
Definition: Quota of the number of networks that can be created. Range: N/A |
|
poolQuota |
Integer |
Definition: Quota of the number of resource pools that can be created. Range: N/A |
|
poolHighAvailable |
Boolean |
Definition: Whether resource pools with high availability can be created in the current environment or region Range
|
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
GET https://{endpoint}/v1/{project_id}/os-user-config
Example Responses
Status code: 200
OK.
{
"networkCidrs" : [ "192.168.0.0/24", "172.16.31.0/16" ],
"networkQuota" : 15,
"poolQuota" : 15,
"poolHighAvailable" : true
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK. |
|
404 |
Not Found. |
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