To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId parameter to specify the account ID of the queue's owner. The queue's owner must grant you permission to access the queue.
For more information about shared queue access, see AddPermission or see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS Developer Guide.
example
Use a bare-bones client and the command you need to make an API call.
Returns the URL of an existing Amazon SQS queue.
To access a queue that belongs to another AWS account, use the
QueueOwnerAWSAccountId
parameter to specify the account ID of the queue's owner. The queue's owner must grant you permission to access the queue. For more information about shared queue access, seeAddPermission
or see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS Developer Guide.Use a bare-bones client and the command you need to make an API call.
import { SQSClient, GetQueueUrlCommand } from "@aws-sdk/client-sqs"; // ES Modules import // const { SQSClient, GetQueueUrlCommand } = require("@aws-sdk/client-sqs"); // CommonJS import const client = new SQSClient(config); const command = new GetQueueUrlCommand(input); const response = await client.send(command);
GetQueueUrlCommandInput for command's
input
shape.GetQueueUrlCommandOutput for command's
response
shape.config for SQSClient's
config
shape.