All Products
Search
Document Center

CloudMonitor:CreateHybridMonitorNamespace

Last Updated:Mar 08, 2024

Creates a namespace.

Operation description

Prerequisites

Hybrid Cloud Monitoring is activated. For more information, see Activate Hybrid Cloud Monitoring.

Description

This topic provides an example on how to create a namespace named aliyun. In this example, the data retention period of the namespace is set to cms.s1.3xlarge. The returned result indicates that the namespace is created.

Debugging

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

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NamespacestringYes

The name of the namespace.

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

aliyun
DescriptionstringNo

The description of the namespace.

SpecstringNo

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) (default)
  • cms.s1.6xlarge (Retention Period 185 Days)
  • cms.s1.12xlarge (Retention Period 367 Days)

For information about the pricing for different retention periods, see the Pricing section in Billing of the dashboard feature.

cms.s1.3xlarge
NamespaceTypestringNo

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 private storage space provided by CloudMonitor.
Note For more information about the storage schemes of metric data, see Data storage schemes for Hybrid Cloud Monitoring.
m_prometheus
NamespaceRegionstringNo

The region where the metric data is stored.

cn-hangzhou

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

Response parameters

ParameterTypeDescriptionExample
object

None.

Codestring

The response code.

Success
Messagestring

The error message returned.

Namespace.Existed
RequestIdstring

The request ID.

3843D23A-FB9E-5DC8-BCCC-458768B79296
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "Code": "Success",
  "Message": "Namespace.Existed",
  "RequestId": "3843D23A-FB9E-5DC8-BCCC-458768B79296",
  "Success": "true"
}

Error codes

HTTP status codeError codeError message
400%s%s
500InternalErrorThe request processing has failed due to some unknown error.

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 request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: NamespaceType
    Added Input Parameters: NamespaceRegion
2022-03-29Add Operationsee changesets