• 文档
  • 控制台
  • 登录
  • 立即注册
    目前不支持用户自主注册,如需注册账号,请联系400-080-1100
操作审计 API参考手册
最近更新时间:2023-04-16 17:00:00

1 操作审计管理

1.1 GetActionTrailList

 调用 list 接口查询操作审计列表。

1.1.1 使用说明

POST https://{Endpoint}/audit/v1.0/audit/list

1.1.2 请求参数

 表1-1 body 中的请求参数

image.png

1.1.3 返回数据

 表1-2 返回数据

image.png

 表1-3 ListData 字段说明

image.png

image.png

image.png

 表1-4 表 1-3 UserInfo 字段说明

image.png

 表1-5 Error 字段说明

image.png

1.1.4 示例

 1. 请求示例
 POST https://{Endpoint}/audit/v1.0/audit/list{"PageSize":10,"PageNumber":1,"StartDate":"2022-08-29 00:00:00","EndDate":"2022-08-30
 23:59:59","ResourceName":"","UserName":"","AccessKey":"","ResourceType":"","RequestType":"","SourceIpAddress":"","Result":"","EventLevel":""}
 2. 正常返回示例
 HTTP/1.1 200 OK
 Content-Type:application/json
 {
      "ListData": [
      {
          "AccessKey": null,
          "EventTime": "2022-09-06 16:50:53",
          "UserName": "zhanghang01",
          "UserTypeName": "云账号",
          "EventType": null,
          "EventName": "ConsoleSignin",
          "ServiceName": "Account",
          "RequestParameters": "{\"loginParam\":{\"cloudUserName\":\"zhanghang01\",\"captcha\":\"5482\",\"loginType\":\"cloud\",\"service\":\"http%3A%2F%2Fconsole.vmcbc01.cecloudcs.com%2Fsecret�key%2F%23%2Fcredentials%2Fsecret�key\",\"remberMe\":tru,\"isSaml\":false,\"username\":\"\"}}",
          "ResponseElements": null,
          "EventRegion": "vmcbc01",
          "EventId": "6485c78f-4f8f-4191-8a69-ca0135f7d84f",
          "EventVersion": "1",
          "EventSource": "signin.vmcbc01.cecloudcs.com",
          "SourceIpAddress": "10.56.4.89",
          "ErrorCode": null,
          "ErrorMessage": null,
          "ProcessRecord": null,
          "RequestId": "6485c78f-4f8f-4191-8a69-ca0135f7d84f",
          "ResourceType": "CCS::Account::account",
          "ResourceName": "zhanghang01",
          "RequestType": "Write",
          "Detail": "{\"event_id\":\"6485c78f-4f8f-4191-8a69-ca0135f7d84f\",\"event_version\":\"1\",\"event_source\":\"signin.vmcbc01.cecloudcs.com\",\"source_ip_address\":\"10.56.4.89\",\"user_agent\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0
 Safari/537.36\",\"service_name\":\"Account\",\"event_name\":\"ConsoleSignin\",\"request_type\":\"Write\",\"api_version\":\"1.0\",\"event_level\":\"Info\",\"request_id\":\"6485c78f-4f8f-4191-8a69-ca0135f7d84f\",\"event_time\":\"2022-09-06 16:50:53.546\",\"result\":\"Success\",\"event_region\":\"vmcbc01\",\"resource_type\":\"CCS::Account::account\",\"resource_name\":\"zhanghang01\",\"request_parameters\":\"{\\\"loginParam\\\":{\\\"cloudUserName\\\":\\\"zhanghang01\\\",\\\"captcha\\\":\\\"5482\\\",\\\"loginType\\\":\\\"cloud\\\",\\\"service\\\":\\\"http%3A%2F%2Fconsole.vmcbc01.cecloudcs.com%2Fsecret�key%2F%23%2Fcredentials%2Fsecret-key\\\",\\\"remberMe\\\":true,\\\"isSaml\\\":false,\\\"username\\\":\\\"\\\"}}\",\"user_info\":{\"account_id\":220007001900210,\"principal_id\":220007001900210,\"type\":\"rootaccount\",\"user_name\":\"zhanghang01\"}}",
          "EventLevel": "Info",
          "Result": "Success",
          "UserInfo": {
              "AccountId": "220007001900210",
              "PrincipalId": "220007001900210",
              "Type": "root-account",
              "UserName": "zhanghang01",
              "AccessKeyId": null
          }
      }
      ],
      "RequestId": "066142a4-6ee6-48aa-b933-321b0019d468",
      "TotalCount": 43,
     "PageSize": 1,
     "PageNumber": 4
 }

1.2 GetResourceTypeList

 调用接口查询资源类型列表。

1.2.1 使用说明

 POST https://{Endpoint}/audit/v1.0/audit/resources/list

1.2.2 请求参数

 无

1.2.3 返回数据

image.png

 表1-6 ListData 数据

image.png

 表1-7 Error 字段说明

image.png

1.2.4 示例

 1. 请求示例
 POST https://{Endpoint}/audit/v1.0/audit/resources/list
 2. 正常返回示例
 HTTP/1.1 200 OK
 Content-Type:application/json
 {
      "ListData": [
      {
          "Id": "6",
          "ResourceTypeCode": "IAM",
          "ParentId": "5",
          "ResourceTypeDetailCode": "user",
      },
      {
          "Id": "7",
          "ResourceTypeCode": "IAM",
          "ParentId": "5",
          "ResourceTypeDetailCode": "policy",
      }
      ],
      "RequestId": 1,
 }

1.3 错误码

image.png

意见反馈

文档内容是否对您有帮助?

如您有其他疑问,您也可以通过在线客服来与我们联系探讨 在线客服

联系我们
回到顶部