remove_permission ( $queue_url, $label, $opt )

The RemovePermission action revokes any permissions in the queue policy that matches the specified Label parameter. Only the owner of the queue can remove permissions.

Access

public

Parameters

Parameter

Type

Required

Description

$queue_url

string

Required

The URL of the SQS queue to take action on.

$label

string

Required

The identification of the permission to remove. This is the label added with the AddPermission operation.

$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 named set of permissions.

// Add permissions to a queue
$sqs = new AmazonSQS();
$response = $sqs->remove_permission('example-queue', 'SDKTesting');

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

Related Methods

Source

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

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback