Learn R Programming

aws.sns (version 0.1.7)

create_topic: Manage topics

Description

Create, delete, and list topics

Usage

create_topic(name, ...)

delete_topic(topic, ...)

list_topics(token, ...)

Arguments

name

A character string containing a (private) name for the topic.

...

Additional arguments passed to snsHTTP.

topic

A character string containing an SNS Topic Amazon Resource Name (ARN).

token

A paging paramter used to return additional pages of results. This will be available in the “NextToken” attribute of a previous call to list_topics.

Value

For create_topic: If successful, a character string containing an SNS Topic ARN. Otherwise, a data structure of class “aws_error” containing any error message(s) from AWS and information about the request attempt. For delete_topic: If successful, a logical TRUE. Otherwise, a data structure of class “aws_error” containing any error message(s) from AWS and information about the request attempt. For list_topics: If successful, a data frame. Otherwise, a data structure of class “aws_error” containing any error message(s) from AWS and information about the request attempt.

Details

create_topic creates a new topic. The name is a private name for the topic. Use set_topic_attrs to set a publicly visible name for the topic. delete_topic deletes a named topic. list_topics lists all currently available topics.

list_topics lists topics. Up to 100 subscriptions are returned by each request. The token argument can be used to return additional results.

References

CreateTopic DeleteTopic ListTopics

See Also

link{delete_topic}

Examples

Run this code

  top <- create_topic("new_topic")
  get_topic_attrs(top)
  list_topics()
  delete_topic(top)

Run the code above in your browser using DataLab