

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

# 監控 AWS 最終使用者簡訊簡訊
<a name="monitoring-overview"></a>

監控是維護 AWS 最終使用者傳訊簡訊和其他 AWS 解決方案的可靠性、可用性和效能的重要部分。 AWS 提供下列監控工具來監看 AWS 最終使用者傳訊簡訊、在發生錯誤時回報，以及適時採取自動動作：
+ **Amazon CloudWatch** AWS 會即時監控您的 AWS 資源和您在 上執行的應用程式。您可以收集和追蹤指標、建立自訂儀板表，以及設定警示，在特定指標達到您指定的閾值時通知您或採取動作。例如，您可以讓 CloudWatch 追蹤 CPU 使用量或其他 Amazon EC2 執行個體指標，並在需要時自動啟動新的執行個體。如需詳細資訊，請參閱 [Amazon CloudWatch 使用者指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/)。
+ **Amazon CloudWatch Logs** 可讓您監控、存放和存取來自 Amazon EC2 執行個體、CloudTrail 及其他來源的日誌檔案。CloudWatch 可以監控日誌檔案中的資訊，並在達到特定閾值時通知您。您也可以將日誌資料存檔在高耐用性的儲存空間。如需詳細資訊，請參閱 [Amazon CloudWatch Logs 使用者指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/)。
+ **AWS CloudTrail** 會擷取由 AWS 您的帳戶發出或代表發出的 API 呼叫和相關事件，並將日誌檔案交付至您指定的 Amazon S3 儲存貯體。您可以識別呼叫的使用者和帳戶 AWS、進行呼叫的來源 IP 地址，以及呼叫的時間。如需詳細資訊，請參閱[「AWS CloudTrail 使用者指南」](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)。
+ **AWS Health 儀表板**， 可以檢查和監控 AWS 最終使用者傳訊簡訊環境的狀態。若要檢查 AWS 最終使用者簡訊簡訊服務的整體狀態，請使用 AWS 服務運作狀態儀表板。若要檢查、監控和檢視可能更具體地影響您 AWS 環境的任何事件或問題的歷史資料，請使用 AWS 個人運作狀態儀表板。若要進一步了解這些儀表板，請參閱[AWS Health 使用者指南](https://docs.aws.amazon.com/health/latest/ug/)。
+ **AWS Trusted Advisor ** 會檢查您的 AWS 環境，並提供建議，讓您有機會解決安全漏洞、改善系統可用性和效能，並節省成本。所有 AWS 客戶都可以存取一組核心 Trusted Advisor 檢查。擁有商業或企業支援計劃的客戶可以存取其他 Trusted Advisor 檢查。

  其中許多檢查可協助您評估 AWS 最終使用者簡訊簡訊資源的安全狀態，做為 AWS 您帳戶整體的一部分。例如，核心 Trusted Advisor 檢查組包括下列項目：
  + 針對每個支援的 ，記錄您 AWS 帳戶的組態 AWS 區域 。
  + Amazon Simple Storage Service (Amazon S3) 儲存貯體的存取許可，其中可能包含您匯入 AWS 最終使用者傳訊 SMS 以建置客群的檔案。
  + 使用 AWS Identity and Access Management 使用者、群組和角色來控制 AWS 最終使用者傳訊簡訊資源的存取。
  + 可能危及 AWS 環境和 AWS 最終使用者傳訊簡訊資源安全性的 IAM 組態和政策設定。

  如需詳細資訊，請參閱《支援 使用者指南》**中的 [AWS Trusted Advisor](https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html#trusted-advisor)。

**Topics**
+ [使用 CloudWatch 進行監控](monitoring-cloudwatch.md)
+ [建立 CloudWatch 警示](monitoring-sms-cw.md)
+ [監控支出](monitor-spending.md)
+ [CloudTrail 日誌](logging-using-cloudtrail.md)
+ [使用 EventBridge](monitor-event-bridge.md)

# 使用 Amazon CloudWatch 監控 AWS 最終使用者簡訊 SMS
<a name="monitoring-cloudwatch"></a>

您可以使用 CloudWatch 監控 AWS 最終使用者傳訊簡訊，它會收集原始資料並將其處理為可讀且近乎即時的指標。這些統計資料會保留 15 個月，以便您存取歷史資訊，並更清楚 Web 應用程式或服務的執行效能。您也可以設定留意特定閾值的警示，當滿足這些閾值時傳送通知或採取動作。如需詳細資訊，請參閱 [Amazon CloudWatch 使用者指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/)。

AWS 最終使用者傳訊簡訊使用 AWS Identity and Access Management (IAM) [服務連結角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts)。服務連結角色是直接連結至 AWS 最終使用者簡訊簡訊的唯一 IAM 角色類型。服務連結角色由 AWS 最終使用者簡訊簡訊預先定義，並包含該服務代表您呼叫其他 AWS 服務所需的所有許可。您必須為要收集的 CloudWatch 指標建立[服務連結角色](using-service-linked-roles.md#using-service-linked-roles.title)。

## AWS 最終使用者簡訊 SMS 的 CloudWatch 指標
<a name="cw-metrics"></a>

下列各節列出 AWS 最終使用者傳訊簡訊的指標和維度。

**重要**  
您必須為要收集的 CloudWatch 指標建立[服務連結角色](using-service-linked-roles.md#using-service-linked-roles.title)。

**注意**  
對於某些指標，由於服務的分散式性質，結果可能是近似值。在大多數情況下，計數應接近實際處理的訊息數量。

對於 AWS 最終使用者簡訊簡訊，您可能想要監看 **TextMessageMonthlySpend**、**MediaMessageMonthlySpend** 和 **VoiceMessageMonthlySpend**，並在大於或等於閾值時觸發警示。 AWS 最終使用者簡訊 SMS 的命名空間為 `AWS/SMSVoice`。

AWS 最終使用者傳訊簡訊也會在`AWS/SMSVoice`命名空間中發佈 RCS 特定的指標，包括 `RCS.MessagesSent`、 `RCS.MessagesDelivered`和 `RCS.MessagesFallenBackToSMS`。現有的指標現在包含具有 `PHONE_NUMBER`、`RCS_AGENT`、 `SENDER_ID`和 等值的維`OriginationIdentityType`度`POOL`。如需 RCS 指標和維度的完整清單，請參閱 [RCS CloudWatch 指標和監控](rcs-monitoring.md)。

**Topics**
+ [訊息支出指標](#cw-metrics-message-spend)
+ [訊息傳遞指標](#cw-metrics-message-delivery)
+ [訊息轉換指標](#cw-metrics-message-conversion)
+ [保護指標](#filter-and-monitor-messages-metrics)
+ [維度](#cw-metrics-message-dimensions)

### 訊息支出指標
<a name="cw-metrics-message-spend"></a>


**訊息支出指標**  

| 指標 | Description | 單位 |  有意義的統計資料  | 
| --- | --- | --- | --- | 
|  TextMessageMonthlySpend |  您本月已花費在傳送簡訊的金額 （美元）。  | 美元 | 上限 | 
| VoiceMessageMonthlySpend |  您本月已花費在傳送語音訊息的金額 （美元）。  | 美元 | 上限 | 
| MediaMessageMonthlySpend |  您本月已花費在傳送 MMS 訊息的金額 （美元）。  | 美元 | 上限 | 

### 訊息傳遞指標
<a name="cw-metrics-message-delivery"></a>

`AWS/SMSVoice` 命名空間包含下列訊息傳遞指標。


**訊息傳遞指標**  

| 指標 | Description | 單位 | 有意義的統計資料 | 
| --- | --- | --- | --- | 
| NumberOfTextMessagePartsSent | 傳送的文字訊息部分數量。排除被保護和服務限制封鎖的訊息，例如訊息支出限制 | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 
|  **NumberOfMediaMessagePartsSent**  | 傳送的媒體訊息部分數量。排除被保護和服務限制封鎖的訊息，例如訊息支出限制 | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 
| NumberOfTextMessagePartsDelivered | 交付給收件人的文字訊息部分數量。 | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 
| NumberOfMediaMessagePartsDelivered | 交付給收件人的媒體訊息組件數量。 | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 

### 訊息意見回饋指標
<a name="cw-metrics-message-conversion"></a>

`AWS/SMSVoice` 命名空間包含下列訊息回饋指標。


**訊息意見回饋指標**  

| 指標 | Description | 單位 | 有意義的統計資料 | 
| --- | --- | --- | --- | 
| NumberOfTextMessagesExpectingFeedback | 追蹤意見回饋的文字訊息總數。 **NumberOfTextMessagesExpectingFeedback** 對於每個啟用 MessageFeedbackEnabled 的`SendTextMessage`請求將具有 1 的值。 | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 
| NumberOfMediaMessagesExpectingFeedback | 追蹤意見回饋的媒體訊息總數。**NumberOfMediaMessagesExpectingFeedback** 對於每個啟用 MessageFeedbackEnabled 的`SendMediaMessage`請求將具有 1 的值。 | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 
| NumberOfTextMessagesWithFeedback | 追蹤意見回饋並收到意見回饋回應的文字訊息總數。**NumberOfTextMessagesWithFeedback** 每個收到意見回饋的訊息的值為 1。具有意見回饋的訊息百分比可由 決定 `100 * SUM(NumberOfTextMessagesWithFeedback) / SUM(NumberOfTextMessagesExpectingFeedback)` | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 
| NumberOfMediaMessagesWithFeedback | 追蹤意見回饋並收到意見回饋回應的媒體訊息總數。**NumberOfMediaMessagesWithFeedback** 每個接收意見回饋的訊息的值為 1。具有意見回饋的訊息百分比可由 決定 `100 * SUM(NumberOfMediaMessagesWithFeedback) / SUM(NumberOfMediaMessagesExpectingFeedback)` | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 

### 保護 AWS 最終使用者傳訊簡訊中的指標
<a name="filter-and-monitor-messages-metrics"></a>

`AWS/SMSVoice` 命名空間包含下列 Protect 指標。


****  

| 指標名稱 | Description | 單位 | 有意義的統計資料 | 
| --- | --- | --- | --- | 
| TextMessagesBlockedByProtect |  由於國家/地區模式封鎖規則而封鎖的文字訊息數量。 如果保護封鎖訊息，則 **TextMessagesBlockedByProtect** 的值為 1，如果未封鎖訊息，則為 0。 Protect 封鎖的 SMS 訊息百分比可由 決定`100 * AVG(TextMessagesBlockedByProtect)`。  | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 
| MediaMessagesBlockedByProtect |  由於國家/地區模式封鎖規則而封鎖的媒體訊息數量。 如果保護封鎖訊息，則 **MediaMessagesBlockedByProtect** 的值為 1，如果未封鎖訊息，則為 0。 Protect 封鎖的 MMS 訊息百分比可由 決定`100 * AVG(MediaMessagesBlockedByProtect)`。  | 計數 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/monitoring-cloudwatch.html)  | 

### 維度
<a name="cw-metrics-message-dimensions"></a>

您可以使用下列維度來強化上表中列出的指標。這些維度可讓您根據簡訊和語音訊息的特定屬性來篩選和分組指標。


****  

| 維度 | 描述 | 
| --- | --- | 
| 無 | 請勿篩選 | 
| IsoCountryCode |  此維度會依 ISO 國家/地區碼篩選您請求的資料  | 
| MessageFeedbackStatus | 此維度會依訊息意見回饋狀態 RECEIVED或 篩選您請求的資料 FAILED | 
| ProtectConfigurationId | 此維度會透過保護組態來篩選您請求的資料 | 
| 【IsoCountryCode、MessageFeedbackStatus】 | 此維度會依 ISO 國家/地區代碼和訊息意見回饋狀態篩選您請求的資料 | 
| 【ProtectConfigurationId、IsoCountryCode】 | 此維度會透過保護組態和 ISO 國家/地區碼來篩選您請求的資料 | 
| OriginationIdentityType | 此維度會依起始身分類型篩選您請求的資料。值包括 PHONE\$1NUMBER、RCS\$1AGENT、 SENDER\$1ID和 POOL。如需詳細資訊，請參閱[RCS CloudWatch 指標和監控](rcs-monitoring.md)。 | 

# 為 AWS 最終使用者傳訊 SMS 指標建立 CloudWatch 警示
<a name="monitoring-sms-cw"></a>

使用 CloudWatch，您可以建立根據 AWS 最終使用者簡訊 SMS 指標的指標閾值觸發的警示。例如，您可以建立警示的 `NumberOfTextMessagePartsSent` 指標。如果在 1 小時內傳送超過 1000 個文字訊息組件，則可以傳送電子郵件通知。如需詳細資訊，請參閱《*Amazon CloudWatch 使用者指南*》中的[使用 Amazon CloudWatch 警示](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html)

**建立警示，在一小時內傳送 1000 個文字訊息組件時傳送電子郵件**

1. 透過 [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) 開啟 CloudWatch 主控台。

1. 在導覽窗格中選擇**警示**，然後選擇**建立警示**。

1. 在**選取指標**區段中，選擇**瀏覽指標**，然後選擇`AWS/SMSVoice`命名空間。

1. 針對`AWS/SMSVoice`指標，選擇您要設定警示的指標，然後選擇**下一步**。如需可用指標的清單，請參閱 [使用 CloudWatch 進行監控](monitoring-cloudwatch.md)。

1. 若要為傳送的文字訊息部分數量設定警示：

   1. 選擇**訊息傳遞指標**

   1. 選擇 **NumberOfTextMessagePartsSent** 指標

1. 在**指定指標和條件**區段中：

   1. 將統計資料設定為總和

   1. 將期間設定為 1 小時

   1. 針對**條件**，選擇**靜態**

   1. 將 "**Whenever NumberOfTextMessagePartsSent is...**" 設定為 "**Greater than**"

   1. 輸入閾值 1000

1. 在**設定動作**區段中：

   1. 針對**警示狀態觸發**，選擇在**警示中**

   1. 選擇現有的 Amazon SNS 主題來通知或建立新的主題

   1. 如果建立新的主題，請輸入以逗號分隔的電子郵件地址
**注意**  
如果您建立新的 Amazon SNS 主題，則必須在接收通知之前驗證電子郵件地址。

1. 在**新增名稱和描述**區段中：

   1. 輸入警示的名稱。例如，**高文字訊息磁碟區**

   1. 或者，新增描述

1. 在預覽**和建立**區段中預覽警示設定，然後按一下**建立警示**。

警示現在已建立，並會根據您指定的條件觸發。

您可以為其他 AWS 最終使用者傳訊簡訊指標建立類似的警示，例如：
+ `NumberOfMediaMessagePartsSent`
+ `NumberOfTextMessagePartsDelivered`
+ `TextMessagesBlockedByProtect`

根據您的特定使用案例，視需要調整指標、閾值和其他設定。

# 使用 AWS 最終使用者簡訊簡訊監控 SMS、MS 和語音花費活動
<a name="monitor-spending"></a>

本主題提供在 Amazon CloudWatch 中檢視 SMS、MS 和語音支出指標的相關資訊。它還說明如何設定 CloudWatch 警示，在您的每月簡訊、簡訊或語音花費超過特定金額時傳送通知給您。

如果您只想檢視使用 AWS 最終使用者簡訊簡訊的每月費用，包括已花費的金額，您應該使用 AWS 帳單與成本管理 主控台。帳單與成本管理主控台會提供當月帳單的估算值，以及前幾個月的最終費用。詳情請參閱 *AWS Billing 使用者指南*中的[檢視您的每月費用](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/getting-viewing-bill.html)。

**重要**  
您必須為要收集的 CloudWatch 指標建立[服務連結角色](using-service-linked-roles.md#using-service-linked-roles.title)。

## 使用 CloudWatch 檢視您的每月簡訊、簡訊和語音花費
<a name="monitor-spending-metrics"></a>

若要快速判斷您在當月花了多少錢傳送 SMS、MS 和語音訊息，您可以使用 CloudWatch 主控台的指標區段。CloudWatch 會保留指標資料 15 個月，您可以檢視即時資料並分析歷史趨勢。

如需 CloudWatch 指標和警示的詳細資訊，請參閱 *Amazon CloudWatch 使用者指南*中的[使用 Amazon CloudWatch 指標](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html)。

**在 CloudWatch 中檢視 SMS、MS 和語音支出指標**

1. 透過 [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) 開啟 CloudWatch 主控台。

1. 在導覽窗格中，選擇**指標**。

1. 在**所有指標**索引標籤中，選擇 **SMSVoice**。

1. 選擇**帳戶指標**。

1. 從選項中選取 **TextMessageMonthlySpend**、**MediaMessageMonthlySpend** 和 **VoiceMessageMonthlySpend**。根據您的選擇，圖形會更新，以使用 AWS 最終使用者簡訊簡訊顯示當月花費的金額。
**注意**  
在您使用 AWS 最終使用者簡訊簡訊傳送至少一個訊息之前，**TextMessageMonthlySpend**、**MediaMessageMonthlySpend** 和 **VoiceMessageMonthlySpend** 指標不會顯示。

## 使用 CloudWatch 建立 SMS、MS 或語音花費警示
<a name="monitor-spending-alarms"></a>

除了檢視您的每月簡訊、簡訊和語音支出指標之外，您還可以建立 CloudWatch 警示，在簡訊、簡訊或語音支出超過特定金額時通知您。您可以設定 CloudWatch 將這些通知傳送到 Amazon SNS 主題，並藉由這個方法交付給您。

如需在 CloudWatch 中建立警示的詳細資訊，請參閱 *Amazon CloudWatch 使用者指南*中的[使用 CloudWatch 警示](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html)。

**若要在 CloudWatch 中建立 SMS 或語音支出警示**

1. 如果您尚未執行此操作，請建立 Amazon SNS 主題，並為其訂閱一個端點。訂閱該主題的端點應該是您希望收到花費通知的位置。假設您要透過電子郵件接收支出通知，請輸入您的電子郵件地址，訂閱 Amazon SNS 主題。如果您想要透過簡訊接收花費通知，請以簡訊端點訂閱該主題。

   如需建立和訂閱主題的資訊，請參閱 *Amazon Simple Notification Service 開發人員指南*中的 [Amazon SNS 入門](https://docs.aws.amazon.com/sns/latest/dg/sns-getting-started.html)。

1. 透過 [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) 開啟 CloudWatch 主控台。

1. 
**重要**  
建立帳單警示之前，您必須 AWS 區域 將 設定為美國東部 （維吉尼亞北部）。帳單指標資料會存放在此中 AWS 區域 ，並代表全球費用。此外，您還須為帳戶或在管理/付款人帳戶中啟用帳單提醒 (若您使用的是合併帳單)。詳情請參閱[啟用帳單提醒](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html#turning_on_billing_metrics)。

   在導覽窗格的**警示** 下，選擇**帳單**。

1. 選擇**帳單警示** 旁邊的**建立警示**。

1. 選擇**選取指標**。

1. 在**所有指標**索引標籤上，選擇 **SMSVoice**，然後選擇**帳戶指標**。

1. 選取 **TextMessageMonthlySpend**、**MediaMessageMonthlySpend** 或 **VoiceMessageMonthlySpend**。
**注意**  
**TextMessageMonthlySpend**、**MediaMessageMonthlySpend** 和 **VoiceMessageMonthlySpend** 指標不會顯示，直到您透過 AWS 最終使用者簡訊簡訊傳送至少一個訊息為止。

1. 選擇**圖表化指標**標籤，然後完成下列步驟：
   + 在**統計資料**下，選擇要監控的統計資料或預先定義百分位數，或指定自訂百分位數，例如 **p99** 或 **p45**。
   + 在**期間**下，選擇警示的評估期間。評估警示時，每個期間都會彙整為一個資料點。

1. 選擇**選取指標**。**指定指標和條件**頁面隨即出現，顯示警示指標和統計資料的圖形及其他資訊。

1. 在**條件**底下，完成下列步驟：
   + 對於**閾值類型**，選擇**靜態**。
   + 對於**何時 (**TextMessageMonthlySpend**、**MediaMessageMonthlySpend** 或 **VoiceMessageMonthlySpend**)**，指定您希望指標大於、大於或等於或等於閾值，以觸發警示。然後，在**於**底下輸入閾值，這是您想要觸發警示的金額 (美元)。

1. 在**其他組態**底下，完成下列步驟：
   + 針對**要警示的資料點**，輸入花費金額必須超過閾值才會觸發警示的評估期間 (資料點) 數量。
   + 對於**遺失資料處理**，選擇**將遺失資料視為忽略 (維持警示狀態)**。

1. 選擇**下一步**。

1. 在**通知**底下，完成下列步驟：
   + 對於**每當此警示狀態是**，選擇**警示**。
   + 在**選擇一個 SNS 主題**中，針對您要傳送的警示通知，選擇Amazon SNS 主題。

1. 選擇**下一步**。

1. 輸入名稱，選擇性地輸入警示描述，然後選擇**下一步**。

1. 在**預覽及建立**底下，檢閱及確認您想要的警示設定，然後選擇**建立警示**。

# 使用 記錄 AWS 最終使用者簡訊 SMS API 呼叫 AWS CloudTrail
<a name="logging-using-cloudtrail"></a>

AWS 最終使用者簡訊 SMS 已與 整合[AWS CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)，此服務提供使用者、角色或 所採取動作的記錄 AWS 服務。CloudTrail 會將 AWS 最終使用者簡訊 SMS 的所有 API 呼叫擷取為事件。擷取的呼叫包括來自 AWS 最終使用者傳訊簡訊主控台的呼叫，以及最終 AWS 使用者傳訊簡訊 API 操作的程式碼呼叫。使用 CloudTrail 所收集的資訊，您可以判斷對 AWS 最終使用者簡訊 SMS 提出的請求、提出請求的 IP 地址、提出請求的時間，以及其他詳細資訊。

每一筆事件或日誌專案都會包含產生請求者的資訊。身分資訊可協助您判斷下列事項：
+ 該請求是使用根使用者還是使用者憑證提出。
+ 請求是否代表 IAM Identity Center 使用者提出。
+ 提出該請求時，是否使用了特定角色或聯合身分使用者的暫時安全憑證。
+ 該請求是否由另一項 AWS 服務服務提出。

當您建立帳戶 AWS 帳戶 時CloudTrail 會在您的 中處於作用中狀態，而且您會自動存取 CloudTrail **事件歷史記錄**。CloudTrail **事件歷史記錄**為 AWS 區域中過去 90 天記錄的管理事件，提供可檢視、可搜尋、可下載且不可變的記錄。如需詳細資訊，請參閱「AWS CloudTrail 使用者指南」**中的[使用 CloudTrail 事件歷史記錄](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)。檢視**事件歷史記錄**不會產生 CloudTrail 費用。

如需 AWS 帳戶 過去 90 天內持續記錄的事件，請建立線索或 [CloudTrail Lake](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake.html) 事件資料存放區。

**CloudTrail 追蹤**  
*線索*能讓 CloudTrail 將日誌檔案交付至 Amazon S3 儲存貯體。使用 建立的所有線索 AWS 管理主控台 都是多區域。您可以使用 AWS CLI建立單一或多區域追蹤。建議您建立多區域追蹤，因為您擷取 AWS 區域 帳戶中所有 的活動。如果您建立單一區域追蹤，您只能檢視追蹤 AWS 區域中記錄的事件。如需追蹤的詳細資訊，請參閱《AWS CloudTrail 使用者指南》**中的[為您的 AWS 帳戶建立追蹤](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)和[為組織建立追蹤](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-trail-organization.html)。  
您可以透過建立追蹤，免費將持續管理事件的一個複本從 CloudTrail 傳遞至您的 Amazon S3 儲存貯體，但這樣做會產生 Amazon S3 儲存費用。如需 CloudTrail 定價的詳細資訊，請參閱 [AWS CloudTrail 定價](https://aws.amazon.com/cloudtrail/pricing/)。如需 Amazon S3 定價的相關資訊，請參閱 [Amazon S3 定價](https://aws.amazon.com/s3/pricing/)。

**CloudTrail Lake 事件資料存放區**  
*CloudTrail Lake* 讓您能夠對事件執行 SQL 型查詢。CloudTrail Lake 會將分列式 JSON 格式的現有事件轉換為 [Apache ORC](https://orc.apache.org/) 格式。ORC 是一種單欄式儲存格式，針對快速擷取資料進行了最佳化。系統會將事件彙總到*事件資料存放區*中，事件資料存放區是事件的不可變集合，其依據為您透過套用[進階事件選取器](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-concepts.html#adv-event-selectors)選取的條件。套用於事件資料存放區的選取器控制哪些事件持續存在並可供您查詢。如需 CloudTrail Lake 的詳細資訊，請參閱*AWS CloudTrail 《 使用者指南*》中的[使用 AWS CloudTrail Lake](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake.html)。  
CloudTrail Lake 事件資料存放區和查詢會產生費用。建立事件資料存放區時，您可以選擇要用於事件資料存放區的[定價選項](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-manage-costs.html#cloudtrail-lake-manage-costs-pricing-option)。此定價選項將決定擷取和儲存事件的成本，以及事件資料存放區的預設和最長保留期。如需 CloudTrail 定價的詳細資訊，請參閱 [AWS CloudTrail 定價](https://aws.amazon.com/cloudtrail/pricing/)。

## AWS CloudTrail 中的最終使用者傳訊簡訊資料事件
<a name="cloudtrail-data-events"></a>

[資料事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#logging-data-events)提供在資源上或在資源中執行的資源操作的相關資訊 (例如，讀取或寫入 Amazon S3 物件)。這些也稱為資料平面操作。資料事件通常是大量資料的活動。根據預設，CloudTrail 不會記錄資料事件。CloudTrail **事件歷史記錄**不會記錄資料事件。

資料事件需支付額外的費用。如需 CloudTrail 定價的詳細資訊，請參閱 [AWS CloudTrail 定價](https://aws.amazon.com/cloudtrail/pricing/)。

您可以使用 CloudTrail 主控台或 CloudTrail API 操作 AWS CLI，記錄 AWS 最終使用者傳訊簡訊資源類型的資料事件。如需如何記錄資料事件的詳細資訊，請參閱 *AWS CloudTrail 使用者指南*中的[使用 AWS 管理主控台　記錄資料事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#logging-data-events-console)和[使用 AWS Command Line Interface記錄資料事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-with-the-AWS-CLI)。

下表列出您可以記錄資料事件的最終 AWS 使用者簡訊 SMS 資源類型。**資料事件類型 (主控台)** 資料行會顯示從 CloudTrail 主控台上的**資料事件類型**清單中選擇的值。**resources.type 值**欄會顯示值，您會在使用 AWS CLI 或 CloudTrail APIs 設定進階事件選取器時指定此`resources.type`值。**記錄到 CloudTrail 的資料 API** 資料行會針對資源類型顯示記錄到 CloudTrail 的 API 呼叫。


| 資料事件類型 (主控台) | resources.type 值 | 記錄到 CloudTrail 的資料 API | 
| --- | --- | --- | 
| SMS 語音來源身分 |  AWS::SMSVoice::OriginationIdentity  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/logging-using-cloudtrail.html)  | 
| SMS Voice Notify 組態 |  AWS::SMSVoice::NotifyConfiguration  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/sms-voice/latest/userguide/logging-using-cloudtrail.html)  | 

您可以設定進階事件選取器來篩選 `eventName`、`readOnly` 和 `resources.ARN` 欄位，以僅記錄對您重要的事件。如需這些欄位的詳細資訊，請參閱AWS CloudTrail API 參考**中的[https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedFieldSelector.html](https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedFieldSelector.html)。

## AWS CloudTrail 中的最終使用者傳訊簡訊管理事件
<a name="cloudtrail-management-events"></a>

[管理事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events)提供有關在 資源上執行的管理操作的資訊 AWS 帳戶。這些也稱為控制平面操作。根據預設，CloudTrail 記錄管理事件。

AWS 最終使用者簡訊簡訊會將所有 AWS 最終使用者簡訊簡訊控制平面操作記錄為管理事件。如需 AWS 最終使用者簡訊簡訊 SMS 記錄到 CloudTrail 的 AWS 終端使用者簡訊控制平面操作清單，請參閱[AWS 最終使用者簡訊簡訊和語音 V2 API 參考](https://docs.aws.amazon.com//pinpoint/latest/apireference_smsvoicev2/Welcome.html)。

## AWS 最終使用者簡訊簡訊事件範例
<a name="cloudtrail-event-examples"></a>

一個事件代表任何來源提出的單一請求，並包含請求 API 操作的相關資訊、操作的日期和時間、請求參數等。CloudTrail 日誌檔案不是公有 API 呼叫的已排序堆疊追蹤，因此事件不會以任何特定順序顯示。

以下範例顯示的是展示 `CreateConfigurationSet` 和 `CreateEventDestination` 動作的 CloudTrail 記錄項目。

```
{
  "Records": [
    {
      "eventVersion":"1.05",
      "userIdentity":{
        "type":"IAMUser",
        "principalId":"AIDAIHTHRCDA62EXAMPLE",
        "arn":"arn:aws:iam::111122223333:user/SampleUser",
        "accountId":"111122223333",
        "accessKeyId":"AKIAIOSFODNN7EXAMPLE",
        "userName":"SampleUser"
      },
      "eventTime":"2018-11-06T21:45:55Z",
      "eventSource":"sms-voice.amazonaws.com",
      "eventName":"CreateConfigurationSet",
      "awsRegion":"us-east-1",
      "sourceIPAddress":"192.0.0.1",
      "userAgent":"PostmanRuntime/7.3.0",
      "requestParameters":{
        "ConfigurationSetName":"MyConfigurationSet"
      },
      "responseElements":null,
      "requestID":"56dcc091-e20d-11e8-87d2-9994aexample",
      "eventID":"725843fc-8846-41f4-871a-7c52dexample",
      "readOnly":false,
      "eventType":"AwsApiCall",
      "recipientAccountId":"123456789012"
    },
    {
      "eventVersion":"1.05",
      "userIdentity":{
        "type":"IAMUser",
        "principalId":"AIDAIHTHRCDA62EXAMPLE",
        "arn":"arn:aws:iam::111122223333:user/SampleUser",
        "accountId":"111122223333",
        "accessKeyId":"AKIAIOSFODNN7EXAMPLE",
        "userName":"SampleUser"
      },
      "eventTime":"2018-11-06T21:47:08Z",
      "eventSource":"sms-voice.amazonaws.com",
      "eventName":"CreateEventDestination",
      "awsRegion":"us-east-1",
      "sourceIPAddress":"192.0.0.1",
      "userAgent":"PostmanRuntime/7.3.0",
      "requestParameters":{
        "EventDestinationName":"CloudWatchEventDestination",
        "ConfigurationSetName":"MyConfigurationSet",
        "EventDestination":{
          "Enabled":true,
          "MatchingEventTypes":[
            "INITIATED_CALL",
            "INITIATED_CALL"
          ],
          "CloudWatchLogsDestination":{
            "IamRoleArn":"arn:aws:iam::111122223333:role/iamrole-01",
            "LogGroupArn":"arn:aws:logs:us-east-1:111122223333:log-group:clientloggroup-01"
          }
        }
      },
      "responseElements":null,
      "requestID":"81de1e73-e20d-11e8-b158-d5536example",
      "eventID":"fcafc21f-7c93-4a3f-9e72-fca2dexample",
      "readOnly":false,
      "eventType":"AwsApiCall",
      "recipientAccountId":"111122223333"
    }
  ]
}
```

以下範例顯示的是展示 `SendTextMessage` 動作的 CloudTrail 日誌項目。

```
{
        "eventVersion": "1.10",
        "userIdentity": {
            "type": "AssumedRole",
            "principalId": "QWERTYUIOPASDFGHJKLZXCVBNM:EXAMPLE",
            "arn": "arn:aws:sts::111122223333:assumed-role/ASDFGHJKL/QWERTYUIOP",
            "accountId": "111122223333",
            "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
            "sessionContext": {
                "sessionIssuer": {
                    "type": "Role",
                    "principalId": "ASDFGHJKLQWERTYUIOP",
                    "arn": "arn:aws:iam::123456789123:role/QWERTYUIOP",
                    "accountId": "111122223333",
                    "userName": "QWERTYUIOP"
                },
                "attributes": {
                    "creationDate": "2024-10-02T22:39:11Z",
                    "mfaAuthenticated": "false"
                }
            }
        },
        "eventTime": "2024-10-02T23:52:08Z",
        "eventSource": "sms-voice.amazonaws.com",
        "eventName": "SendTextMessage",
        "awsRegion": "us-east-1",
        "sourceIPAddress": "192.0.2.1",
        "userAgent": "aws-cli/1.18.147 Python/2.7.18 Linux/5.10.218-186.862.amzn2int.x86_64 botocore/1.18.6",
        "requestParameters": {
            "destinationPhoneNumber": "+11235550123",
            "originationIdentity": "phone-aa012345678901234567890123456789",
            "messageBody": "HIDDEN_DUE_TO_SECURITY_REASONS",
        },
        "responseElements": {
            "messageId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
        },
        "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
        "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
        "readOnly": false,
        "resources": [{
            "accountId": "111122223333",
            "type": "AWS::SMSVoice::OriginationIdentity",
            "ARN": "arn:aws:sms-voice:us-east-1:111122223333:phone-number/phone-aa012345678901234567890123456789"
        }],
        "eventType": "AwsApiCall",
        "managementEvent": false,
        "recipientAccountId": "111122223333",
        "eventCategory": "Data",
        "tlsDetails": {
            "clientProvidedHostHeader": "sms-voice.us-east-1.amazonaws.com"
        }
}
```

以下範例顯示的是展示 `SendVoiceMessage` 動作的 CloudTrail 日誌項目。

```
{
        "eventVersion": "1.10",
        "userIdentity": {
            "type": "AssumedRole",
            "principalId": "QWERTYUIOPASDFGHJKLZXCVBNM:EXAMPLE",
            "arn": "arn:aws:sts::111122223333:assumed-role/ASDFGHJKL/QWERTYUIOP",
            "accountId": "111122223333",
            "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
            "sessionContext": {
                "sessionIssuer": {
                    "type": "Role",
                    "principalId": "ASDFGHJKLQWERTYUIOP",
                    "arn": "arn:aws:iam::123456789123:role/QWERTYUIOP",
                    "accountId": "111122223333",
                    "userName": "QWERTYUIOP"
                },
                "attributes": {
                    "creationDate": "2024-10-02T22:39:11Z",
                    "mfaAuthenticated": "false"
                }
            }
        },
        "eventTime": "2024-10-02T23:52:08Z",
        "eventSource": "sms-voice.amazonaws.com",
        "eventName": "SendVoiceMessage",
        "awsRegion": "us-east-1",
        "sourceIPAddress": "192.0.2.1",
        "userAgent": "aws-cli/1.18.147 Python/2.7.18 Linux/5.10.218-186.862.amzn2int.x86_64 botocore/1.18.6",
        "requestParameters": {
            "destinationPhoneNumber": "+11235550123",
            "originationIdentity": "phone-aa012345678901234567890123456789",
            "messageBody": "HIDDEN_DUE_TO_SECURITY_REASONS",
        },
        "responseElements": {
            "messageId": "a1b2c3d4-5678-90ab-cdef-EXAMPLEaaaaa"
        },
        "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb",
        "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "readOnly": false,
        "resources": [{
            "accountId": "111122223333",
            "type": "AWS::SMSVoice::OriginationIdentity",
            "ARN": "arn:aws:sms-voice:us-east-1:111122223333:phone-number/phone-aa012345678901234567890123456789"
        }],
        "eventType": "AwsApiCall",
        "managementEvent": false,
        "recipientAccountId": "111122223333",
        "eventCategory": "Data",
        "tlsDetails": {
            "clientProvidedHostHeader": "sms-voice.us-east-1.amazonaws.com"
        }
}
```

以下範例顯示的是展示 `SendMediaMessage` 動作的 CloudTrail 日誌項目。

```
{
        "eventVersion": "1.10",
        "userIdentity": {
            "type": "AssumedRole",
            "principalId": "QWERTYUIOPASDFGHJKLZXCVBNM:EXAMPLE",
            "arn": "arn:aws:sts::111122223333:assumed-role/ASDFGHJKL/QWERTYUIOP",
            "accountId": "111122223333",
            "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
            "sessionContext": {
                "sessionIssuer": {
                    "type": "Role",
                    "principalId": "ASDFGHJKLQWERTYUIOP",
                    "arn": "arn:aws:iam::377392627227:role/QWERTYUIOP",
                    "accountId": "111122223333",
                    "userName": "QWERTYUIOP"
                },
                "attributes": {
                    "creationDate": "2024-10-02T22:39:11Z",
                    "mfaAuthenticated": "false"
                }
            }
        },
        "eventTime": "2024-10-02T23:52:08Z",
        "eventSource": "sms-voice.amazonaws.com",
        "eventName": "SendMediaMessage",
        "awsRegion": "us-east-1",
        "sourceIPAddress": "192.0.2.1",
        "userAgent": "aws-cli/1.18.147 Python/2.7.18 Linux/5.10.218-186.862.amzn2int.x86_64 botocore/1.18.6",
        "requestParameters": {
            "destinationPhoneNumber": "+11235550123",
            "originationIdentity": "phone-aa012345678901234567890123456789",
            "messageBody": "HIDDEN_DUE_TO_SECURITY_REASONS",
        },
        "responseElements": {
            "messageId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222"
        },
        "requestID": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
        "eventID": "a1b2c3d4-5678-90ab-cdef-EXAMPLEaaaaa",
        "readOnly": false,
        "resources": [{
            "accountId": "111122223333",
            "type": "AWS::SMSVoice::OriginationIdentity",
            "ARN": "arn:aws:sms-voice:us-east-1:111122223333:phone-number/phone-aa012345678901234567890123456789"
        }],
        "eventType": "AwsApiCall",
        "managementEvent": false,
        "recipientAccountId": "111122223333",
        "eventCategory": "Data",
        "tlsDetails": {
            "clientProvidedHostHeader": "sms-voice.us-east-1.amazonaws.com"
        }
}
```

如需有關 CloudTrail 記錄內容的詳細資訊，請參閱「AWS CloudTrail 使用者指南」**中的[CloudTrail 記錄內容](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html)。

# 使用 EventBridge 進行監控
<a name="monitor-event-bridge"></a>

AWS 最終使用者傳訊 SMS 會將事件傳送至 EventBridge 以進行註冊、SMS、MS 和語音事件。您可以使用 EventBridge 來撰寫採取動作的規則，例如在收到特定事件類型時通知您。如需詳細資訊，請參閱《Amazon EventBridge 使用者指南》中的下列主題：
+ [什麼是 Amazon EventBridge？](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html)
+ [Amazon EventBridge 事件](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html)
+ [Amazon EventBridge 事件模式](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html)
+ [Amazon EventBridge 規則](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html)

AWS End User Messaging SMS 會將下列事件直接傳送至 EventBridge：
+ 文字訊息交付狀態已更新
+ 媒體訊息傳遞狀態已更新
+ 語音訊息傳遞狀態已更新
+ 註冊狀態變更

對於文字、媒體和語音訊息事件，下列範例中的 `detail`區段類似 [範例事件資料](configuration-sets-event-format.md)。

## 已交付簡訊的事件
<a name="event-delivered-sms-message"></a>

```
{
    "version": "0",
    "id": "5c0fa4f8-e4ba-ed02-6101-c795472fccd0",
    "detail-type": "Text Message Delivery Status Updated",
    "source": "aws.sms-voice",
    "account": "111122223333",
    "time": "2025-10-01T18:20:41Z",
    "region": "us-east-1",
    "resources": [],
    "detail": {
        "eventType": "TEXT_SUCCESSFUL",
        "eventVersion": "1.0",
        "eventTimestamp": 1759342841377,
        "isFinal": true,
        "originationPhoneNumber": "VAJZNBLLDX",
        "isoCountryCode": "ES",
        "isInternationalSend": false,
        "mcc": "214",
        "mnc": "05",
        "carrierName": "Movistar",
        "messageId": "ed23196c-75ce-4727-93ee-7bf72b64998f",
        "messageRequestTimestamp": 1759342840978,
        "messageEncoding": "GSM",
        "messageType": "TRANSACTIONAL",
        "messageStatus": "SUCCESSFUL",
        "messageStatusDescription": "Message has been accepted by phone carrier",
        "totalMessageParts": 1,
        "totalMessagePrice": 0.06087,
        "totalCarrierFee": 0.0,
        "protectConfiguration": {
            "protectConfigurationId": "protect-e06e5d722c31455286262a108e7d863d",
            "protectStatus": "ALLOW"
        }
    }
}
```

## 已傳送簡訊的事件
<a name="event-sent-sms-message"></a>

```
{
    "version": "0",
    "id": "4111946b-816c-e73a-9ea0-a8367b9d57e4",
    "detail-type": "Text Message Delivery Status Updated",
    "source": "aws.sms-voice",
    "account": "555555555555",
    "time": "2024-10-16T17:20:24Z",
    "region": "eu-west-2",
    "resources": [],
    "detail": {
        "eventType": "TEXT_SUCCESSFUL",
        "eventVersion": "1.0",
        "eventTimestamp": 1729099224788,
        "isFinal": true,
        "originationPhoneNumber": "+18445550123",
        "isoCountryCode": "US",
        "isInternationalSend": false,
        "messageId": "9539975a-e71f-45f3-b496-8d98dc098a77",
        "messageRequestTimestamp": 1729099224438,
        "messageEncoding": "GSM",
        "messageType": "PROMOTIONAL",
        "messageStatus": "SUCCESSFUL",
        "messageStatusDescription": "Message has been accepted by phone carrier",
        "totalMessageParts": 1,
        "totalMessagePrice": 0.00581,
        "totalCarrierFee": 0.00302,
        "protectConfiguration": {
            "protectConfigurationId": "protect-e06e5d722c31455286262a108e7d863d",
            "protectStatus": "ALLOW"
        }
    }
}
```

## 已傳送語音訊息的事件
<a name="event-sent-voice-message"></a>

```
{
    "version": "0",
    "id": "3bd18839-b5b4-79c5-1b18-bd6545f40566",
    "detail-type": "Voice Message Delivery Status Updated",
    "source": "aws.sms-voice",
    "account": "444455556666",
    "time": "2024-10-16T17:18:50Z",
    "region": "eu-west-2",
    "resources": [],
    "detail": {
        "eventType": "VOICE_INITIATED",
        "eventVersion": "1.0",
        "eventTimestamp": 1729099130226,
        "isFinal": false,
        "originationPhoneNumber": "+18445550123",
        "isoCountryCode": "US",
        "messageId": "1d2295bd-ac9b-4517-821f-7c6d95d789a1",
        "messageRequestTimestamp": 1729099129845,
        "messageStatus": "INITIATED"
    }
}
```

## 註冊狀態變更的事件
<a name="event-registration-status-change"></a>

AWS End User Messaging SMS 會將下列註冊狀態變更傳送至 Amazon EventBridge：

`CLOSED`, `CREATED`, `COMPLETE`, `DELETED`, `PROVISIONING`, `REQUIRES_AUTHENTICATION`, `REQUIRES_UPDATES`, `REVIEWING`, `SUBMITTED`

如需這些狀態值的定義，請參閱 AWS End User Messaging SMS API 參考中的 [RegistrationInformation](https://docs.aws.amazon.com/pinpoint/latest/apireference_smsvoicev2/API_RegistrationInformation.html)。

```
{
    "version": "0",
    "id": "d2e8812b-d34c-90f9-a8a9-3f18e15d1db9",
    "detail-type": "Registration Status Change",
    "source": "aws.sms-voice",
    "account": "111122223333",
    "time": "2025-09-26T17:42:25Z",
    "region": "us-east-1",
    "resources": ["arn:aws:sms-voice:us-east-1:111122223333:registration/registration-30a16a8b7cec478a8e37febbb9005348"],
    "detail": {
        "registrationDetails": {
            "registrationId": "registration-30a16a8b7cec478a8e37febbb9005348",
            "registrationVersionNumber": 1,
            "registrationType": "ZZ_LONG_CODE_REGISTRATION",
            "registrationStatusChangeTimestamp": 1758908543000,
            "currentStatus": "SUBMITTED"
        },
        "registrationArn": "arn:aws:sms-voice:us-east-1:111122223333:registration/registration-30a16a8b7cec478a8e37febbb9005348"
    }
}
```