云审计服务 CTS-事件样例:创建云服务器实例

时间:2024-09-13 10:22:17

创建云服务器实例

{
    "trace_id": "cbdd4480-2e03-11ef-82de-cf140e2a70fb",
    "trace_name": "createServer",
    "resource_type": "ecs",
    "trace_rating": "normal",
    "api_version": "1.0",
    "source_ip": "124.71.93.243",
    "domain_id": "7e0d78c85***d0b9b7cba",
    "trace_type": "ConsoleAction",
    "service_type": "E CS ",
    "event_type": "system",
    "project_id": "07066c6fc90025a02f6dc01e105b286e",
    "read_only": false,
    "tracker_name": "system",
    "operation_id": "ListSubscriptions",
    "resource_account_id": "7e0d78c85***d0b9b7cba",
    "time": 1718777931170,
    "resource_name": "ecs-test",
    "user": {
        "access_key_id": "HSTAZVL6WYS0J5MYE2GA",
        "account_id": "7e0d78c85***d0b9b7cba",
        "user_name": " IAM UserA",
        "domain": {
            "name": "IAMDomainB",
            "id": "7e0d78c85***d0b9b7cba"
        },
        "name": "IAMUserA",
        "principal_is_root_user": "true",
        "id": "f36972ced***d619f1214",
        "principal_urn": "iam::7e0d78c85***d0b9b7cba:user:IAMUserA",
        "type": "User",
        "principal_id": "f36972ced***d619f1214"
    },
    "record_time": 1718777931170,
    "request": "{\"server\":{\"adminPass\":\"********\",\"extendparam\":{\"chargingMode\":\"0\",\"regionID\":\"cn-north-4\"},\"count\":1,\"metadata\":{\"op_svc_userid\":\"f36972ced***d619f1214\",\"__support_agent_list\":\"hss,ces\"},\"availability_zone\":\"cn-north-4c\",\"description\":\"\",\"name\":\"ecs-test\",\"imageRef\":\"7d940784-ac0a-425f-b3fa-8478f1a1df70\",\"root_volume\":{\"volumetype\":\"GPSSD\",\"extendparam\":{\"resourceSpecCode\":\"GPSSD\",\"resourceType\":\"3\"},\"size\":40,\"metadata\":null,\"hw:passthrough\":\"false\",\"cluster_type\":null,\"cluster_id\":null,\"iops\":null,\"throughput\":null},\"data_volumes\":[],\"flavorRef\":\"sn3.small.1\",\"personality\":[],\"vpcid\":\"250ad46d-9c89-44ec-a97d-293da771b06b\",\"security_groups\":[{\"id\":\"3bb87748-e387-42e5-ad7a-4331638f1321\"}],\"nics\":[{\"subnet_id\":\"1a02d148-e7f9-4a3c-ba58-18099dfbf752\",\"nictype\":\"\",\"ip_address\":\"\",\"port_id\":null,\"binding:profile\":{\"disable_security_groups\":\"false\"},\"extra_dhcp_opts\":[],\"ipv6_bandwidth\":null,\"ipv6_enable\":false,\"driver_mode\":null,\"allowed_address_pairs\":null,\"efi_enable\":false,\"efi_protocol\":null}],\"publicip\":{\"id\":null,\"eip\":{\"bandwidth\":{\"name\":\"ecs-test-bandwidth\",\"size\":1,\"id\":null,\"sharetype\":\"PER\",\"productid\":\"\",\"chargemode\":\"traffic\"},\"extendparam\":{\"chargingMode\":\"postPaid\"},\"iptype\":\"5_bgp\",\"ipproductid\":\"\"}},\"key_name\":\"KeyPair-ebbe\",\"isAutoRename\":false,\"server_tags\":[],\"batch_create_in_multi_az\":false,\"spod_enable\":false,\"user_data\":\"\"}}",
    "message": "success",
    "response": "{\"job_id\":\"ff8080828fe9028a01902f2542df1b10\",\"job_type\":\"createSingleServer\",\"begin_time\":\"2024-06-19T06:18:09.502Z\",\"end_time\":\"2024-06-19T06:18:51.169Z\",\"status\":\"SUC CES S\",\"error_code\":null,\"fail_reason\":null,\"entities\":{\"server_id\":\"7285ea5d-f15c-4d9c-9e4e-37d37023f2f4\"}}",
    "resource_id": "7285ea5d-f15c-4d9c-9e4e-37d37023f2f4",
    "request_id": "null"
}

在以上信息中,可以重点关注如下字段:

  • "time":标识事件产生的时间戳,本例中为1718777931170。
  • "user":记录了操作用户的信息,本例中操作用户为账户(domain字段)IAMDomainB下的用户(name字段)IAMUserA。
  • "request":记录了创建ECS服务器的请求,可以抽取该ECS服务器的简单信息,如name为ecs-test-bandwidth,资源id(vpcid字段)为250ad46d-9c89-44ec-a97d-293da771b06b。
  • "response":记录了创建ECS服务的返回结果,可以抽取其中的关键信息,如创建结果(status字段)为SUCCESS,错误码(error_code字段)和失败原因(fail_reason字段)均为空(null)。
support.huaweicloud.com/usermanual-cts/cts_03_0011.html