Returns descriptions of what each policy does. This action supports pagination. If the response
includes a token, there are more records available. To get the additional records, repeat the
request with the response token as the NextToken
parameter.
Access
Parameters
Parameter |
Type |
Required |
Description |
$opt
|
array
|
Optional
|
An associative array of parameters that can have the following keys:
AutoScalingGroupName - string - Optional - The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]* ]PolicyNames - string|array - Optional - A list of policy names or policy ARNs to be described. If this list is omitted, all policy names are described. If an auto scaling group name is provided, the results are limited to that group. The list of requested policy names cannot contain more than 50 items. If unknown policy names are requested, they are ignored with no error. Pass a string for a single value, or an indexed array for multiple values.NextToken - string - Optional - A string that is used to mark the start of the next batch of returned results for pagination. [Constraints: The value must match the following regular expression pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]* ]MaxRecords - integer - Optional - The maximum number of policies that will be described with each call.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
Examples
Describe all policies.
// Instantiate the class
$as = new AmazonAS();
$response = $as->describe_policies();
// Success?
var_dump($response->isOK());
Result:
bool(true)
Related Methods
Source
Method defined in services/as.class.php | Toggle source view (15 lines) | View on GitHub
public function describe_policies($opt = null)
{
if (!$opt) $opt = array();
// Optional list (non-map)
if (isset($opt['PolicyNames']))
{
$opt = array_merge($opt, CFComplexType::map(array(
'PolicyNames' => (is_array($opt['PolicyNames']) ? $opt['PolicyNames'] : array($opt['PolicyNames']))
), 'member'));
unset($opt['PolicyNames']);
}
return $this->authenticate('DescribePolicies', $opt);
}