remove_permission ( $topic_arn, $label, $opt )

The RemovePermission action removes a statement from a topic’s access control policy.

Access

public

Parameters

Parameter

Type

Required

Description

$topic_arn

string

Required

The ARN of the topic whose access control policy you wish to modify.

$label

string

Required

The unique label of the statement you want to remove.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Remove a set of permissions.

$sns = new AmazonSNS();

// Remove a set of permissions
$response = $sns->remove_permission(
	'arn:aws:sns:us-east-1:9876543210:example-topic',
	'my-permission-label'
);

// Success?
var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/sns.class.php | Toggle source view (8 lines) | View on GitHub

public function remove_permission($topic_arn, $label, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['TopicArn'] = $topic_arn;
    $opt['Label'] = $label;
    
    return $this->authenticate('RemovePermission', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback