SIGN IN SIGN UP

Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.

0 0 36 Java
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { fileURLToPath } from "node:url";
// snippet-start:[sqs.JavaScript.queues.deleteQueueV3]
import { DeleteQueueCommand, SQSClient } from "@aws-sdk/client-sqs";
const client = new SQSClient({});
const SQS_QUEUE_URL = "test-queue-url";
export const main = async (queueUrl = SQS_QUEUE_URL) => {
const command = new DeleteQueueCommand({ QueueUrl: queueUrl });
const response = await client.send(command);
console.log(response);
return response;
};
// snippet-end:[sqs.JavaScript.queues.deleteQueueV3]
// Invoke main function if this file was run directly.
if (process.argv[1] === fileURLToPath(import.meta.url)) {
main();
}