使用 AWS CloudTrail 記錄 AWS Support Plans API 呼叫 - AWS Support

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

使用 AWS CloudTrail 記錄 AWS Support Plans API 呼叫

AWS Support Plans 整合了 AWS CloudTrail,這是一種提供使用者、角色或 AWS 服務 所採取之動作記錄的服務。CloudTrail 會擷取 AWS Support Plans 的 API 呼叫當作事件。擷取的呼叫包括從 AWS Support Plans 主控台進行的呼叫,以及針對 AWS Support Plans API 操作的程式碼呼叫。

如果您建立追蹤,就可以將 CloudTrail 事件持續提供給 Amazon Simple Storage Service (Amazon S3) 儲存貯體,包括 AWS Support Plans 的事件。即使您未設定追蹤,依然可以透過 CloudTrail 主控台中的 Event history (事件歷史記錄) 檢視最新事件。

您可以利用 CloudTrail 所收集的資訊來判斷向 AWS Support Plans 發出的請求,以及發出請求的 IP 地址、人員、時間和其他詳細資訊。

若要進一步了解 CloudTrail,包括如何設定及啟用,請參閱《AWS CloudTrail 使用者指南》

CloudTrail 中的 AWS Support Plans 資訊

當您建立帳戶時,系統即會在 AWS 帳戶 中啟用 CloudTrail。當 AWS Support Plans 發生支援的事件活動時,系統便會將該活動記錄至 CloudTrail 事件,並將其他 AWS 服務 事件記錄到 Event history (事件歷史記錄) 中。您可以檢視、搜尋和下載 帳戶的最新事件。如需詳細資訊,請參閱使用 CloudTrail 事件歷史記錄檢視事件

如需帳戶中正在進行事件的記錄 (包含 AWS Support Plans 的事件),請建立追蹤。追蹤能讓 CloudTrail 將日誌檔案交付至 Amazon S3 儲存貯體。依預設,當您在主控台中建立追蹤時,該追蹤會套用至所有的 AWS 區域。該追蹤會記錄來自 AWS 分割區中所有區域的事件,並將日誌檔案交付到您指定的 Amazon S3 儲存貯體。此外,您可以設定其他 AWS 服務 服務,以進一步分析和處理 CloudTrail 日誌中所收集的事件資料。如需詳細資訊,請參閱下列內容:

CloudTrail 會記錄全部 AWS Support Plans API 操作。每一筆事件或日誌項目都會包含產生請求者的資訊。身分資訊可協助您判斷下列事項:

  • 該請求是否透過根或 AWS Identity and Access Management (IAM) 使用者憑證來提出。

  • 提出該請求時,是否使用了特定角色或聯合身分使用者的暫時安全憑證。

  • 該請求是否由另一項 AWS 服務 服務提出。

如需詳細資訊,請參閱 CloudTrail userIdentity 元素

您也可以將來自多個 AWS 區域 和多個帳戶的 AWS Support Plans 日誌檔案彙總至單一 Amazon S3 儲存貯體。

了解 AWS 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" }

記錄 AWS Support 計劃的變更

重要

自 2022 年 8 月 3 日起,下列操作已停用,且不會出現在您的新 CloudTrail 日誌中。如需支援的操作清單,請參閱 了解 AWS Support Plans 日誌檔案項目

  • DescribeSupportLevelSummary - 您開啟 Support plans (支援計劃) 頁面時,此動作會出現在您的日誌中。

  • 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" }