使用 Amazon CloudTrail 记录 Amazon Web Services Support Plans API 调用 - Amazon Web Services Support
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

使用 Amazon CloudTrail 记录 Amazon Web Services Support Plans API 调用

Amazon Web Services Support Plans与 Amazon CloudTrail 集成,后者是记录用户、角色或 Amazon Web Service 所执行操作的服务。CloudTrail 将 Amazon Web Services Support Plans 的 API 调用作为事件捕获。捕获的调用包含来自 Amazon Web Services Support Plans 控制台和代码对 Amazon Web Services Support Plans API 操作的调用。

如果您创建跟踪记录,则可以使 CloudTrail 事件持续传送到 Amazon Simple Storage Service(Amazon S3)存储桶(包括 Amazon Web Services Support Plans 事件)。如果您不配置跟踪,则仍可在 CloudTrail 控制台中的 Event history(事件历史记录) 中查看最新事件。

使用 CloudTrail 收集的信息,您可以确定向 Amazon Web Services Support Plans 发出了什么请求、发出请求的 IP 地址、请求方、请求时间以及其他详细信息。

要了解有关 CloudTrail 的更多信息(包括如何对其进行配置和启用),请参阅 Amazon CloudTrail 用户指南

CloudTrail 中的 Amazon Web Services Support Plans 信息

在您创建 Amazon Web Services 账户 时,将在该账户上启用 CloudTrail。当 Amazon Web Services Support Plans 中发生受支持的事件活动时,该活动将记录在 CloudTrail 事件中,并与其他 Amazon Web Service 事件一同保存在 Event history(事件历史记录)中。您可以在 账户中查看、搜索和下载最新事件。有关更多信息,请参阅使用 CloudTrail 事件历史记录查看事件

要持续记录您的账户中的事件(包括 Amazon Web Services Support Plans 事件),请创建一个 trail(跟踪)。通过跟踪,CloudTrail 可将日志文件传送至 Amazon S3 桶。预设情况下,在控制台中创建跟踪记录时,此跟踪记录应用于所有Amazon Web Services 区域。此跟踪记录在 Amazon 分区中记录所有区域中的事件,并将日志文件传送至您指定的 Simple Storage Service(Amazon S3)桶。此外,您可以配置其他 Amazon Web Services,进一步分析在 CloudTrail 日志中收集的事件数据并采取行动。有关更多信息,请参阅下列内容:

所有的 Amazon Web Services Support Plans API 操作均由 CloudTrail 记录。每个事件或日志条目都包含有关生成请求的人员信息。身份信息可帮助您确定以下内容:

  • 请求是使用根用户凭证还是 Amazon Identity and Access Management(IAM) 用户凭证发出的。

  • 请求是使用角色还是联合身份用户的临时安全凭证发出的。

  • 请求是否由其他 Amazon Web Service 发出。

有关更多信息,请参阅 CloudTrail userIdentity 元素

您也可以将多个 Amazon Web Services 区域 和多个账户的 Amazon Web Services Support Plans 日志文件聚合到单个 Amazon S3 存储桶中。

了解 Amazon Web Services Support Plans 日志文件条目

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

例 :GetSupportPlan 的日志条目

以下示例显示了 GetSupportPlan 操作的 CloudTrail 日志条目。

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:sts::111122223333:user/janedoe", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:iam::111122223333:role/Admin", "accountId": "111122223333", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-06-29T16:30:04Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-06-29T16:39:11Z", "eventSource": "supportplans.amazonaws.com", "eventName": "GetSupportPlan", "awsRegion": "us-west-2", "sourceIPAddress": "205.251.233.183", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0", "requestParameters": null, "responseElements": null, "requestID": "7665c39a-d6bf-4d0d-8010-2f59740b8ecb", "eventID": "b711bc30-16a5-4579-8f0d-9ada8fe6d1ce", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
例 :GetSupportPlanUpdateStatus 的日志条目

以下示例显示了 GetSupportPlanUpdateStatus 操作的 CloudTrail 日志条目。

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:sts::111122223333:user/janedoe", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:iam::111122223333:role/Admin", "accountId": "111122223333", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-06-29T16:30:04Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-06-29T16:39:02Z", "eventSource": "supportplans.amazonaws.com", "eventName": "GetSupportPlanUpdateStatus", "awsRegion": "us-west-2", "sourceIPAddress": "205.251.233.183", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0", "requestParameters": { "supportPlanUpdateArn": "arn:aws:supportplans::111122223333:supportplanupdate/7f03b7a233a0e87ebc79e56d4d2bcaf19e976c37a2756181cec1b17f95da4310" }, "responseElements": null, "requestID": "75e5c767-8703-4ed3-b01e-4dda28020322", "eventID": "28d1c0e3-ccb6-4fd1-8793-65be010114cc", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
例 :StartSupportPlanUpdate 的日志条目

以下示例显示了 StartSupportPlanUpdate 操作的 CloudTrail 日志条目。

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:sts::111122223333:user/janedoe", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:iam::111122223333:role/Admin", "accountId": "111122223333", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "creationDate": "2022-06-29T16:30:04Z", "mfaAuthenticated": "false" } } }, "eventTime": "2022-06-29T16:38:55Z", "eventSource": "supportplans.amazonaws.com", "eventName": "StartSupportPlanUpdate", "awsRegion": "us-west-2", "sourceIPAddress": "205.251.233.183", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0", "requestParameters": { "clientToken": "98add111-dcc9-464d-8722-438d697fe242", "update": { "supportLevel": "BASIC" } }, "responseElements": { "Access-Control-Expose-Headers": "x-amzn-RequestId,x-amzn-ErrorType,x-amzn-ErrorMessage,Date", "supportPlanUpdateArn": "arn:aws:supportplans::111122223333:supportplanupdate/7f03b7a233a0e87ebc79e56d4d2bcaf19e976c37a2756181cec1b17f95da4310" }, "requestID": "e5ff9382-5fb8-4764-9993-0f33fb0b1e17", "eventID": "5dba89f8-2e5b-42b9-9b8f-395580c52962", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }
例 :CreateSupportPlanSchedule 的日志条目

以下示例显示了 CreateSupportPlanSchedule 操作的 CloudTrail 日志条目。

{ "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:sts::111122223333:user/janedoe", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AIDACKCEVSQ6C2EXAMPLE", "arn": "arn:aws:iam::111122223333:role/Admin", "accountId": "111122223333", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "creationDate": "2023-05-09T16:30:04Z", "mfaAuthenticated": "false" } } }, "eventTime": "2023-05-09T16:30:04Z", "eventSource": "supportplans.amazonaws.com", "eventName": "CreateSupportPlanSchedule", "awsRegion": "us-west-2", "sourceIPAddress": "205.251.233.183", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0", "requestParameters": { "clientToken": "b998de5e-ad1c-4448-90db-2bf86d6d9e9a", "scheduleCreationDetails": { "startLevel": "BUSINESS", "startOffer": "TrialPlan7FB93B", "startTimestamp": "2023-06-03T17:23:56.109Z", "endLevel": "BUSINESS", "endOffer": "StandardPlan2074BB", "endTimestamp": "2023-09-03T17:23:55.109Z" } }, "responseElements": { "Access-Control-Expose-Headers": "x-amzn-RequestId,x-amzn-ErrorType,x-amzn-ErrorMessage,Date", "supportPlanUpdateArn": "arn:aws:supportplans::111122223333:supportplanschedule/b9a9a4336a3974950a6e670f7dab79b77a4b104db548a0d57050ce4544721d4b" }, "requestID": "150450b8-e61a-4b15-93a8-c3b557a1ca48", "eventID": "a2a1ba44-610d-4dc8-bf16-29f1635b57a9", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "111122223333", "eventCategory": "Management" }

记录对您的 Amazon Web Services Support 计划的更改

重要

自 2022 年 8 月 3 日起,以下操作已弃用,将不会出现在您的新 CloudTrail 日志中。有关支持的操作的列表,请参阅 了解 Amazon Web Services Support Plans 日志文件条目

  • DescribeSupportLevelSummary – 当您打开 Support 计划页面时,此操作显示在您的日志中。

  • UpdateProbationAutoCancellation – 当您注册开发人员支持计划或业务支持计划,然后尝试在 30 天内取消后,您的计划将在该期限结束时自动取消。当您在 Support plans(支持计划)页面中显示的横幅中选择 Opt-out of automatic cancellation(退出自动取消)时,此操作显示在您的日志中。您将恢复您的开发人员支持或业务支持计划。

  • UpdateSupportLevel – 当您更改支持计划时,此操作显示在您的日志中。

注意

eventSource 字段具有这些操作的 support-subscription.amazonaws.com 命名空间。

例 :DescribeSupportLevelSummary 的日志条目

以下示例显示了用于 DescribeSupportLevelSummary 操作的 CloudTrail 日志条目。

{ "eventVersion": "1.08", "userIdentity": { "type": "Root", "principalId": "111122223333", "arn": "arn:aws:iam::111122223333:root", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": {}, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2021-01-07T22:08:05Z" } } }, "eventTime": "2021-01-07T22:08:07Z", "eventSource": "support-subscription.amazonaws.com", "eventName": "DescribeSupportLevelSummary", "awsRegion": "us-east-1", "sourceIPAddress": "100.127.8.67", "userAgent": "AWS-SupportPlansConsole, aws-internal/3", "requestParameters": { "lang": "en" }, "responseElements": null, "requestID": "b423b84d-829b-4090-a239-2b639b123abc", "eventID": "e1eeda0e-d77c-487b-a7e5-4014f7123abc", "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333" }
例 :UpdateProbationAutoCancellation 的日志条目

以下示例显示了用于 UpdateProbationAutoCancellation 操作的 CloudTrail 日志条目。

{ "eventVersion": "1.08", "userIdentity": { "type": "Root", "principalId": "111122223333", "arn": "arn:aws:iam::111122223333:root", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE" }, "eventTime": "2021-01-07T23:28:43Z", "eventSource": "support-subscription.amazonaws.com", "eventName": "UpdateProbationAutoCancellation", "awsRegion": "us-east-1", "sourceIPAddress": "100.127.8.67", "userAgent": "AWS-SupportPlansConsole, aws-internal/3", "requestParameters": { "lang": "en" }, "responseElements": null, "requestID": "5492206a-e200-4c33-9fcf-4162d4123abc", "eventID": "f4a58c09-0bb0-4ba2-a8d3-df6909123abc", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333" }
例 :UpdateSupportLevel 的日志条目

以下示例显示了用于更改开发人员支持计划的 UpdateSupportLevel 操作的 CloudTrail 日志条目。

{ "eventVersion": "1.08", "userIdentity": { "type": "Root", "principalId": "111122223333", "arn": "arn:aws:iam::111122223333:root", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": {}, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2021-01-07T22:08:05Z" } } }, "eventTime": "2021-01-07T22:08:43Z", "eventSource": "support-subscription.amazonaws.com", "eventName": "UpdateSupportLevel", "awsRegion": "us-east-1", "sourceIPAddress": "100.127.8.247", "userAgent": "AWS-SupportPlansConsole, aws-internal/3", "requestParameters": { "supportLevel": "new_developer" }, "responseElements": { "aispl": false, "supportLevel": "new_developer" }, "requestID": "5df3da3a-61cd-4a3c-8f41-e5276b123abc", "eventID": "c69fb149-c206-47ce-8766-8df6ec123abc", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "eventCategory": "Management", "recipientAccountId": "111122223333" }