创建网关日志监控。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
hcs-sgw:CreateGatewayLogging |
create |
*全部资源
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
GatewayId |
string |
是 |
网关 ID。 |
gw-000eg44nmxbsfw**** |
SlsProject |
string |
是 |
日志服务(SLS) Project。 |
alex**** |
SlsLogstore |
string |
是 |
日志服务(SLS) Logstore。 |
logs**** |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
Message |
string |
请求结果描述。 |
successful |
RequestId |
string |
请求 ID。 |
76109369-5729-467D-D4A3-1131A8DA**** |
Code |
string |
状态码。状态码为 200 表示请求成功。 |
200 |
Success |
boolean |
调用结果,返回值如下:
|
true |
示例
正常返回示例
JSON
格式
{
"Message": "successful",
"RequestId": "76109369-5729-467D-D4A3-1131A8DA****",
"Code": "200",
"Success": true
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | EmptyGatewayId | You must enter a valid ID for the gateway. | 网关ID不能为空。 |
400 | EmptySlsProject | You must specify a valid project of Log Service. | 日志服务(SLS)项目Project不能为空。 |
400 | EmptySlsLogstore | You must specify a valid Logstore of Log Service. | 日志服务(SLS)日志库Logstore不能为空。 |
400 | GatewayVersionNotAllowed | The specified version for the gateway is invalid. You must specify a valid version. | 网关版本不支持,请确认输入参数是否正确。 |
400 | GatewayLoggingStatusNotAllowed | Failed to perform the operation because log monitoring is not enabled. | 网关日志监控状态不支持此操作,请检查后重试。 |
400 | GatewayNotExist | The specified gateway does not exist. You must specify a valid parameter. | 网关不存在,请确认输入参数是否正确。 |
400 | InvalidLogstore | You must specify a valid project and Logstore of Log Service. The project and Logstore must reside in the same region as the gateway. You can use the project and Logstore to monitor logs. | 请正确输入您在该网关所在地域用于日志监控的日志服务(SLS) project 和 logstore。 |
403 | NoPermission | Insufficient permissions. We recommend that you contact the administrator of the Alibaba Cloud account to grant the required permissions to you. | 没有足够的权限,请联系云账号管理员授予您相应权限。 |
403 | AssumeRoleFail | Failed to perform cross-service authorization. Try again later. If the error persists after several tries, we recommend that you submit a ticket. | 跨服务授权失败,请重试,如果多次尝试失败,请提交工单。 |
404 | StorageBundleNotExist | The name you specified for the gateway cluster does not exist. You must specify a valid parameter. | 网关集群不存在,请确认输入参数是否正确。 |
404 | RoleNotExist | The role that Cloud Storage Gateway needs to obtain cross-service authorization does not exist. You must grant the required permissions to Cloud Storage Gateway. | 云存储网关需要的跨服务授权角色不存在,请授予云存储网关服务相应权限。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?