Fix documentation on boto_asg and boto_elb modules and states

This commit is contained in:
Jonathan Ballet 2016-04-06 18:16:13 +02:00
parent b706d3aa4d
commit 77c4772752
3 changed files with 50 additions and 33 deletions

View File

@ -115,7 +115,7 @@ def exists(name, region=None, key=None, keyid=None, profile=None):
def get_elb_config(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if an ELB exists.
Get an ELB configuration.
CLI example::

View File

@ -55,7 +55,6 @@ as a passed in dict, or as a string to pull from pillars or minion config:
- AddToLoadBalancer
- AlarmNotification
- scaling_policies
----------
- adjustment_type: ChangeInCapacity
- as_name: api-production-iad
- cooldown: 1800
@ -251,17 +250,17 @@ def present(
Name of the autoscale group.
launch_config_name
Name of the launch config to use for the group. Or, if
launch_config is specified, this will be the launch config
name's prefix. (see below)
Name of the launch config to use for the group. Or, if
``launch_config`` is specified, this will be the launch config
name's prefix. (see below)
launch_config
A dictionary of launch config attributes. If specified, a
launch config will be used or created, matching this set
of attributes, and the autoscale group will be set to use
that launch config. The launch config name will be the
launch_config_name followed by a hyphen followed by a hash
of the launch_config dict contents.
A dictionary of launch config attributes. If specified, a
launch config will be used or created, matching this set
of attributes, and the autoscale group will be set to use
that launch config. The launch config name will be the
``launch_config_name`` followed by a hyphen followed by a hash
of the ``launch_config`` dict contents.
availability_zones
List of availability zones for the group.
@ -300,15 +299,23 @@ def present(
tags
A list of tags. Example:
.. code-block:: yaml
- key: 'key'
value: 'value'
propagate_at_launch: true
termination_policies
A list of termination policies. Valid values are: OldestInstance,
NewestInstance, OldestLaunchConfiguration,
ClosestToNextInstanceHour, Default. If no value is specified, the
Default value is used.
A list of termination policies. Valid values are:
* ``OldestInstance``
* ``NewestInstance``
* ``OldestLaunchConfiguration``
* ``ClosestToNextInstanceHour``
* ``Default``
If no value is specified, the ``Default`` value is used.
suspended_processes
List of processes to be suspended. see
@ -326,7 +333,9 @@ def present(
a dictionary of name->boto_cloudwatch_alarm sections to be associated with this ASG.
All attributes should be specified except for dimension which will be
automatically set to this ASG.
See the boto_cloudwatch_alarm state for information about these attributes.
See the :mod:`salt.states.boto_cloudwatch_alarm` state for information
about these attributes.
alarms_from_pillar:
name of pillar dict that contains alarm settings. Alarms defined for this specific
@ -346,24 +355,27 @@ def present(
that contains a dict with region, key and keyid.
notification_arn
The aws arn that notifications will be sent to
The AWS arn that notifications will be sent to
notification_arn_from_pillar
name of the pillar dict that contains notifcation_arn settings. A notification_arn
defined for this specific state will override the one from pillar.
name of the pillar dict that contains ``notifcation_arn`` settings. A
``notification_arn`` defined for this specific state will override the
one from pillar.
notification_types
A list of event names that will trigger a notification. The list of valid
notification types is:
"autoscaling:EC2_INSTANCE_LAUNCH",
"autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
"autoscaling:EC2_INSTANCE_TERMINATE",
"autoscaling:EC2_INSTANCE_TERMINATE_ERROR",
"autoscaling:TEST_NOTIFICATION"
* ``autoscaling:EC2_INSTANCE_LAUNCH``
* ``autoscaling:EC2_INSTANCE_LAUNCH_ERROR``
* ``autoscaling:EC2_INSTANCE_TERMINATE``
* ``autoscaling:EC2_INSTANCE_TERMINATE_ERROR``
* ``autoscaling:TEST_NOTIFICATION``
notification_types_from_pillar
name of the pillar dict that contains notifcation_types settings. Notification_types
defined for this specific state will override those from the pillar.
name of the pillar dict that contains ``notifcation_types`` settings.
``notification_types`` defined for this specific state will override those
from the pillar.
'''
ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
if vpc_zone_identifier:

View File

@ -240,10 +240,10 @@ def present(
listeners
A list of listener lists; example::
[
['443', 'HTTPS', 'arn:aws:iam::1111111:server-certificate/mycert'],
['8443', '80', 'HTTPS', 'HTTP', 'arn:aws:iam::1111111:server-certificate/mycert']
]
[
['443', 'HTTPS', 'arn:aws:iam::1111111:server-certificate/mycert'],
['8443', '80', 'HTTPS', 'HTTP', 'arn:aws:iam::1111111:server-certificate/mycert']
]
subnets
A list of subnet IDs in your VPC to attach to your LoadBalancer.
@ -252,7 +252,8 @@ def present(
The security groups assigned to your LoadBalancer within your VPC.
scheme
The type of a LoadBalancer. internet-facing or internal. Once set, can not be modified.
The type of a LoadBalancer, ``internet-facing`` or ``internal``. Once
set, can not be modified.
health_check
A dict defining the health check for this ELB.
@ -266,13 +267,17 @@ def present(
cnames
A list of cname dicts with attributes: name, zone, ttl, and identifier.
See the boto_route53 state for information about these attributes.
See the :mod:`salt.states.boto_route53` state for information about
these attributes.
alarms:
a dictionary of name->boto_cloudwatch_alarm sections to be associated with this ELB.
All attributes should be specified except for dimension which will be
automatically set to this ELB.
See the boto_cloudwatch_alarm state for information about these attributes.
See the :mod:`salt.states.boto_cloudwatch_alarm` state for information
about these attributes.
alarms_from_pillar:
name of pillar dict that contains alarm settings. Alarms defined for this specific