

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# ASFF 中的资源属性
<a name="asff-resources-attributes"></a>

以下是 AWS 安全调查结果格式 (ASFF) 中该`Resources`对象的描述和示例。有关这些字段的更多信息，请参阅[资源](asff-required-attributes.md#Resources)。

## ApplicationArn
<a name="asff-resources-applicationarn"></a>

确定调查发现中涉及的应用程序的 Amazon 资源名称（ARN）。

**示例**

```
"ApplicationArn": "arn:aws:resource-groups:us-west-2:123456789012:group/SampleApp/1234567890abcdef0"
```

## ApplicationName
<a name="asff-resources-applicationname"></a>

确定调查发现中涉及的应用程序的名称。

**示例**

```
"ApplicationName": "SampleApp"
```

## DataClassification
<a name="asff-resources-dataclassification"></a>

[https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_DataClassificationDetails.html](https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_DataClassificationDetails.html) 字段提供有关在资源上检测到的敏感数据的信息。

**示例**

```
"DataClassification": {
    "DetailedResultsLocation": "Path_to_Folder_Or_File",
    "Result": {
        "MimeType": "text/plain",
        "SizeClassified": 2966026,
        "AdditionalOccurrences": false,
        "Status": {
            "Code": "COMPLETE",
            "Reason": "Unsupportedfield"
        },
       "SensitiveData": [
            {
                "Category": "PERSONAL_INFORMATION",
                "Detections": [
                    {
                        "Count": 34,
                        "Type": "GE_PERSONAL_ID",
                        "Occurrences": {
                            "LineRanges": [
                                {
                                    "Start": 1,
                                    "End": 10,
                                    "StartColumn": 20
                                }
                            ],
                            "Pages": [],
                            "Records": [],
                            "Cells": []
                        }
                    },
                    {
                        "Count": 59,
                        "Type": "EMAIL_ADDRESS",
                        "Occurrences": {
                            "Pages": [
                                {
                                    "PageNumber": 1,
                                    "OffsetRange": {
                                        "Start": 1,
                                        "End": 100,
                                        "StartColumn": 10
                                     },
                                    "LineRange": {
                                        "Start": 1,
                                        "End": 100,
                                        "StartColumn": 10
                                    }
                                }
                            ]
                        }
                    },
                    {
                        "Count": 2229,
                        "Type": "URL",
                        "Occurrences": {
                           "LineRanges": [
                               {
                                   "Start": 1,
                                   "End": 13
                               }
                           ]
                       }
                   },
                   {
                       "Count": 13826,
                       "Type": "NameDetection",
                       "Occurrences": {
                            "Records": [
                                {
                                    "RecordIndex": 1,
                                    "JsonPath": "$.ssn.value"
                                }
                            ]
                        }
                   },
                   {
                       "Count": 32,
                       "Type": "AddressDetection"
                   }
               ],
               "TotalCount": 32
           }
        ],
        "CustomDataIdentifiers": {
            "Detections": [
                 {
                     "Arn": "1712be25e7c7f53c731fe464f1c869b8", 
                     "Name": "1712be25e7c7f53c731fe464f1c869b8", 
                     "Count": 2,
                 }
            ],
            "TotalCount": 2
        }
    }
}
```

## Details
<a name="asff-resources-details"></a>

[https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_ResourceDetails.html](https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_ResourceDetails.html) 字段使用相应对象提供有关单个资源的更多信息。必须在 `Resources` 对象中的单独资源对象中提供每个资源。

请注意，如果调查发现大小超过最大值 240 KB，则 `Details` 对象将从调查发现中移除。对于使用 AWS Config 规则的控制结果，您可以在 AWS Config 控制台上查看资源详细信息。

Security Hub CSPM 为其支持的资源类型提供了一组可用的资源详细信息。这些细节对应于 `Type` 对象的值。尽可能使用提供的类型。

例如，如果资源是 S3 存储桶，则将资源 `Type` 设置为 `AwsS3Bucket` 并在 [`AwsS3Bucket`](asff-resourcedetails-awss3.md#asff-resourcedetails-awss3bucket) 对象中提供资源详细信息。

[`Other`](asff-resourcedetails-other.md) 对象允许您提供自定义字段和值。您在以下情况下使用 `Other` 对象：
+ 资源类型（资源 `Type` 的值）没有对应的详细信息对象。要提供资源的详细信息，您可以使用 [`Other`](asff-resourcedetails-other.md) 对象。
+ 资源类型的对象不包括您要填充的所有字段。在这种情况下，请使用资源类型的详细信息对象来填充可用字段。使用 `Other` 对象填充不在特定于类型的对象中的字段。
+ 资源类型不是提供的类型之一。在此情况下，将 `Resource.Type` 设置为 `Other`，并使用 `Other` 对象填充详细信息。

**示例**

```
"Details": {
  "AwsEc2Instance": {
    "IamInstanceProfileArn": "arn:aws:iam::123456789012:role/IamInstanceProfileArn",
    "ImageId": "ami-79fd7eee",
    "IpV4Addresses": ["1.1.1.1"],
    "IpV6Addresses": ["2001:db8:1234:1a2b::123"],
    "KeyName": "testkey",
    "LaunchedAt": "2018-09-29T01:25:54Z",
    "MetadataOptions": {
      "HttpEndpoint": "enabled",
      "HttpProtocolIpv6": "enabled",
      "HttpPutResponseHopLimit": 1,
      "HttpTokens": "optional",
      "InstanceMetadataTags": "disabled"
    },
    "NetworkInterfaces": [
    {
      "NetworkInterfaceId": "eni-e5aa89a3"
    }
    ],
    "SubnetId": "PublicSubnet",
    "Type": "i3.xlarge",
    "VirtualizationType": "hvm",
    "VpcId": "TestVPCIpv6"
  },
  "AwsS3Bucket": {
    "OwnerId": "da4d66eac431652a4d44d490a00500bded52c97d235b7b4752f9f688566fe6de",
    "OwnerName": "acmes3bucketowner"
  },
  "Other": { "LightPen": "blinky", "SerialNo": "1234abcd"}  
}
```

## Id
<a name="asff-resources-id"></a>

给定资源类型的标识符。

对于 AWS 由 Amazon 资源名称 (ARNs) 标识的资源，这是 ARN。

对于缺少的 AWS 资源 ARNs，这是创建资源的 AWS 服务所定义的标识符。

对于非AWS 资源，这是与资源关联的唯一标识符。

**示例**

```
"Id": "arn:aws:s3:::amzn-s3-demo-bucket"
```

## 分区
<a name="asff-resources-partition"></a>

资源所在的分区。分区是一组 AWS 区域。每个分区的作用域 AWS 账户 仅限于一个分区。

支持以下分区：
+ `aws` – AWS 区域
+ `aws-cn` – 中国区域
+ `aws-us-gov` – AWS GovCloud (US) Region

**示例**

```
"Partition": "aws"
```

## Region
<a name="asff-resources-region"></a>

此资源 AWS 区域 所在位置的代码。有关区域代码的列表，请参阅[区域端点](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints)。

**示例**

```
"Region": "us-west-2"
```

## ResourceRole
<a name="asff-resources-resourcerole"></a>

标识资源在调查发现中的作用。资源要么是调查发现活动的目标，要么是执行该活动的行为者。

**示例**

```
"ResourceRole": "target"
```

## 标签
<a name="asff-resources-tags"></a>

此字段会提供调查发现中涉及的资源的标签的键值信息。您可以为标记 API `GetResources` 操作[支持的资源](https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html) AWS Resource Groups 添加标签。Security Hub CSPM 通过[服务相关角色](using-service-linked-roles.md)调用此操作，如果 AWS 安全调查结果格式 (ASFF) `Resource.Id` 字段填充了资源 ARN，则会检索资源标签。 AWS 无效 IDs 的资源将被忽略。

您可以向 Security Hub CSPM 提取的调查结果（包括来自集成产品 AWS 服务 和第三方产品的发现）添加资源标签。

添加标签会指明在处理调查发现时与资源关联的标签的列表。您仅可以包含具有关联标签的资源的 `Tags` 属性。如果资源没有关联的标签，请不要在结果中包含 `Tags` 属性。

在调查发现中包含资源标签后，无需构建数据扩充管线或手动扩充调查发现的元数据。您还可以使用标签搜索或筛选调查发现和见解，并创建[自动化规则](automation-rules.md)。

有关适用于标签的限制的信息，请参阅 [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)。

您只能在此字段中提供 AWS 资源上存在的标签。要提供未在 AWS 安全调查结果格式中定义的数据，请使用`Other`详细信息子字段。

**示例**

```
"Tags": {
    "billingCode": "Lotus-1-2-3",
    "needsPatching": "true"
}
```

## Type
<a name="asff-resources-type"></a>

要为其提供详细信息的资源的类型。

如果可能，使用提供的资源类型之一，例如 `AwsEc2Instance` 或 `AwsS3Bucket`。

如果资源类型与提供的任何资源类型不匹配，则将资源 `Type` 设置为 `Other`，并使用 `Other` 详细信息子字段填写详细信息。

支持的值列在[资源](asff-resources.md)下。

**示例**

```
"Type": "AwsS3Bucket"
```