����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.169 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/./././www/vendor/rackspace/php-opencloud/doc/services/autoscale/ |
Upload File : |
Groups
======
List all groups
---------------
.. code-block:: php
$groups = $service->groupList();
foreach ($group as $group) {
/** @var $group OpenCloud\Autoscale\Resources\Group */
}
Please consult the `iterator guide </iterators>`__ for more information about
iterators.
Retrieve group by ID
--------------------
.. code-block:: php
$group = $service->group('{groupId}');
Create a new group
------------------
.. code-block:: php
// Set the config object for this autoscale group; contains all of properties
// which determine its behaviour
$groupConfig = array(
'name' => 'new_autoscale_group',
'minEntities' => 5,
'maxEntities' => 25,
'cooldown' => 60,
);
// We need specify what is going to be launched. For now, we'll launch a new server
$launchConfig = array(
'type' => 'launch_server',
'args' => array(
'server' => array(
'flavorRef' => 3,
'name' => 'webhead',
'imageRef' => '0d589460-f177-4b0f-81c1-8ab8903ac7d8'
),
'loadBalancers' => array(
array('loadBalancerId' => 2200, 'port' => 8081),
)
)
);
// Do we want particular scaling policies?
$policy = array(
'name' => 'scale up by 10',
'change' => 10,
'cooldown' => 5,
'type' => 'webhook',
);
$group->create(array(
'groupConfiguration' => $groupConfig,
'launchConfiguration' => $launchConfig,
'scalingPolicies' => array($policy),
));
Delete a group
--------------
.. code-block:: php
$group->delete();
Get the current state of the scaling group
------------------------------------------
.. code-block:: php
$group->getState();