All Products
Search
Document Center

CloudMonitor:DescribeHybridMonitorNamespaceList

Last Updated:Jul 26, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cms:DescribeCustomNamespacecreate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageSizeintegerNo

The number of entries per page.

Page numbers start from 1. Default value: 10.

10
PageNumberintegerNo

The page number.

Page numbers start from 1. Default value: 1.

1
KeywordstringNo

The search keyword.

aliyun
NamespacestringNo

The name of the namespace.

The name can contain letters, digits, and hyphens (-).

aliyun-test
ShowTaskStatisticbooleanNo

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:

  • true
  • false (default)
false

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The request ID.

1EC450A4-3221-5148-B77E-2827576CFE48
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Codestring

The response code.

Success
Messagestring

The returned message.

Specified parameter PageSize is not valid.
PageSizeinteger

The number of entries per page.

10
PageNumberinteger

The page number.

1
Totalinteger

The total number of entries returned.

1
DescribeHybridMonitorNamespacearray<object>

The details of the namespaces.

object
Descriptionstring

The description of the namespace.

aliyun-test
CreateTimestring

The timestamp that was generated when the namespace was created.

Unit: milliseconds.

1652682744000
Namespacestring

The name of the namespace.

aliyun-test
IsDeleteinteger

Indicates whether the namespace is deleted. Valid values:

  • 0: The namespace is not deleted.
  • 1: The namespace is deleted.
0
Idstring

The ID of the namespace.

3****
ModifyTimestring

The timestamp that was generated when the namespace was last modified.

1652682744000
Detailobject

The details of the data retention period.

Specstring

The data retention period. Valid values:

  • cms.s1.large (Retention Period 15 Days)
  • cms.s1.xlarge (Retention Period 32 Days)
  • cms.s1.2xlarge (Retention Period 63 Days)
  • cms.s1.3xlarge (Retention Period 93 Days)
  • cms.s1.6xlarge (Retention Period 185 Days)
  • cms.s1.12xlarge (Retention Period 367 Days)
cms.s1.3xlarge
NamespaceRegionstring

The region where the metric data is stored.

Note This parameter is returned if you select m_prom_user for NamespaceType when you create a namespace.
cn-hangzhou
SLSProjectstring

The project where the metric data is located.

Note This parameter is returned if you select m_prom_user for NamespaceType when you create a namespace.
cms-hybrid-120886317861****-cn-hangzhou-a83d
NotAliyunTaskNumberlong

The number of metric import tasks for third-party services.

0
AliyunProductMetricListarray<object>

The configuration details of metric import tasks for Alibaba Cloud services.

object
UserIdlong

The account that is used to create the namespace.

120886317861****
NamespaceListarray<object>

The namespaces.

object
Namespacestring

The namespace for the Alibaba Cloud service.

acs_ecs_dashboard
MetricListarray<object>

The metrics for the Alibaba Cloud service.

object
Periodlong

The collection period of the metric.

Unit: seconds.

60
Listarray

The metrics.

string

The metric.

["cpu_total"]
YAMLConfigstring

The configuration file of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring.

  • namespace: the namespace of the Alibaba Cloud service.
  • metric_list: the metrics of the Alibaba Cloud service.
  • dimension: the resources of the Alibaba Cloud service that you want to monitor by using Hybrid Cloud Monitoring. If you do not specify a dimension, all resources of the Alibaba Cloud service are monitored.
products:- namespace: acs_ecs_dashboard metric_info: - metric_list: - cpu_total dimension: ''
NamespaceTypestring

The storage scheme of metric data. Valid values:

  • m_prom_user: The metric data is stored in Simple Log Service.
  • m_prom_pool: The metric data is stored in the storage space provided by CloudMonitor.
m_prom_user

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError message
400%s%s
409%sResources already exist.
500InternalError%s

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-11-21The Error code has changed. The response structure of the API has changedView Change Details
2021-10-25Add OperationView Change Details