

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

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

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

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

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

如需 AWS SDK 開發人員指南和程式碼範例的完整清單，請參閱 [搭配 SDK 使用 Amazon SNS AWS](sdk-general-information-section.md)。此主題也包含有關入門的資訊和舊版 SDK 的詳細資訊。

**Contents**
+ [基本概念](service_code_examples_basics.md)
  + [您好 Amazon SNS](example_sns_Hello_section.md)
  + [動作](service_code_examples_actions.md)
    + [`CheckIfPhoneNumberIsOptedOut`](example_sns_CheckIfPhoneNumberIsOptedOut_section.md)
    + [`ConfirmSubscription`](example_sns_ConfirmSubscription_section.md)
    + [`CreateTopic`](example_sns_CreateTopic_section.md)
    + [`DeleteTopic`](example_sns_DeleteTopic_section.md)
    + [`GetSMSAttributes`](example_sns_GetSMSAttributes_section.md)
    + [`GetTopicAttributes`](example_sns_GetTopicAttributes_section.md)
    + [`ListPhoneNumbersOptedOut`](example_sns_ListPhoneNumbersOptedOut_section.md)
    + [`ListSubscriptions`](example_sns_ListSubscriptions_section.md)
    + [`ListTopics`](example_sns_ListTopics_section.md)
    + [`Publish`](example_sns_Publish_section.md)
    + [`SetSMSAttributes`](example_sns_SetSMSAttributes_section.md)
    + [`SetSubscriptionAttributes`](example_sns_SetSubscriptionAttributes_section.md)
    + [`SetSubscriptionAttributesRedrivePolicy`](example_sns_SetSubscriptionAttributesRedrivePolicy_section.md)
    + [`SetTopicAttributes`](example_sns_SetTopicAttributes_section.md)
    + [`Subscribe`](example_sns_Subscribe_section.md)
    + [`TagResource`](example_sns_TagResource_section.md)
    + [`Unsubscribe`](example_sns_Unsubscribe_section.md)
+ [案例](service_code_examples_scenarios.md)
  + [建置應用程式以將資料提交至 DynamoDB 資料表](example_cross_SubmitDataApp_section.md)
  + [建置 Amazon SNS 應用程式](example_cross_SnsPublishSubscription_section.md)
  + [為推播通知建立平台端點](example_sns_CreatePlatformEndpoint_section.md)
  + [建立無伺服器應用程式來管理相片](example_cross_PAM_section.md)
  + [建立 Amazon Textract Explorer 應用程式](example_cross_TextractExplorer_section.md)
  + [建立 Amazon SNS 主題並發佈訊息](example_sns_GettingStarted_048_section.md)
  + [建立並發布到 FIFO 主題](example_sns_PublishFifoTopic_section.md)
  + [偵測映像中的人物和物件](example_cross_RekognitionVideoDetection_section.md)
  + [IoT Device Defender 入門](example_iot_GettingStarted_079_section.md)
  + [Config 入門](example_config_service_GettingStarted_053_section.md)
  + [將簡訊發布到主題](example_sns_UsageSmsTopic_section.md)
  + [發布大型訊息](example_sns_PublishLargeMessage_section.md)
  + [發布簡訊](example_sns_PublishTextSMS_section.md)
  + [將訊息發佈至佇列](example_sqs_Scenario_TopicsAndQueues_section.md)
  + [使用 API Gateway 來調用 Lambda 函式](example_cross_LambdaAPIGateway_section.md)
  + [使用排程事件來調用 Lambda 函式](example_cross_LambdaScheduledEvents_section.md)
+ [無伺服器範例](service_code_examples_serverless_examples.md)
  + [使用 Amazon SNS 觸發條件調用 Lambda 函數](example_serverless_SNS_Lambda_section.md)