Queries namespaces and the details of the related metric import tasks.
Operation description
In this example, all namespaces within the current account are queried. The response shows that the current account has only one namespace named aliyun-test
.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cms:DescribeCustomNamespace | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
PageSize | integer | No | The number of entries per page. Page numbers start from 1. Default value: 10. | 10 |
PageNumber | integer | No | The page number. Page numbers start from 1. Default value: 1. | 1 |
Keyword | string | No | The search keyword. | aliyun |
Namespace | string | No | The name of the namespace. The name can contain letters, digits, and hyphens (-). | aliyun-test |
ShowTaskStatistic | boolean | No | Specifies whether to return the configuration details of metric import tasks for Alibaba Cloud services and the number of metric import tasks for third-party services. Valid values:
| false |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "1EC450A4-3221-5148-B77E-2827576CFE48",
"Success": "true",
"Code": "Success",
"Message": "Specified parameter PageSize is not valid.",
"PageSize": 10,
"PageNumber": 1,
"Total": 1,
"DescribeHybridMonitorNamespace": [
{
"Description": "aliyun-test",
"CreateTime": "1652682744000",
"Namespace": "aliyun-test",
"IsDelete": 0,
"Id": "3****",
"ModifyTime": "1652682744000",
"Detail": {
"Spec": "cms.s1.3xlarge",
"NamespaceRegion": "cn-hangzhou",
"SLSProject": "cms-hybrid-120886317861****-cn-hangzhou-a83d"
},
"NotAliyunTaskNumber": 0,
"AliyunProductMetricList": [
{
"UserId": 0,
"NamespaceList": [
{
"Namespace": "acs_ecs_dashboard",
"MetricList": [
{
"Period": 60,
"List": [
"[\"cpu_total\"]"
]
}
]
}
],
"YAMLConfig": "products:- namespace: acs_ecs_dashboard metric_info: - metric_list: - cpu_total dimension: ''"
}
],
"NamespaceType": "m_prom_user"
}
]
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | %s | %s |
409 | %s | Resources already exist. |
500 | InternalError | %s |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-11-21 | The Error code has changed. The response structure of the API has changed | View Change Details |
2021-10-25 | Add Operation | View Change Details |