The DeleteTopic action deletes a topic and all its subscriptions. Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers. This action is idempotent, so deleting a topic that does not exist will not result in an error.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The ARN of the topic you want to delete. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Delete a topic.
$sns = new AmazonSNS(); // Delete a topic $response = $sns->delete_topic('arn:aws:sns:us-east-1:9876543210:example-topic'); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/sns.class.php | Toggle source view (7 lines) | View on GitHub