All Products
Search
Document Center

CloudMonitor:CreateHybridMonitorNamespace

Last Updated:Jul 26, 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

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:CreateCustomNamespacecreate
  • All Resources
    *
    none
none

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 changedView Change Details
2022-03-29Add OperationView Change Details