

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

# 证书存储审计日志
<a name="pkcs11-certificate-storage-audit-logs"></a>

 AWS CloudHSM 将修改数据的证书存储操作的审计日志写入集群 CloudWatch 日志组中单独的 A CloudWatch mazon Events 日志流。此日志流是为集群命名的，而不是为集群中的特定 HSM 命名的。

 有关访问审核日志的信息 CloudWatch，请参阅[使用 Amazon CloudWatch 日志和 AWS CloudHSM 审核日志](get-hsm-audit-logs-using-cloudwatch.md)。

## 日志条目字段
<a name="pkcs11-certificate-storage-audit-logs-fields"></a>

`object_handle`  
证书对象的唯一标识符。

`op_code`  
已执行或尝试的操作。可能的值：  
+ `CreateObject`
+ `DestroyObject`
+ `SetAttributeValues`

`response`  
如果操作成功则为 `OK`，或者是以下错误类型之一：  
+ `DuplicateAttribute`
+ `InvalidAttributeValue`
+ `ObjectNotFound`
+ `MaxObjectsReached`
+ `InternalFailure`

`attributes`  
修改的属性（如果有）。

`timestamp`  
操作发生的时间，用从 Unix epoch 以来的毫秒数表示。

## 审计日志示例
<a name="pkcs11-certificate-storage-audit-logs-examples"></a>

### CreateObject 示例
<a name="pkcs11-certificate-storage-audit-logs-examples-create"></a>

```
{
    "object_handle": 463180677312929947,
    "op_code": "CreateObject",
    "response": "OK",
    "attributes": null,
    "timestamp": 1725482483671
}
```

### DestroyObject 示例
<a name="pkcs11-certificate-storage-audit-logs-examples-delete"></a>

```
{
    "object_handle": 463180677312929947,
    "op_code": "DestroyObject",
    "response": "OK",
    "attributes": null,
    "timestamp": 1725482484559
}
```

### SetAttributeValues 示例
<a name="pkcs11-certificate-storage-audit-logs-examples-set"></a>

```
{
    "object_handle": 463180678453346687,
    "op_code": "SetAttributeValues",
    "response": "OK",
    "attributes": [
        "Label"
    ],
    "timestamp": 1725482488004
}
```

### 不成功的 CreateObject 例子
<a name="pkcs11-certificate-storage-audit-logs-examples-error"></a>

```
{
    "object_handle": null,
    "op_code": "CreateObject",
    "response": "MaxObjectsReached",
    "attributes": null,
    "timestamp": 1726084937125
}
```