2015-04-03 22:15:50 +00:00
|
|
|
.. _salt-cloud-functions:
|
|
|
|
|
2013-02-21 16:09:34 +00:00
|
|
|
===============
|
|
|
|
Cloud Functions
|
|
|
|
===============
|
|
|
|
|
|
|
|
Cloud functions work much the same way as cloud actions, except that they don't
|
|
|
|
perform an operation on a specific instance, and so do not need a machine name
|
|
|
|
to be specified. However, since they perform an operation on a specific cloud
|
|
|
|
provider, that provider must be specified.
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2013-03-07 16:55:44 +00:00
|
|
|
$ salt-cloud -f show_image ec2 image=ami-fd20ad94
|
2013-02-21 16:09:34 +00:00
|
|
|
|
2015-04-03 22:30:58 +00:00
|
|
|
There are three universal salt-cloud functions that are extremely useful for
|
|
|
|
gathering information about instances on a provider basis:
|
|
|
|
|
2015-05-27 02:48:03 +00:00
|
|
|
* ``list_nodes``: Returns some general information about the instances for the given provider.
|
|
|
|
* ``list_nodes_full``: Returns all information about the instances for the given provider.
|
|
|
|
* ``list_nodes_select``: Returns select information about the instances for the given provider.
|
2015-04-03 22:30:58 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ salt-cloud -f list_nodes linode
|
|
|
|
$ salt-cloud -f list_nodes_full linode
|
|
|
|
$ salt-cloud -f list_nodes_select linode
|
|
|
|
|
2015-04-03 22:15:50 +00:00
|
|
|
Another useful reference for viewing salt-cloud functions is the
|
2015-05-19 14:28:53 +00:00
|
|
|
:ref:`Salt Cloud Feature Matrix <salt-cloud-feature-matrix>`.
|