Skip to content

jdc monitor describe-alarm-contacts 执行不成功,信息为:"message": "this api is not allowed [gw]",  #27

@obsicn

Description

@obsicn

环境信息:

MichaeldeMacBook-Pro-2:~ myang$ jdc configure show-current
================= cn-east-2-monitor ================
access_key:  	xx
secret_key:  	xx
region_id:  	cn-east-2
endpoint:  	monitor.cn-east-2.jdcloud-api.com
scheme:  	https
timeout:  	20

能成功执行describe-alarms-by-id。

MichaeldeMacBook-Pro-2:~ myang$  jdc monitor describe-alarms-by-id --alarm-id=alarm_22f24539-fcea-4722-96e8-7247c52df160
{
    "error": null, 
    "result": {
        "alarm": {
            "status": 1, 
            "calculation": "avg", 
            "resourceId": "i-0vo7w5zg54", 
            "metric": "cpu_util", 
            "enabled": 1, 
            "period": 5, 
            "createTime": "2018-12-26T11:40:22+08:00", 
            "times": 1, 
            "contactGroups": null, 
            "tag": "", 
            "contactPersons": [
                "piaojinnan"
            ], 
            "serviceCode": "vm", 
            "threshold": 20, 
            "region": "cn-east-2", 
            "operation": ">", 
            "noticePeriod": 24, 
            "id": "alarm_22f24539-fcea-4722-96e8-7247c52df160", 
            "metricName": "CPU使用率"
        }
    }, 
    "request_id": "bghjqivd0qtgbk8hpf8epe1qkkpo0a7v"
}

但执行如下命令报错:

MichaeldeMacBook-Pro-2:~ myang$  jdc monitor describe-alarm-contacts   --alarm-id=alarm_22f24539-fcea-4722-96e8-7247c52df160
{
    "error": {
        "status": "HTTP_FORBIDDEN", 
        "message": "this api is not allowed [gw]", 
        "code": 403
    }, 
    "result": null, 
    "request_id": "bghjr7qoi7o6hcs02u7u6hoveodpvpmh"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions