

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

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

# 使用 AWS SDKs 的 Amazon SQS 程式碼範例
<a name="sqs_code_examples"></a>

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

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

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

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

**Contents**
+ [基本概念](sqs_code_examples_basics.md)
  + [Hello Amazon SQS](sqs_example_sqs_Hello_section.md)
  + [動作](sqs_code_examples_actions.md)
    + [`AddPermission`](sqs_example_sqs_AddPermission_section.md)
    + [`ChangeMessageVisibility`](sqs_example_sqs_ChangeMessageVisibility_section.md)
    + [`ChangeMessageVisibilityBatch`](sqs_example_sqs_ChangeMessageVisibilityBatch_section.md)
    + [`CreateQueue`](sqs_example_sqs_CreateQueue_section.md)
    + [`DeleteMessage`](sqs_example_sqs_DeleteMessage_section.md)
    + [`DeleteMessageBatch`](sqs_example_sqs_DeleteMessageBatch_section.md)
    + [`DeleteQueue`](sqs_example_sqs_DeleteQueue_section.md)
    + [`GetQueueAttributes`](sqs_example_sqs_GetQueueAttributes_section.md)
    + [`GetQueueUrl`](sqs_example_sqs_GetQueueUrl_section.md)
    + [`ListDeadLetterSourceQueues`](sqs_example_sqs_ListDeadLetterSourceQueues_section.md)
    + [`ListQueues`](sqs_example_sqs_ListQueues_section.md)
    + [`PurgeQueue`](sqs_example_sqs_PurgeQueue_section.md)
    + [`ReceiveMessage`](sqs_example_sqs_ReceiveMessage_section.md)
    + [`RemovePermission`](sqs_example_sqs_RemovePermission_section.md)
    + [`SendMessage`](sqs_example_sqs_SendMessage_section.md)
    + [`SendMessageBatch`](sqs_example_sqs_SendMessageBatch_section.md)
    + [`SetQueueAttributes`](sqs_example_sqs_SetQueueAttributes_section.md)
+ [案例](sqs_code_examples_scenarios.md)
  + [建立即時通訊軟體](sqs_example_cross_SQSMessageApp_section.md)
  + [建立傳訊應用程式](sqs_example_cross_StepFunctionsMessenger_section.md)
  + [建立 Amazon Textract Explorer 應用程式](sqs_example_cross_TextractExplorer_section.md)
  + [建立並發布到 FIFO 主題](sqs_example_sns_PublishFifoTopic_section.md)
  + [偵測映像中的人物和物件](sqs_example_cross_RekognitionVideoDetection_section.md)
  + [使用 S3 管理大型訊息](sqs_example_sqs_Scenario_SqsExtendedClient_section.md)
  + [處理 S3 事件通知](sqs_example_s3_Scenario_ProcessS3EventNotification_section.md)
  + [將訊息發佈至佇列](sqs_example_sqs_Scenario_TopicsAndQueues_section.md)
  + [傳送和接收批次訊息](sqs_example_sqs_Scenario_SendReceiveBatch_section.md)
  + [使用適用於 .NET AWS 的訊息處理架構搭配 Amazon SQS](sqs_example_cross_MessageProcessingFrameworkTutorial_section.md)
  + [使用 Amazon SQS Java 訊息程式庫即可使用 JMS 介面](sqs_example_sqs_Scenario_UseJMS_section.md)
  + [使用佇列標籤](sqs_example_sqs_Scenario_WorkWithTags_section.md)
+ [無伺服器範例](sqs_code_examples_serverless_examples.md)
  + [使用 Amazon SQS 觸發條件調用 Lambda 函數](sqs_example_serverless_SQS_Lambda_section.md)
  + [使用 Amazon SQS 觸發條件報告 Lambda 函數的批次項目失敗](sqs_example_serverless_SQS_Lambda_batch_item_failures_section.md)