【问题标题】:AWS elasticsearch API _cluster is not allowed不允许使用 AWS elasticsearch API _cluster
【发布时间】:2016-03-01 21:23:56
【问题描述】:

根据亚马逊文档,AWS elasticsearch Service 支持 API _cluster,但是这个命令不起作用:

curl -XGET 'https://search-aa-kfrqt6kjja5w7asrt7hi.sa-east-1.es.amazonaws.com/_cluster/state?pretty'
{"Message":"Your request: '/_cluster/state' is not allowed."}

http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-gsg-supported-operations.html

具有模板“允许对此域的开放访问”的集群

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "*"
      },
      "Action": "es:*",
      "Resource": "arn:aws:es:sa-east-1:7183736:domain/aa-ca/*"
    }
  ]
}

感谢您提供的任何帮助!

【问题讨论】:

    标签: amazon-web-services elasticsearch


    【解决方案1】:

    尝试添加application/json 标头: curl -H "Content-type:application/json" https://search-aa-kfrqt6kjja5w7asrt7hi.sa-east-1.es.amazonaws.com/_cluster/stats?pretty

    实际上,我查看了文档,并没有在支持的操作中显示/_cluster/state


    支持的 Amazon ES 操作:
    ...
    /_cluster/健康
    /_cluster/settings 三个属性(仅限 PUT)
    /_cluster/stats
    ...

    【讨论】:

      猜你喜欢
      • 2022-07-11
      • 2017-07-27
      • 2020-12-21
      • 1970-01-01
      • 2017-04-09
      • 2016-07-12
      • 2016-04-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多