Create Namespace

Last updated: 2020-06-05 21:42:31

    Note:

    This is a legacy API which has been hidden and will no longer be updated.

    1. API Description

    Namespace is a container of metrics. Metrics in different namespaces are independent from each other. So the metrics from different applications will not be mistakenly aggregated into the same statistical information. CCM allows you to customize namespace and store data across multiple regions. For example, proc_monitor, i.e. monitoring A process in Guangzhou region. This API provides capacity to create a custom namespace.

    This API (CreateNamespace) is used to create a custom namespace.
    For more information on how many namespaces a user can create, please see Product Limitation page.

    Domain name: monitor.api.qcloud.com

    2. Input Parameters

    The following request parameter list only provides API request parameters. Common request parameters are also needed when the API is called.The Action field for this API is CreateNamespace.

    Parameter Name Required Type Description
    namespace Yes String Namespace: It contains 32 characters, including letters, numbers and underscores.

    3. Output Parameters

    Parameter Name Type Description
    code Int Error code, 0: Successful. Other values: Failed. For more information, please see Common Error Codes on the Error Codes page
    message String Error message

    4. Error Codes

    Error Code Error Description Error Message
    -503 Incorrect request parameter InvalidParameter
    -505 Parameter is missing InvalidParameter.MissingParameter
    -507 Limit has been exceeded OperationDenied.ExceedLimit
    -509 Incorrect dimension group InvalidParameter.DimensionGroupError
    -513 DB operation failed InternalError.DBoperationFail
    -514 Resource already exists OperationDenied.SourceAlreadyExists

    5. Example

    Input

    https://monitor.api.qcloud.com/v2/index.php?Action=CreateNamespace
    &namespace=cvm
    ​    
    

    Output

    {
      'code': 0,
      'message': ''
    }·

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help