如果在使用OpenSearch SDK 时有报错:
"httpCode":401,"message":"RAM sub account check permission fail", 说明使用的子账号,没有调用相关接口的权限,权限规则可参考
RAM访问鉴权规则。
流量API调用权限设置可参考:
{
"Statement": [
{
"Effect": "Allow",
"Action": [
"opensearch:PushDoc",
"opensearch:SearchApp"
],
"Resource": [
"acs:opensearch:$regionId:*:apps/$appGroupName",
"acs:opensearch:$regionId:*:app-groups/$appGroupName"
]
},
{
"Action": "opensearch:SearchSuggest",
"Effect": "Allow",
"Resource": "acs:opensearch:$regionId:*:suggestions/$suggestionIdentity"
}
],
"Version": "1"
}