Resumes Auto Scaling processes for an Auto Scaling group. For more information, see
SuspendProcesses
and ProcessType
.
Access
Parameters
Parameter |
Type |
Required |
Description |
$auto_scaling_group_name
|
string
|
Required
|
The name or Amazon Resource Name (ARN) 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]* ] |
$opt
|
array
|
Optional
|
An associative array of parameters that can have the following keys:
ScalingProcesses - string|array - Optional - The processes that you want to suspend or resume, which can include one or more of the following:- Launch
- Terminate
- HealthCheck
- ReplaceUnhealthy
- AZRebalance
- AlarmNotification
- ScheduledActions
- AddToLoadBalancer
To suspend all process types, omit this parameter. Pass a string for a single value, or an indexed array for multiple values.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
Resume autoscaling processes.
// Instantiate the class
$as = new AmazonAS();
$response = $as->resume_processes('my-scaling-group', array(
'ScalingProcesses' => array(
'ReplaceUnhealthy',
'HealthCheck',
'ScheduledActions'
)
));
// Success?
var_dump($response->isOK());
Result:
bool(true)
Related Methods
Source
Method defined in services/as.class.php | Toggle source view (16 lines) | View on GitHub
public function resume_processes($auto_scaling_group_name, $opt = null)
{
if (!$opt) $opt = array();
$opt['AutoScalingGroupName'] = $auto_scaling_group_name;
// Optional list (non-map)
if (isset($opt['ScalingProcesses']))
{
$opt = array_merge($opt, CFComplexType::map(array(
'ScalingProcesses' => (is_array($opt['ScalingProcesses']) ? $opt['ScalingProcesses'] : array($opt['ScalingProcesses']))
), 'member'));
unset($opt['ScalingProcesses']);
}
return $this->authenticate('ResumeProcesses', $opt);
}