

文件 AWS 開發套件範例 GitHub 儲存庫中有更多可用的 [AWS SDK 範例](https://github.com/awsdocs/aws-doc-sdk-examples)。

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

# 使用 AWS SDKs Amazon SNS 程式碼範例
<a name="sns_code_examples"></a>

下列程式碼範例示範如何使用 Amazon Simple Notification Service 搭配 AWS 軟體開發套件 (SDK)。

*Actions* 是大型程式的程式碼摘錄，必須在內容中執行。雖然動作會告訴您如何呼叫個別服務函數，但您可以在其相關情境中查看內容中的動作。

*案例*是向您展示如何呼叫服務中的多個函數或與其他 AWS 服務組合來完成特定任務的程式碼範例。

**其他資源**
+  **[Amazon SNS 開發人員指南](https://docs.aws.amazon.com/sns/latest/dg/welcome.html)** – Amazon SNS 的詳細資訊。
+ **[Amazon SNS API 參考](https://docs.aws.amazon.com/sns/latest/api/welcome.html)** – 所有可用 Amazon SNS 動作的詳細資訊。
+ **[AWS 開發人員中心](https://aws.amazon.com/developer/code-examples/?awsf.sdk-code-examples-product=product%23sns)** – 您可以依類別或全文搜尋篩選的程式碼範例。
+ **[AWS SDK 範例](https://github.com/awsdocs/aws-doc-sdk-examples)** – GitHub 儲存庫使用慣用語言的完整程式碼。包含設定和執行程式碼的指示。

**Contents**
+ [基本概念](sns_code_examples_basics.md)
  + [您好 Amazon SNS](sns_example_sns_Hello_section.md)
  + [動作](sns_code_examples_actions.md)
    + [`CheckIfPhoneNumberIsOptedOut`](sns_example_sns_CheckIfPhoneNumberIsOptedOut_section.md)
    + [`ConfirmSubscription`](sns_example_sns_ConfirmSubscription_section.md)
    + [`CreateTopic`](sns_example_sns_CreateTopic_section.md)
    + [`DeleteTopic`](sns_example_sns_DeleteTopic_section.md)
    + [`GetSMSAttributes`](sns_example_sns_GetSMSAttributes_section.md)
    + [`GetTopicAttributes`](sns_example_sns_GetTopicAttributes_section.md)
    + [`ListPhoneNumbersOptedOut`](sns_example_sns_ListPhoneNumbersOptedOut_section.md)
    + [`ListSubscriptions`](sns_example_sns_ListSubscriptions_section.md)
    + [`ListTopics`](sns_example_sns_ListTopics_section.md)
    + [`Publish`](sns_example_sns_Publish_section.md)
    + [`SetSMSAttributes`](sns_example_sns_SetSMSAttributes_section.md)
    + [`SetSubscriptionAttributes`](sns_example_sns_SetSubscriptionAttributes_section.md)
    + [`SetSubscriptionAttributesRedrivePolicy`](sns_example_sns_SetSubscriptionAttributesRedrivePolicy_section.md)
    + [`SetTopicAttributes`](sns_example_sns_SetTopicAttributes_section.md)
    + [`Subscribe`](sns_example_sns_Subscribe_section.md)
    + [`TagResource`](sns_example_sns_TagResource_section.md)
    + [`Unsubscribe`](sns_example_sns_Unsubscribe_section.md)
+ [案例](sns_code_examples_scenarios.md)
  + [建置應用程式以將資料提交至 DynamoDB 資料表](sns_example_cross_SubmitDataApp_section.md)
  + [建置 Amazon SNS 應用程式](sns_example_cross_SnsPublishSubscription_section.md)
  + [為推播通知建立平台端點](sns_example_sns_CreatePlatformEndpoint_section.md)
  + [建立無伺服器應用程式來管理相片](sns_example_cross_PAM_section.md)
  + [建立 Amazon Textract Explorer 應用程式](sns_example_cross_TextractExplorer_section.md)
  + [建立 Amazon SNS 主題並發佈訊息](sns_example_sns_GettingStarted_048_section.md)
  + [建立並發布到 FIFO 主題](sns_example_sns_PublishFifoTopic_section.md)
  + [偵測映像中的人物和物件](sns_example_cross_RekognitionVideoDetection_section.md)
  + [IoT Device Defender 入門](sns_example_iot_GettingStarted_079_section.md)
  + [Config 入門](sns_example_config_service_GettingStarted_053_section.md)
  + [將簡訊發布到主題](sns_example_sns_UsageSmsTopic_section.md)
  + [發布大型訊息](sns_example_sns_PublishLargeMessage_section.md)
  + [發布簡訊](sns_example_sns_PublishTextSMS_section.md)
  + [將訊息發佈至佇列](sns_example_sqs_Scenario_TopicsAndQueues_section.md)
  + [使用 API Gateway 來調用 Lambda 函式](sns_example_cross_LambdaAPIGateway_section.md)
  + [使用排程事件來調用 Lambda 函式](sns_example_cross_LambdaScheduledEvents_section.md)
+ [無伺服器範例](sns_code_examples_serverless_examples.md)
  + [使用 Amazon SNS 觸發條件調用 Lambda 函數](sns_example_serverless_SNS_Lambda_section.md)