2023-05-19 12:41:38 -04:00
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
2024-10-16 11:53:18 -04:00
import { fileURLToPath } from "node:url" ;
2023-05-19 12:41:38 -04:00
// 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 ( ) ;
}