All Products
Search
Document Center

Cloud Monitor:DescribeHybridMonitorNamespaceList

Last Updated:Jun 11, 2026

Mengkueri daftar namespace dan detail sumber datanya.

Deskripsi operasi

This example shows how to query all namespaces that belong to the current account. The response indicates that only one namespace, aliyun-test, exists.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

cms:DescribeCustomNamespace

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

PageSize

integer

No

Jumlah entri yang dikembalikan pada setiap halaman.

Nilai minimum: 1. Nilai default: 10.

10

PageNumber

integer

No

Nomor halaman.

Nilai minimum: 1. Nilai default: 1.

1

Keyword

string

No

Kata kunci untuk pencarian.

aliyun

Namespace

string

No

Nama namespace.

Nama dapat berisi huruf besar, huruf kecil, angka, dan tanda hubung (-).

aliyun-test

ShowTaskStatistic

boolean

No

Apakah akan menampilkan detail konfigurasi tugas impor data untuk layanan Alibaba Cloud dan jumlah tugas impor data untuk layanan non-Alibaba Cloud. Nilai valid:

  • true

  • false (default).

false

Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Parameter umum.

Elemen respons

Element

Type

Description

Example

object

No description is available.

RequestId

string

The request ID.

1EC450A4-3221-5148-B77E-2827576CFE48

Success

string

Indicates whether the operation was successful. Valid values:

  • true: The operation was successful.

  • false: The operation failed.

true

Code

string

The status code.

Success

Message

string

The error message.

Specified parameter PageSize is not valid.

PageSize

integer

The number of entries returned per page.

10

PageNumber

integer

The page number.

1

Total

integer

The total number of entries.

1

DescribeHybridMonitorNamespace

array<object>

The details of the namespaces.

array<object>

No description is available.

Description

string

The description of the namespace.

aliyun-test

CreateTime

string

The timestamp when the namespace was created.

Unit: milliseconds.

1652682744000

Namespace

string

The name of the namespace.

aliyun-test

IsDelete

integer

Indicates whether the namespace is deleted. Valid values:

  • 0: The namespace is not deleted.

  • 1: The namespace is deleted.

0

Id

string

The namespace ID.

3****

ModifyTime

string

The timestamp when the namespace was last modified. Unit: milliseconds.

1652682744000

Detail

object

The details of the data storage duration.

Spec

string

The data storage duration. Valid values:

  • cms.s1.large: 15 days.

  • cms.s1.xlarge: 32 days.

  • cms.s1.2xlarge: 63 days.

  • cms.s1.3xlarge: 93 days.

  • cms.s1.6xlarge: 185 days.

  • cms.s1.12xlarge: 376 days.

cms.s1.3xlarge

NamespaceRegion

string

The region where the monitoring data is stored.

Catatan

This parameter is returned if you set NamespaceType to m_prom_user when you create the namespace.

cn-hangzhou

SLSProject

string

The Simple Log Service (SLS) project where the monitoring data is stored.

Catatan

This parameter is returned if you set NamespaceType to m_prom_user when you create the namespace.

cms-hybrid-120886317861****-cn-hangzhou-a83d

PrometheusInstanceId

string

The Prometheus instance where the monitoring data is stored.

Catatan

This parameter is returned if you set NamespaceType to aliyun_prometheus when you create the namespace.

rw-57******************7f

NotAliyunTaskNumber

integer

The number of data import tasks for non-Alibaba Cloud services.

0

AliyunProductMetricList

array<object>

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

array<object>

No description is available.

UserId

integer

The account that is used to create the namespace.

120886317861****

NamespaceList

array<object>

The list of namespaces.

array<object>

No description is available.

Namespace

string

The data namespace of the Alibaba Cloud service.

acs_ecs_dashboard

MetricList

array<object>

The list of metrics for the Alibaba Cloud service.

object

No description is available.

Period

integer

The collection period of the metric.

Unit: seconds.

60

List

array

The list of metrics.

string

The metric.

["cpu_total"]

YAMLConfig

string

The configuration file for the Alibaba Cloud service that is connected to 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 can be queried in Hybrid Cloud Monitoring. If this parameter is empty, all resources are monitored.

products:- namespace: acs_ecs_dashboard metric_info: - metric_list: - cpu_total dimension: ''

NamespaceType

string

The storage solution for monitoring data. Valid values:

  • m_prom_user: The monitoring data is stored in SLS.

  • m_prom_pool: The monitoring data is stored in the storage space provided by Cloud Monitor.

  • aliyun_prometheus: The monitoring data is stored in a Prometheus instance.

aliyun_prometheus

Contoh

Respons sukses

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",
        "PrometheusInstanceId": "rw-57******************7f"
      },
      "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": "aliyun_prometheus"
    }
  ]
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 %s %s
500 InternalError %s
403 %s %s
404 %s %s
409 %s Resources already exist.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.