The SetTopicAttributes action allows a topic owner to set an attribute of the topic to a new value.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The ARN of the topic to modify. |
|
|
Required |
The name of the attribute you want to set. Only a subset of the topic’s attributes are mutable. Valid values: Policy | DisplayName |
|
|
Required |
The new value for the attribute. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Set an attribute for a given topic.
$sns = new AmazonSNS(); // Get topic attributes $response = $sns->set_topic_attributes( 'arn:aws:sns:us-east-1:9876543210:example-topic', 'DisplayName', 'my-display-value' ); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/sns.class.php | Toggle source view (9 lines) | View on GitHub