当配置审计执行自定义规则中的函数时,默认传入函数计算的数据结构如下:

{
  "invokingEvent": {
    "messageType": "ScheduledNotification",
    "notificationCreationTimestamp": 1600610821106,
    "accountId": {资源所属的阿里云账号ID},
    "configurationItem": {
      "accountId": {资源所属的阿里云账号ID},
      "availabilityZone": "",
      "regionId": "cn-shanghai",
      "configuration": "{\"UpdateDate\":\"2019-10-21T08:02:58Z\",\"UserName\":\"test123\",\"AccessKeys\":{\"AccessKey\":[]},\"UserId\":\"{RAM用户ID}\",\"Comments\":\"\",\"DisplayName\":\"test123\",\"CreateDate\":\"2019-10-21T07:57:55Z\",\"LoginProfile\":{\"PasswordResetRequired\":false,\"UserName\":\"test123\",\"MFABindRequired\":false,\"CreateDate\":\"2019-10-21T07:57:55Z\"}}",
      "captureTime": 1600610821106,
      "resourceCreateTime": 1571644675000,
      "resourceId": "20082888873117****",
      "resourceName": "test123",
      "resourceType": "ACS::RAM::User",
      "tags": ""
    }
  },
  "ruleParameters": {
    "dangerousActions": "ecs:*,oss:*,log:*"
  },
  "resultToken": "HLQr3BZx/C+DLjwudFcYdUsiYzW485CJlYIMAAUjibdHcJhG2uvgKZ9tXaFh2yvVUxO2+tFf3whxOmGigYQErk1ymtmLWLzFV4JForVWYIKdbwwhbDBOgVwF7Ov9c3uVCNz/KpxNElwhTzMkZB95U1vmLs4vUYXuB/Txw4jiCYAZuoGWYC/HJwYdSFOHkjAajIswBuzIbX5qFXfwpaqviNDW3I5q8O+Kx7eSYkqqGTYz1ncQdx3sXNSII/TW****"
自定义规则数据结构的主要参数说明如下表所示。
参数 说明 示例
accountId 资源所属阿里云账号ID。 169827232854****
regionId 资源所属地域。 cn-shanghai
resourceId 资源ID。 20082888873117****
resourceName 资源名称。 test123
resourceType 资源类型。 ACS::RAM::User
ruleParameters 规则参数。 "dangerousActions": "ecs:*,oss:*,log:*"