queues: Create or delete a queue

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Create or delete an SQS queue

Usage

1
2
3
create_queue(name, attributes = NULL, query = NULL, ...)

delete_queue(queue, query = NULL, ...)

Arguments

name

A character string containing a name for the queue.

attributes

Currently ignored

query

A list specifying additional query arguments to be passed to the query argument of sqsHTTP.

...

Additional arguments passed to sqsHTTP.

queue

A character string containing a queue URL, or the name of the queue.

Details

create_queue creates a new SQS queue; delete_queue deletes a queue.

Value

If successful, create_queue returns a character string containing an SQS Queue URL and delete_queue returns a logical TRUE. Otherwise, a data structure of class “aws_error” containing any error message(s) from AWS and information about the request attempt.

Author(s)

Thomas J. Leeper

References

CreateQueue DeleteQueue

See Also

get_queue_attrs set_queue_attrs link{purge_queue}

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
  # list current queues
  list_queues()
  
  # create a queue
  queue <- create_queue("ExampleQueue")
  get_queue_url("ExampleQueue")
  
  # send message to queue
  send_msg("ExampleQueue", "This is a test message")
  # receive a message
  (m <- receive_msg("ExampleQueue", timeout = 0))
  
  # delete a message from queue
  delete_msg("ExampleQueue", m$ReceiptHandle[1])
  
  # delete queue
  delete_queue("ExampleQueue")
  

## End(Not run)

cloudyr/aws.sqs documentation built on July 5, 2017, 5:03 a.m.