Creates a namespace.
Prerequisites
Hybrid Cloud Monitoring is activated. For more information, see Activate Hybrid Cloud Monitoring.
Usage notes
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
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateHybridMonitorNamespace |
The operation that you want to perform. Set the value to CreateHybridMonitorNamespace. |
| Namespace | String | Yes | aliyun |
The name of the namespace. The name can contain lowercase letters, digits, and hyphens (-). |
| Description | String | No | The namespace for the metrics of Alibaba Cloud services. |
The description of the namespace. |
| Spec | String | No | cms.s1.3xlarge |
The data retention period of the namespace. Valid values:
For information about the pricing for different retention periods, see the Pricing section in Billing of the dashboard feature. |
For more information about common request parameters, see Common parameters.
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Code | String | Success |
The returned message. |
| Message | String | Namespace.Existed |
The error message. |
| RequestId | String | 3843D23A-FB9E-5DC8-BCCC-458768B79296 |
The ID of the request. |
| Success | String | true |
Indicates whether the call was successful. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateHybridMonitorNamespace
&Namespace=aliyun
&Spec=cms.s1.3xlarge
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateHybridMonitorNamespace>
<RequestId>3843D23A-FB9E-5DC8-BCCC-458768B79296</RequestId>
<Code>Success</Code>
<Success>true</Success>
</CreateHybridMonitorNamespace>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "3843D23A-FB9E-5DC8-BCCC-458768B79296",
"Code" : "Success",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.