

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

# AWS 支持 的监控和日志记录
<a name="monitoring-overview"></a>

监控是保持 支持 和您的其他 AWS 解决方案的可靠性、可用性和性能的重要方面。AWS 提供了以下一些监控工具来监控 支持、在出现错误时进行报告并适时自动采取措施。
+ *Amazon EventBridge* 提供近乎实时的系统事件流，这些系统事件描述了 AWS 资源中的更改。EventBridge 支持自动事件驱动型计算，因为您可以编写规则，以监控某些事件，并在这些事件发生时在其他 AWS 服务中触发自动操作。有关更多信息，请参阅 [Amazon EventBridge 用户指南](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html)。
+ *AWS CloudTrail* 捕获由您的 AWS 账户或代表该账户发出的 API 调用和相关事件，并将日志文件传输到您指定的 Amazon S3 桶。您可以标识哪些用户和账户调用了 AWS、发出调用的源 IP 地址以及调用的发生时间。有关更多信息，请参阅[《AWS CloudTrail 用户指南》](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)。

**Topics**
+ [

# 使用 Ama AWS 支持 zon 集成到事件驱动的应用程序中 EventBridge
](eventbridge-integration.md)
+ [

# 使用记录 AWS 支持 API 调用 AWS CloudTrail
](logging-using-cloudtrail.md)
+ [

# 在 Slack API 调用中使用登录 AWS 支持 应用程序 AWS CloudTrail
](logging-using-cloudtrail-support-app.md)

# 使用 Ama AWS 支持 zon 集成到事件驱动的应用程序中 EventBridge
<a name="eventbridge-integration"></a>

您可以将事件驱动的应用程序 (EDAs) 整合 AWS 支持 到事件驱动的应用程序中，这些应用程序使用中发生的事件在 AWS 支持 应用程序组件之间进行通信并启动下游进程。

例如，每当您的账户中发生以下 AWS 支持 事件时，您都会收到通知：
+ 创建、解决或重新打开支持案例
+ 将通信添加到现有支持案例

为此，您可以使用 Amazon EventBridge 将事件从其他软件组件路由 AWS 支持 到其他软件组件。Amazon EventBridge 是一项无服务器服务，它使用事件将应用程序组件连接在一起，这样您就可以更轻松地将 AWS 服务集成 AWS 支持 到事件驱动的架构中，而无需额外的代码和操作。

## 如何 EventBridge 路由 AWS 支持 事件
<a name="eventbridge-routes-service-events-aws.support"></a>

以下是处理 AWS 支持 事件的 EventBridge 方式：

与许多 AWS 服务一样， AWS 支持 生成事件并将其发送到 EventBridge 默认*事件总线*。事件总线是接收事件并将其路由到您所指定的目的地或*目标*的路由器。目标可以包括其他 AWS 服务、定制应用程序和 SaaS 合作伙伴应用程序。

EventBridge 根据您在事件总线上创建的*规则*对事件进行路由。对于每条规则，您可以指定筛选条件或*事件模式*，以便仅选择所需的事件。每当向事件总线发送事件时，都要将其 EventBridge 与每条规则进行比较。如果事件符合规则，则将事件 EventBridge 路由到指定的目标。

![\[AWS 服务将事件发送到 EventBridge 默认事件总线。如果事件与规则的事件模式匹配，则会将该事件 EventBridge 路由到为该规则指定的目标。\]](http://docs.aws.amazon.com/zh_cn/awssupport/latest/user/images/eventbridge-integration-how-it-works.png)


## AWS 支持 事件
<a name="supported-events"></a>

AWS 支持 自动将以下事件发送到默认 EventBridge 事件总线。


| 事件详细信息类型 | 说明 | 
| --- | --- | 
|  [支持案例更新](event-detail-support-case-update.md)  |  表示支持案例中的更改。  | 

### 事件结构
<a name="eventbridge-event-structure"></a>

来自 AWS 服务的所有事件都包含两种类型的数据：
+ 一组常用字段，其中包含有关事件的元数据，例如作为事件来源的 AWS 服务、事件的生成时间、事件发生的账户和地区等。有关这些常规字段的定义，请参阅 *Amazon Events 参考中的 EventBridge 事件*[结构](https://docs.aws.amazon.com/eventbridge/latest/ref/overiew-event-structure.html)。
+ `detail` 字段包含该特定服务事件专有的数据。

### AWS 支持 活动通过以下方式交付 AWS CloudTrail
<a name="eventbridge-events-via-cloudtrail"></a>

AWS 服务可以将事件直接发送到 EventBridge 默认事件总线。此外，还 AWS CloudTrail 会向发送源自多个 AWS 服务的事件。 EventBridge 这些事件可能包括 API 调用、控制台登录和操作、服务事件和 Ins CloudTrail ights。有关更多信息，请参阅《*EventBridge 用户指南》 AWS CloudTrail*中的[通过交付的AWS 服务事件](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event-cloudtrail.html)。

有关发送到 AWS 支持 的事件列表 EventBridge，请参阅《[https://docs.aws.amazon.com/eventbridge/latest/ref/welcome.html](https://docs.aws.amazon.com/eventbridge/latest/ref/welcome.html)》中的 AWS 支持 主题。

## 创建与事件匹配 AWS 支持 的事件模式
<a name="eventbridge-event-delivery-filter"></a>

事件模式是一种筛选条件，用于指定您要选择的事件应包含的数据。

每个事件模式是一个 JSON 对象，其中包含：
+ 标识发送事件的服务的 `source` 属性。对于 AWS 支持 事件，来源是`aws.support`。
+ （可选）：包含要匹配的事件名称数组的 `detail-type` 属性。
+ （可选）：包含要匹配的其他事件数据的 `detail` 属性。

例如，以下事件模式将从 AWS 支持中选择所有支持案例更新事件：

```
{
  "source": ["aws.support"],
  "detail-type": ["Support Case Update"]
}
```

通过在事件本身中包含值，让事件选择更具针对性。例如，以下事件模式与代表正重新打开的案例的支持案例更新事件相匹配：

```
{
  "source": ["aws.support"],
  "detail-type": ["Support Case Update"],
  "detail": {
      "event-name": "ReopenCase"
    }
}
```

有关写入事件模式的更多信息，请参阅《EventBridge 用户指南》**中的[事件模式](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html)。

### 另请参阅
<a name="see-also-eventbridge-support"></a>

有关如何 EventBridge 与一起使用的更多信息 AWS 支持，请参阅以下资源：
+ [如何使用亚马逊自动执行 AWS 支持 API EventBridge](https://aws.amazon.com/blogs/mt/how-to-automate-aws-support-api-with-amazon-eventbridge)
+ [AWS 支持 案例活动通知器已](https://github.com/aws-samples/aws-support-case-activity-notifier)开启 GitHub

# 支持案例更新事件
<a name="event-detail-support-case-update"></a>

以下是 `Support Case Update` 事件的详细信息字段。

下面包含`source`和`detail-type`字段，因为它们包含 AWS 支持 事件的特定值。有关所有事件中包含的其他元数据字段的定义，请参阅 *Amazon Events 参考中的 EventBridge 事件*[结构](https://docs.aws.amazon.com/eventbridge/latest/ref/overiew-event-structure.html)。

```
{
  . . .,
  "detail-type": "Support Case Update",
  "source": "aws.support",
  . . .,
  "detail": {
    "case-id" : "string",
    "display-id" : "string",
    "communication-id" : "string",
    "event-name" : "string",
    "origin" : "string"
  }
}
```

`detail-type`  <a name="support-case-update-detail-type"></a>
标识事件的类型。  
对于这一事件，此值为 `Support Case Update`。

`source`  <a name="support-case-update-source"></a>
标识生成事件的服务。对于 AWS 支持 事件，此值为`aws.support`。

`detail`  <a name="support-case-update-detail"></a>
包含关于事件信息的 JSON 对象。生成事件的服务决定该字段的内容。  
对于此事件，此数据包括：    
`case-id`  <a name="support-case-update-case-id"></a>
支持案例 ID。案例 ID 是一个字母数字字符串，格式如下：case-*12345678910-2013-c4c1d2bf33c5cf47*。  
`display-id`  <a name="support-case-update-display-id"></a>
 AWS 支持 中心页面上案例的标识符。  
`communication-id`  <a name="support-case-update-communication-id"></a>
通信 ID。  
`event-name`  <a name="support-case-update-event-name"></a>
*有效值*：`CreateCase` \$1 `AddCommunicationToCase` \$1 `ResolveCase` \$1 `ReopenCase`  
指定支持案例事件的类型。  
`origin`  <a name="support-case-update-origin"></a>
*有效值*：`AWS` \$1 `CUSTOMER`  
指定您或 AWS 支持 代理是否在支持案例中添加了案例通信。  
目前，仅 `event-name` 为 `AddCommunicationToCase` 的事件会包含此值。

**Example 支持案例更新事件示例：支持案例已创建**  <a name="event-detail-support-case-update.example-1"></a>

```
{
    "version": "0",
    "id": "3433df007-9285-55a3-f6d1-536944be45d7",
    "detail-type": "Support Case Update",
    "source": "aws.support",
    "account": "111122223333",
    "time": "2022-02-21T15:51:19Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "case-id": "case-111122223333-muen-2022-7118885805350839",
        "display-id": "1234563851",
        "communication-id": "",
        "event-name": "CreateCase",
        "origin": ""
    }
}
```

**Example Support Case Update 事件示例：对支持案例的 AWS 支持 回复**  <a name="event-detail-support-case-update.example-2"></a>

```
{
    "version": "0",
    "id": "f90cb8cb-32be-1c91-c0ba-d50b4ca5e51b",
    "detail-type": "Support Case Update",
    "source": "aws.support",
    "account": "111122223333",
    "time": "2022-02-21T15:51:31Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "case-id": "case-111122223333-muen-2022-7118885805350839",
        "display-id": "1234563851",
        "communication-id": "ekko:us-east-1:12345678-268a-424b-be08-54613cab84d2",
        "event-name": "AddCommunicationToCase",
        "origin": "AWS"
    }
}
```

**Example 支持案例更新事件示例：支持案例已解决**  <a name="event-detail-support-case-update.example-3"></a>

```
{
    "version": "0",
    "id": "1aa4458d-556f-732e-ddc1-4a5b2fbd14a5",
    "detail-type": "Support Case Update",
    "source": "aws.support",
    "account": "111122223333",
    "time": "2022-02-21T15:51:31Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "case-id": "case-111122223333-muen-2022-7118885805350839",
        "display-id": "1234563851",
        "communication-id": "",
        "event-name": "ResolveCase",
        "origin": ""
    }
}
```

**Example 支持案例更新事件示例：支持案例已重新打开**  <a name="event-detail-support-case-update.example-4"></a>

```
{
    "version": "0",
    "id": "3bb9d8fe-6089-ad27-9508-804209b233ad",
    "detail-type": "Support Case Update",
    "source": "aws.support",
    "account": "111122223333",
    "time": "2022-02-21T15:47:19Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "case-id": "case-111122223333-muen-2021-27f40618fe0303ea",
        "display-id": "1234563851",
        "communication-id": "",
        "event-name": "ReopenCase",
        "origin": ""
    }
}
```

# 使用记录 AWS 支持 API 调用 AWS CloudTrail
<a name="logging-using-cloudtrail"></a>

AWS 支持 与 AWS CloudTrail一项服务集成，该服务提供用户、角色或 AWS 服务在中执行的操作的记录 AWS 支持。 CloudTrail 将发出的 API 调用捕获 AWS 支持 为事件。捕获的调用包括来自 AWS 支持 控制台的调用和对 AWS 支持 API 操作的代码调用。

如果您创建跟踪，则可以允许持续向亚马逊简单存储服务 (Amazon S3) Storage Service 存储桶传送 CloudTrail 事件，包括的事件。 AWS 支持如果您未配置跟踪，您仍然可以在 CloudTrail 控制台的 “事件**历史记录” 中查看最新的事件**。

使用收集的信息 CloudTrail，您可以确定向哪个请求发出 AWS 支持、发出请求的 IP 地址、谁发出了请求、何时发出请求以及其他详细信息。

要了解更多信息 CloudTrail，包括如何配置和启用它，请参阅《[AWS CloudTrail 用户指南》](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)。

## AWS 支持 信息在 CloudTrail
<a name="aws-support-info-in-cloudtrail-history"></a>

CloudTrail 在您创建 AWS 账户时已在您的账户上启用。当支持的事件活动发生在中时 AWS 支持，该活动会与其他 AWS 服务 CloudTrail 事件一起记录在**事件历史**记录中。您可以在自己的 AWS 账户中查看、搜索和下载最近发生的事件。有关更多信息，请参阅[使用事件历史查看 CloudTrail 事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)。

要持续记录您 AWS 账户中的事件，包括其中的事件 AWS 支持，请创建*跟踪*。跟踪允许 CloudTrail 将日志文件传输到 Amazon S3 存储桶。预设情况下，在控制台中创建跟踪时，此跟踪应用于所有 AWS 区域。跟踪记录 AWS 分区中所有区域的事件，并将日志文件传送到您指定的 Amazon S3 存储桶。此外，您可以配置其他 AWS 服务，以进一步分析 CloudTrail 日志中收集的事件数据并对其采取行动。有关更多信息，请参阅下列内容：
+ [创建跟踪记录概述](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail 支持的服务和集成](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations)
+ [配置 Amazon SNS 通知 CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html)
+ [从多个区域接收 CloudTrail 日志文件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html)和[从多个账户中接收 CloudTrail 日志文件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

所有 AWS 支持 API 操作均由《API 参考》记录 CloudTrail 并记录在《[AWS 支持 API 参考](https://docs.aws.amazon.com/awssupport/latest/APIReference/)》中。

例如，调用`DescribeCases`和`ResolveCase`操作会在 CloudTrail 日志文件中生成条目。`CreateCase`

每个事件或日志条目都包含有关生成请求的人员信息。身份信息有助于您确定以下内容：
+ 请求是使用根证书还是 AWS Identity and Access Management (IAM) 用户凭证发出。
+ 请求是使用角色还是联合用户的临时安全凭证发出的。
+ 请求是否由其他 AWS 服务发出。

有关更多信息，请参阅 [CloudTrail userIdentity 元素](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)。

您还可以将来自多个 AWS 区域和多个 AWS 账户的 AWS 支持 日志文件聚合到单个 Amazon S3 存储桶中。

## AWS Trusted Advisor CloudTrail 日志中的信息
<a name="cloudtrail-logging-for-trusted-advisor"></a>

Trusted Advisor 是一项 AWS 支持 服务，您可以使用它来检查您的 AWS 账户，以了解节省成本、提高安全性和优化账户的方法。

所有 Trusted Advisor API 操作均由《API 参考》记录 CloudTrail 并记录在《[AWS 支持 API 参考](https://docs.aws.amazon.com/awssupport/latest/APIReference/)》中。

例如，调用`DescribeTrustedAdvisorCheckResult`和`RefreshTrustedAdvisorCheck`操作会在 CloudTrail 日志文件中生成条目。`DescribeTrustedAdvisorCheckRefreshStatuses`

**注意**  
CloudTrail 还会记录 Trusted Advisor 控制台操作。请参阅[使用记录 AWS Trusted Advisor 控制台操作 AWS CloudTrail](logging-using-cloudtrail-for-aws-trusted-advisor.md)。

## 了解 AWS 支持 日志文件条目
<a name="understanding-aws-support-entries"></a>

跟踪是一种配置，允许将事件作为日志文件传输到您指定的 Amazon S3 存储桶。 CloudTrail 日志文件包含一个或多个日志条目。事件表示来自任何源的单个请求。它包括有关请求的操作、操作的日期和时间、请求参数等的信息。 CloudTrail 日志文件不是公共 API 调用的有序堆栈跟踪，因此它们不会按任何特定的顺序出现。

**Example : 日志条目 CreateCase**  
以下示例显示了该[CreateCase](https://docs.aws.amazon.com/awssupport/latest/APIReference/API_CreateCase.html)操作的 CloudTrail 日志条目。  

```
{
   "Records": [
      {
         "eventVersion": "1.04",
         "userIdentity": {
            "type": "IAMUser",
            "principalId": "AIDACKCEVSQ6C2EXAMPLE",
            "arn": "arn:aws:iam::111122223333:user/janedoe",
            "accountId": "111122223333",
            "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
            "userName": "janedoe",
            "sessionContext": {
               "attributes": {
                  "mfaAuthenticated": "false",
                  "creationDate": "2016-04-13T17:51:37Z"
               }
            },
            "invokedBy": "signin.amazonaws.com"
         },
         "eventTime": "2016-04-13T18:05:53Z",
         "eventSource": "support.amazonaws.com",
         "eventName": "CreateCase",
         "awsRegion": "us-east-1",
         "sourceIPAddress": "198.51.100.15",
         "userAgent": "signin.amazonaws.com",
         "requestParameters": {
            "severityCode": "low",
            "categoryCode": "other",
            "language": "en",
            "serviceCode": "support-api",
            "issueType": "technical"
         },
         "responseElements": {
            "caseId": "case-111122223333-muen-2016-c3f2077e504940f2"
         },
         "requestID": "58c257ef-01a2-11e6-be2a-01c031063738",
         "eventID": "5aa34bfc-ad5b-4fb1-8a55-2277c86e746a",
         "eventType": "AwsApiCall",
         "recipientAccountId": "111122223333"
      }
   ],
   ...
}
```

**Example : 日志条目 RefreshTrustedAdvisorCheck**  
以下示例显示了该[RefreshTrustedAdvisorCheck](https://docs.aws.amazon.com/awssupport/latest/APIReference/API_RefreshTrustedAdvisorCheck.html)操作的 CloudTrail 日志条目。  

```
{
    "eventVersion": "1.05",
    "userIdentity": {
        "type": "IAMUser",
        "principalId": "AIDACKCEVSQ6C2EXAMPLE",
        "arn": "arn:aws:iam::111122223333:user/Admin",
        "accountId": "111122223333",
        "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
        "userName": "Admin"
    },
    "eventTime": "2020-10-21T16:34:13Z",
    "eventSource": "support.amazonaws.com",
    "eventName": "RefreshTrustedAdvisorCheck",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "72.21.198.67",
    "userAgent": "signin.amazonaws.com",
    "requestParameters": {
        "checkId": "Pfx0RwqBli"
    },
    "responseElements": null,
    "requestID": "4c4d5fc8-c403-4f82-9544-41f820e0fa01",
    "eventID": "2f4630ac-5c27-4f0d-b93f-63742d6fc85e",
    "eventType": "AwsApiCall",
    "recipientAccountId": "111122223333"
}
```

# 在 Slack API 调用中使用登录 AWS 支持 应用程序 AWS CloudTrail
<a name="logging-using-cloudtrail-support-app"></a>

Slack 中的 AWS 支持 应用程序已与集成。 AWS CloudTrail CloudTrail 提供用户、角色或 AWS 支持 应用程序 AWS 服务 中执行的操作的记录。要创建此记录，请将 AWS 支持 应用程序的所有公共 API 调用 CloudTrail 捕获为事件。这些捕获的调用包括来自 AWS 支持 应用程序控制台的调用以及对 AWS 支持 应用程序公共 API 操作的代码调用。如果您创建了跟踪，则可以将 CloudTrail 事件持续传输到 Amazon S3 存储桶。其中包括 AWS 支持 App 的事件。如果您未配置跟踪，您仍然可以在 CloudTrail 控制台的 “事件**历史记录” 中查看最新的事件**。您可以使用 CloudTrail 收集到的信息来确定是向 AWS 支持 App 发出的请求。您还可以了解发起调用的 IP 地址、请求方、请求时间以及其他详细信息。

要了解更多信息 CloudTrail，请参阅《[AWS CloudTrail 用户指南》](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)。

## AWS 支持 中的应用程序信息 CloudTrail
<a name="service-name-info-in-cloudtrail-support-app"></a>

当你创建自己的账户时 AWS 账户，它会在账户 CloudTrail 上激活。当 AWS 支持 应用程序中发生公共 API 活动时，该活动会与其他 AWS 服务 CloudTrail 事件一起记录在**事件历史**记录中。您可以在中查看、搜索和下载最近发生的事件 AWS 账户。有关更多信息，请参阅[使用事件历史记录查看 CloudTrail 事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)。

要持续记录您的事件 AWS 账户，包括 AWS 支持 应用程序的事件，请创建*跟踪*。默认情况下，在控制台中创建跟踪记录时，此跟踪记录应用于所有 AWS 区域。此跟踪记录在 AWS 分区中记录所有区域中的事件，并将日志文件传送至您指定的 Amazon S3 存储桶。此外，您可以配置其他， AWS 服务 以进一步分析 CloudTrail 日志中收集的事件数据并对这些数据进行操作。有关更多信息，请参阅下列内容：
+ [创建跟踪记录概述](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail 支持的服务和集成](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html)
+ [配置 Amazon SNS 通知 CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/configure-sns-notifications-for-cloudtrail.html)
+ [接收来自多个区域的 CloudTrail 日志文件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html)和[接收来自多个账户的 CloudTrail 日志文件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

CloudTrail 记录所有公共 AWS 支持 应用程序操作。这些操作也记录在 [AWS 支持 App in Slack API Reference](https://docs.aws.amazon.com/supportapp/latest/APIReference/Welcome.html) 中。例如，调用`GetAccountAlias`和`UpdateSlackChannelConfiguration`操作会在 CloudTrail 日志文件中生成条目。`CreateSlackChannelConfiguration`

每个事件或日志条目都包含有关生成请求的人员信息。身份信息有助于您确定以下内容：
+ 请求是使用根证书还是 AWS Identity and Access Management (IAM) 用户凭证发出。
+ 请求是使用角色还是联合用户的临时安全凭证发出的。
+ 请求是否由其他 AWS 服务发出。

有关更多信息，请参阅 [CloudTrail userIdentity 元素](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)。

## 了解 AWS 支持 应用程序日志文件条目
<a name="understanding-service-name-entries-support-app"></a>

跟踪是一种配置，允许将事件作为日志文件传输到您指定的 Amazon S3 存储桶。 CloudTrail 日志文件包含一个或多个日志条目。事件代表来自任何来源的单个请求，包括有关请求的操作、操作的日期和时间、请求参数等的信息。 CloudTrail 日志文件不是公共 API 调用的有序堆栈跟踪。这意味着这些日志不会按任何特定顺序显示。

**Example ：`CreateSlackChannelConfiguration` 的日志示例**  
以下示例显示了该[CreateSlackChannelConfiguration](https://docs.aws.amazon.com/supportapp/latest/APIReference/API_CreateSlackChannelConfiguration.html)操作的 CloudTrail 日志条目。  

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AIDACKCEVSQ6C2EXAMPLE:JaneDoe",
        "arn": "arn:aws:sts::111122223333:assumed-role/Administrator/JaneDoe",
        "accountId": "111122223333",
        "accessKeyId": "AKIAI44QH8DHBEXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AIDACKCEVSQ6C2EXAMPLE",
                "arn": "arn:aws:iam::111122223333:role/Administrator",
                "accountId": "111122223333",
                "userName": "Administrator"
            },
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2022-02-26T01:37:57Z",
                "mfaAuthenticated": "false"
            }
        }
    },
    "eventTime": "2022-02-26T01:48:20Z",
    "eventSource": "supportapp.amazonaws.com",
    "eventName": "CreateSlackChannelConfiguration",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "205.251.233.183",
    "userAgent": "aws-cli/1.3.23 Python/2.7.6 Linux/2.6.18-164.el5",
    "requestParameters": {
        "notifyOnCreateOrReopenCase": true,
        "teamId": "T012ABCDEFG",
        "notifyOnAddCorrespondenceToCase": true,
        "notifyOnCaseSeverity": "all",
        "channelName": "troubleshooting-channel",
        "notifyOnResolveCase": true,
        "channelId": "C01234A5BCD",
        "channelRoleArn": "arn:aws:iam::111122223333:role/AWSSupportAppRole"
    },
    "responseElements": null,
    "requestID": "d06df6ca-c233-4ffb-bbff-63470c5dc255",
    "eventID": "0898ce29-a396-444a-899d-b068f390c361",
    "readOnly": false,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "111122223333",
    "eventCategory": "Management"
}
```

**Example ：`ListSlackChannelConfigurations` 的日志示例**  
以下示例显示了该[ListSlackChannelConfigurations](https://docs.aws.amazon.com/supportapp/latest/APIReference/API_ListSlackChannelConfigurations.html)操作的 CloudTrail 日志条目。  

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AIDACKCEVSQ6C2EXAMPLE:AWSSupportAppRole",
        "arn": "arn:aws:sts::111122223333:assumed-role/AWSSupportAppRole",
        "accountId": "111122223333",
        "accessKeyId": "AKIAI44QH8DHBEXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AIDACKCEVSQ6C2EXAMPLE",
                "arn": "arn:aws:iam::111122223333:role/AWSSupportAppRole",
                "accountId": "111122223333",
                "userName": "AWSSupportAppRole"
            },
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2022-03-01T20:06:32Z",
                "mfaAuthenticated": "false"
            }
        }
    },
    "eventTime": "2022-03-01T20:06:46Z",
    "eventSource": "supportapp.amazonaws.com",
    "eventName": "ListSlackChannelConfigurations",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "72.21.217.131",
    "userAgent": "aws-cli/1.3.23 Python/2.7.6 Linux/2.6.18-164.el5",
    "requestParameters": null,
    "responseElements": null,
    "requestID": "20f81d63-31c5-4351-bd02-9eda7f76e7b8",
    "eventID": "70acb7fe-3f84-47cd-8c28-cc148ad06d21",
    "readOnly": true,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "111122223333",
    "eventCategory": "Management"
}
```

**Example ：`GetAccountAlias` 的日志示例**  
以下示例显示了该[GetAccountAlias](https://docs.aws.amazon.com/supportapp/latest/APIReference/API_GetAccountAlias.html)操作的 CloudTrail 日志条目。  

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AIDACKCEVSQ6C2EXAMPLE:devdsk",
        "arn": "arn:aws:sts::111122223333:assumed-role/AWSSupportAppRole/devdsk",
        "accountId": "111122223333",
        "accessKeyId": "AKIAI44QH8DHBEXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AIDACKCEVSQ6C2EXAMPLE",
                "arn": "arn:aws:iam::111122223333:role/AWSSupportAppRole",
                "accountId": "111122223333",
                "userName": "AWSSupportAppRole"
            },
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2022-03-01T20:31:27Z",
                "mfaAuthenticated": "false"
            }
        }
    },
    "eventTime": "2022-03-01T20:31:47Z",
    "eventSource": "supportapp.amazonaws.com",
    "eventName": "GetAccountAlias",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "72.21.217.142",
    "userAgent": "aws-cli/1.3.23 Python/2.7.6 Linux/2.6.18-164.el5",
    "requestParameters": null,
    "responseElements": null,
    "requestID": "a225966c-0906-408b-b8dd-f246665e6758",
    "eventID": "79ebba8d-3285-4023-831a-64af7de8d4ad",
    "readOnly": true,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "111122223333",
    "eventCategory": "Management"
}
```