CLI examples consistency

This commit is contained in:
Pedro Algarvio 2020-09-24 13:15:35 +01:00 committed by Megan Wilhite
parent dc6390e58a
commit 9d6dea2a0e
54 changed files with 879 additions and 373 deletions

View file

@ -864,7 +864,7 @@ This proxymodule enables "package" installation.
List "packages" by executing a command via ssh
This function is called in response to the salt command
..code-block::bash
.. code-block::bash
salt target_minion pkg.list_pkgs
"""

View file

@ -95,7 +95,7 @@ proxy:
Proxies can be better tracked via system process utilities:
..code-block:: bash
.. code-block:: bash
root@raring64:/var/log/salt# ps guax | grep p8
root 15215 pts/3 S+ 10:57 0:00 python salt-proxy -l debug --proxyid=p8000

View file

@ -172,7 +172,7 @@ def cert(
:return: Dictionary with 'result' True/False/None, 'comment' and certificate's
expiry date ('not_after')
CLI example:
CLI Example:
.. code-block:: bash
@ -297,7 +297,7 @@ def certs():
"""
Return a list of active certificates
CLI example:
CLI Example:
.. code-block:: bash
@ -321,7 +321,7 @@ def info(name):
the certificate information, the information will be retrieved as one
big text block under the key ``text`` using the openssl cli.
CLI example:
CLI Example:
.. code-block:: bash
@ -354,7 +354,7 @@ def expires(name):
:rtype: str
:return: Expiry date in ISO format.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -2914,7 +2914,7 @@ def info_installed(*names, **kwargs):
.. versionadded:: 2016.11.3
CLI example:
CLI Example:
.. code-block:: bash
@ -2986,7 +2986,7 @@ def list_downloaded(root=None, **kwargs):
root
operate on a different root directory.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -54,7 +54,7 @@ def uuid(dev=None):
Return the bcache UUID of a block device.
If no device is given, the Cache UUID is returned.
CLI example:
CLI Example:
.. code-block:: bash
@ -79,7 +79,7 @@ def attach_(dev=None):
Attach a backing devices to a cache set
If no dev is given, all backing devices will be attached.
CLI example:
CLI Example:
.. code-block:: bash
@ -136,7 +136,7 @@ def detach(dev=None):
Detaching a backing device will flush its write cache.
This should leave the underlying device in a consistent state, but might take a while.
CLI example:
CLI Example:
.. code-block:: bash
@ -167,7 +167,7 @@ def start():
"""
Trigger a start of the full bcache system through udev.
CLI example:
CLI Example:
.. code-block:: bash
@ -194,7 +194,7 @@ def stop(dev=None):
'Stop' on an individual backing device means hard-stop;
no attempt at flushing will be done and the bcache device will seemingly 'disappear' from the device lists
CLI example:
CLI Example:
.. code-block:: bash
@ -230,7 +230,7 @@ def back_make(dev, cache_mode="writeback", force=False, attach=True, bucket_size
Create a backing device for attachment to a set.
Because the block size must be the same, a cache set already needs to exist.
CLI example:
CLI Example:
.. code-block:: bash
@ -299,7 +299,7 @@ def cache_make(
Create BCache cache on a block device.
If blkdiscard is available the entire device will be properly cleared in advance.
CLI example:
CLI Example:
.. code-block:: bash
@ -404,7 +404,7 @@ def config_(dev=None, **kwargs):
If no device is given, operate on the cache set itself.
CLI example:
CLI Example:
.. code-block:: bash
@ -450,7 +450,7 @@ def status(stats=False, config=False, internals=False, superblock=False, alldevs
"""
Show the full status of the BCache system and optionally all its involved devices
CLI example:
CLI Example:
.. code-block:: bash
@ -499,7 +499,7 @@ def device(dev, stats=False, config=False, internals=False, superblock=False):
"""
Check the state of a single bcache device
CLI example:
CLI Example:
.. code-block:: bash
@ -620,7 +620,7 @@ def super_(dev):
"""
Read out BCache SuperBlock
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -245,7 +245,9 @@ def start_transaction(hostname, username, password, label):
The name / alias for this transaction. The actual transaction
id will be stored within a grain called ``bigip_f5_trans:<label>``
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.start_transaction bigip admin admin my_transaction
@ -295,7 +297,9 @@ def list_transaction(hostname, username, password, label):
the label of this transaction stored within the grain:
``bigip_f5_trans:<label>``
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.list_transaction bigip admin admin my_transaction
@ -339,7 +343,9 @@ def commit_transaction(hostname, username, password, label):
the label of this transaction stored within the grain:
``bigip_f5_trans:<label>``
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.commit_transaction bigip admin admin my_transaction
"""
@ -386,7 +392,9 @@ def delete_transaction(hostname, username, password, label):
The label of this transaction stored within the grain:
``bigip_f5_trans:<label>``
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.delete_transaction bigip admin admin my_transaction
"""
@ -433,7 +441,9 @@ def list_node(hostname, username, password, name=None, trans_label=None):
The label of the transaction stored within the grain:
``bigip_f5_trans:<label>``
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.list_node bigip admin admin my-node
"""
@ -476,7 +486,9 @@ def create_node(hostname, username, password, name, address, trans_label=None):
The label of the transaction stored within the grain:
``bigip_f5_trans:<label>``
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.create_node bigip admin admin 10.1.1.2
"""
@ -550,7 +562,9 @@ def modify_node(
The label of the transaction stored within the grain:
``bigip_f5_trans:<label>``
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.modify_node bigip admin admin 10.1.1.2 ratio=2 logging=enabled
"""
@ -603,7 +617,9 @@ def delete_node(hostname, username, password, name, trans_label=None):
The label of the transaction stored within the grain:
``bigip_f5_trans:<label>``
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.delete_node bigip admin admin my-node
"""
@ -639,7 +655,9 @@ def list_pool(hostname, username, password, name=None):
The name of the pool to list. If no name is specified then all pools
will be listed.
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.list_pool bigip admin admin my-pool
"""
@ -763,7 +781,9 @@ def create_pool(
slow_ramp_time
[integer]
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.create_pool bigip admin admin my-pool 10.1.1.1:80,10.1.1.2:80,10.1.1.3:80 monitor=http
"""
@ -919,7 +939,9 @@ def modify_pool(
slow_ramp_time
[integer]
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.modify_pool bigip admin admin my-pool 10.1.1.1:80,10.1.1.2:80,10.1.1.3:80 min_active_members=1
"""
@ -990,7 +1012,9 @@ def delete_pool(hostname, username, password, name):
name
The name of the pool which will be deleted
CLI Example::
CLI Example
.. code-block:: bash
salt '*' bigip.delete_node bigip admin admin my-pool
"""
@ -1028,7 +1052,9 @@ def replace_pool_members(hostname, username, password, name, members):
List of comma delimited pool members to replace existing members with.
i.e. 10.1.1.1:80,10.1.1.2:80,10.1.1.3:80
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.replace_pool_members bigip admin admin my-pool 10.2.2.1:80,10.2.2.2:80,10.2.2.3:80
"""
@ -1194,7 +1220,9 @@ def modify_pool_member(
state
[ user-up | user-down ]
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.modify_pool_member bigip admin admin my-pool 10.2.2.1:80 state=use-down session=user-disabled
"""
@ -1248,7 +1276,9 @@ def delete_pool_member(hostname, username, password, name, member):
member
The name of the pool member to delete
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.delete_pool_member bigip admin admin my-pool 10.2.2.2:80
"""
@ -1285,7 +1315,9 @@ def list_virtual(hostname, username, password, name=None):
The name of the virtual to list. If no name is specified than all
virtuals will be listed.
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.list_virtual bigip admin admin my-virtual
"""
@ -1450,7 +1482,9 @@ def create_virtual(
vlans
[none | default | [enabled|disabled]:vlan1,vlan2,vlan3 ... ]
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' bigip.create_virtual bigip admin admin my-virtual-3 26.2.2.5:80 \
pool=my-http-pool-http profiles=http,tcp
@ -1751,7 +1785,9 @@ def modify_virtual(
vlans
[none | default | [enabled|disabled]:vlan1,vlan2,vlan3 ... ]
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.modify_virtual bigip admin admin my-virtual source_address_translation=none
salt '*' bigip.modify_virtual bigip admin admin my-virtual rules=my-rule,my-other-rule
@ -1906,7 +1942,9 @@ def delete_virtual(hostname, username, password, name):
name
The name of the virtual to delete
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.delete_virtual bigip admin admin my-virtual
"""
@ -1947,7 +1985,9 @@ def list_monitor(
name
The name of the monitor to list
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.list_monitor bigip admin admin http my-http-monitor
@ -1994,7 +2034,9 @@ def create_monitor(hostname, username, password, monitor_type, name, **kwargs):
Consult F5 BIGIP user guide for specific options for each monitor type.
Typically, tmsh arg names are used.
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.create_monitor bigip admin admin http my-http-monitor timeout=10 interval=5
"""
@ -2045,7 +2087,9 @@ def modify_monitor(hostname, username, password, monitor_type, name, **kwargs):
Consult F5 BIGIP user guide for specific options for each monitor type.
Typically, tmsh arg names are used.
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.modify_monitor bigip admin admin http my-http-monitor timout=16 interval=6
@ -2093,7 +2137,9 @@ def delete_monitor(hostname, username, password, monitor_type, name):
name
The name of the monitor to delete
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.delete_monitor bigip admin admin http my-http-monitor
@ -2135,7 +2181,9 @@ def list_profile(
name
The name of the profile to list
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.list_profile bigip admin admin http my-http-profile
@ -2206,7 +2254,9 @@ def create_profile(hostname, username, password, profile_type, name, **kwargs):
Use ``\,`` or ``\:`` or ``\|`` to escape characters which shouldn't
be treated as delimiters i.e. ``ciphers='DEFAULT\:!SSLv3'``
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' bigip.create_profile bigip admin admin http my-http-profile defaultsFrom='/Common/http'
salt '*' bigip.create_profile bigip admin admin http my-http-profile defaultsFrom='/Common/http' \
@ -2293,7 +2343,9 @@ def modify_profile(hostname, username, password, profile_type, name, **kwargs):
Use ``\,`` or ``\:`` or ``\|`` to escape characters which shouldn't
be treated as delimiters i.e. ``ciphers='DEFAULT\:!SSLv3'``
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' bigip.modify_profile bigip admin admin http my-http-profile defaultsFrom='/Common/http'
@ -2354,7 +2406,9 @@ def delete_profile(hostname, username, password, profile_type, name):
name
The name of the profile to delete
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' bigip.delete_profile bigip admin admin http my-http-profile

View file

@ -369,7 +369,9 @@ def create_hosted_zone(
profile
Dict, or pillar key pointing to a dict, containing AWS region/key/keyid.
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto3_route53.create_hosted_zone example.org.
"""
@ -483,7 +485,9 @@ def update_hosted_zone_comment(
PrivateZone
Boolean - Set to True if changing a private hosted zone.
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto3_route53.update_hosted_zone_comment Name=example.org. \
Comment="This is an example comment for an example zone"
@ -572,7 +576,9 @@ def associate_vpc_with_hosted_zone(
Comment
Any comments you want to include about the change being made.
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto3_route53.associate_vpc_with_hosted_zone \
Name=example.org. VPCName=myVPC \
@ -696,7 +702,9 @@ def disassociate_vpc_from_hosted_zone(
Comment
Any comments you want to include about the change being made.
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto3_route53.disassociate_vpc_from_hosted_zone \
Name=example.org. VPCName=myVPC \
@ -801,7 +809,9 @@ def delete_hosted_zone(Id, region=None, key=None, keyid=None, profile=None):
"""
Delete a Route53 hosted zone.
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto3_route53.delete_hosted_zone Z1234567890
"""
@ -820,7 +830,9 @@ def delete_hosted_zone_by_domain(
"""
Delete a Route53 hosted zone by domain name, and PrivateZone status if provided.
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto3_route53.delete_hosted_zone_by_domain example.org.
"""
@ -975,7 +987,9 @@ def get_resource_records(
False), CommandExecutionError can be raised in the case of both public and private zones
matching the domain. XXX FIXME DOCU
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_route53.get_records test.example.org example.org A
"""

View file

@ -75,7 +75,9 @@ def list_topics(region=None, key=None, keyid=None, profile=None):
"""
Returns a list of the requester's topics
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.list_topics
"""
@ -96,7 +98,9 @@ def describe_topic(name, region=None, key=None, keyid=None, profile=None):
"""
Returns details about a specific SNS topic, specified by name or ARN.
CLI example::
CLI Example:
.. code-block:: bash
salt my_favorite_client boto3_sns.describe_topic a_sns_topic_of_my_choice
"""
@ -126,7 +130,9 @@ def topic_exists(name, region=None, key=None, keyid=None, profile=None):
"""
Check to see if an SNS topic exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.topic_exists mytopic region=us-east-1
"""
@ -138,7 +144,9 @@ def create_topic(Name, region=None, key=None, keyid=None, profile=None):
"""
Create an SNS topic.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.create_topic mytopic region=us-east-1
"""
@ -159,7 +167,9 @@ def delete_topic(TopicArn, region=None, key=None, keyid=None, profile=None):
"""
Delete an SNS topic.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.delete_topic mytopic region=us-east-1
"""
@ -178,7 +188,9 @@ def get_topic_attributes(TopicArn, region=None, key=None, keyid=None, profile=No
Returns all of the properties of a topic. Topic properties returned might differ based on the
authorization of the user.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.get_topic_attributes someTopic region=us-west-1
"""
@ -202,7 +214,9 @@ def set_topic_attributes(
"""
Set an attribute of a topic to a new value.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.set_topic_attributes someTopic DisplayName myDisplayNameValue
"""
@ -237,7 +251,9 @@ def list_subscriptions_by_topic(
"""
Returns a list of the subscriptions to a specific topic
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.list_subscriptions_by_topic mytopic region=us-east-1
"""
@ -262,7 +278,9 @@ def list_subscriptions(region=None, key=None, keyid=None, profile=None):
"""
Returns a list of the requester's topics
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.list_subscriptions region=us-east-1
"""
@ -287,7 +305,9 @@ def get_subscription_attributes(
"""
Returns all of the properties of a subscription.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.get_subscription_attributes somesubscription region=us-west-1
"""
@ -317,7 +337,9 @@ def set_subscription_attributes(
"""
Set an attribute of a subscription to a new value.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.set_subscription_attributes someSubscription RawMessageDelivery jsonStringValue
"""
@ -352,7 +374,9 @@ def subscribe(
"""
Subscribe to a Topic.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto3_sns.subscribe mytopic https https://www.example.com/sns-endpoint
"""

View file

@ -105,7 +105,9 @@ def exists(name, region=None, key=None, keyid=None, profile=None):
"""
Check to see if an autoscale group exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.exists myasg region=us-east-1
"""
@ -134,7 +136,9 @@ def get_config(name, region=None, key=None, keyid=None, profile=None):
"""
Get the configuration for an autoscale group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.get_config myasg region=us-east-1
"""
@ -259,7 +263,9 @@ def create(
"""
Create an autoscale group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.create myasg mylc '["us-east-1a", "us-east-1e"]' 1 10 load_balancers='["myelb", "myelb2"]' tags='[{"key": "Name", value="myasg", "propagate_at_launch": True}]'
"""
@ -372,7 +378,9 @@ def update(
"""
Update an autoscale group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.update myasg mylc '["us-east-1a", "us-east-1e"]' 1 10 load_balancers='["myelb", "myelb2"]' tags='[{"key": "Name", value="myasg", "propagate_at_launch": True}]'
"""
@ -550,7 +558,9 @@ def delete(name, force=False, region=None, key=None, keyid=None, profile=None):
"""
Delete an autoscale group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.delete myasg region=us-east-1
"""
@ -610,7 +620,9 @@ def launch_configuration_exists(name, region=None, key=None, keyid=None, profile
"""
Check for a launch configuration's existence.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.launch_configuration_exists mylc
"""
@ -641,7 +653,9 @@ def get_all_launch_configurations(region=None, key=None, keyid=None, profile=Non
"""
Fetch and return all Launch Configuration with details.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.get_all_launch_configurations
"""
@ -664,7 +678,9 @@ def list_launch_configurations(region=None, key=None, keyid=None, profile=None):
"""
List all Launch Configurations.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.list_launch_configurations
"""
@ -678,7 +694,9 @@ def describe_launch_configuration(
"""
Dump details of a given launch configuration.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.describe_launch_configuration mylc
"""
@ -734,7 +752,9 @@ def create_launch_configuration(
"""
Create a launch configuration.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.create_launch_configuration mylc image_id=ami-0b9c9f62 key_name='mykey' security_groups='["mygroup"]' instance_type='c3.2xlarge'
"""
@ -810,7 +830,9 @@ def delete_launch_configuration(name, region=None, key=None, keyid=None, profile
"""
Delete a launch configuration.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_asg.delete_launch_configuration mylc
"""
@ -841,7 +863,9 @@ def get_scaling_policy_arn(
if not found. Mainly used as a helper method for boto_cloudwatch_alarm, for
linking alarms to scaling policies.
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' boto_asg.get_scaling_policy_arn mygroup mypolicy
"""
@ -873,7 +897,7 @@ def get_all_groups(region=None, key=None, keyid=None, profile=None):
.. versionadded:: 2016.11.0
CLI example:
CLI Example:
.. code-block:: bash
@ -908,7 +932,7 @@ def list_groups(region=None, key=None, keyid=None, profile=None):
.. versionadded:: 2016.11.0
CLI example:
CLI Example:
.. code-block:: bash
@ -935,7 +959,9 @@ def get_instances(
"""
return attribute of all instances in the named autoscale group.
CLI example::
CLI Example:
.. code-block:: bash
salt-call boto_asg.get_instances my_autoscale_group_name
@ -1009,7 +1035,9 @@ def enter_standby(
.. versionadded:: 2016.11.0
CLI example::
CLI Example:
.. code-block:: bash
salt-call boto_asg.enter_standby my_autoscale_group_name '["i-xxxxxx"]'
@ -1047,7 +1075,9 @@ def exit_standby(
.. versionadded:: 2016.11.0
CLI example::
CLI Example:
.. code-block:: bash
salt-call boto_asg.exit_standby my_autoscale_group_name '["i-xxxxxx"]'

View file

@ -81,7 +81,9 @@ def get_alarm(name, region=None, key=None, keyid=None, profile=None):
"""
Get alarm details. Also can be used to check to see if an alarm exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch.get_alarm myalarm region=us-east-1
"""
@ -152,7 +154,9 @@ def get_all_alarms(region=None, prefix=None, key=None, keyid=None, profile=None)
$ salt-call boto_cloudwatch.get_all_alarms --out=txt | sed "s/local: //" > final_alarms.sls
$ diff final_alarms.sls managed_alarms.sls
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch.get_all_alarms region=us-east-1 --out=txt
"""
@ -216,7 +220,7 @@ def create_or_update_alarm(
boto_cloudwatch_alarm.present states which have alarm_actions that
reference the scaling_policy.
CLI example:
CLI Example:
salt myminion boto_cloudwatch.create_alarm name=myalarm ... region=us-east-1
"""
@ -289,7 +293,9 @@ def convert_to_arn(arns, region=None, key=None, keyid=None, profile=None):
Convert a list of strings into actual arns. Converts convenience names such
as 'scaling_policy:...'
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' convert_to_arn 'scaling_policy:'
"""

View file

@ -87,7 +87,9 @@ def exists(Name, region=None, key=None, keyid=None, profile=None):
Returns True if the given rule exists and returns False if the given
rule does not exist.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.exists myevent region=us-east-1
"""
@ -220,7 +222,9 @@ def list_rules(region=None, key=None, keyid=None, profile=None):
"""
List, with details, all Cloudwatch Event rules visible in the current scope.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.list_rules region=us-east-1
"""

View file

@ -35,7 +35,7 @@ def activate_pipeline(pipeline_id, region=None, key=None, keyid=None, profile=No
"""
Start processing pipeline tasks. This function is idempotent.
CLI example:
CLI Example:
.. code-block:: bash
@ -57,7 +57,7 @@ def create_pipeline(
"""
Create a new, empty pipeline. This function is idempotent.
CLI example:
CLI Example:
.. code-block:: bash
@ -79,7 +79,7 @@ def delete_pipeline(pipeline_id, region=None, key=None, keyid=None, profile=None
"""
Delete a pipeline, its pipeline definition, and its run history. This function is idempotent.
CLI example:
CLI Example:
.. code-block:: bash
@ -99,7 +99,7 @@ def describe_pipelines(pipeline_ids, region=None, key=None, keyid=None, profile=
"""
Retrieve metadata about one or more pipelines.
CLI example:
CLI Example:
.. code-block:: bash
@ -120,7 +120,7 @@ def get_pipeline_definition(
"""
Get the definition of the specified pipeline.
CLI example:
CLI Example:
.. code-block:: bash
@ -164,7 +164,7 @@ def pipeline_id_from_name(name, region=None, key=None, keyid=None, profile=None)
"""
Get the pipeline id, if it exists, for the given name.
CLI example:
CLI Example:
.. code-block:: bash
@ -197,7 +197,7 @@ def put_pipeline_definition(
Add tasks, schedules, and preconditions to the specified pipeline. This function is
idempotent and will replace an existing definition.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -222,7 +222,9 @@ def update(
"""
Update a DynamoDB table.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_dynamodb.update table_name region=us-east-1
"""
@ -269,7 +271,9 @@ def describe(table_name, region=None, key=None, keyid=None, profile=None):
"""
Describe a DynamoDB table.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_dynamodb.describe table_name region=us-east-1
"""

View file

@ -82,7 +82,9 @@ def exists(name, region=None, key=None, keyid=None, profile=None):
"""
Check to see if a cache cluster exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.exists myelasticache
"""
@ -100,7 +102,9 @@ def group_exists(name, region=None, key=None, keyid=None, profile=None):
"""
Check to see if a replication group exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.group_exists myelasticache
"""
@ -127,7 +131,9 @@ def create_replication_group(
"""
Create replication group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.create_replication_group myelasticache myprimarycluster description
"""
@ -160,7 +166,9 @@ def delete_replication_group(name, region=None, key=None, keyid=None, profile=No
"""
Delete an ElastiCache replication group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.delete_replication_group my-replication-group \
region=us-east-1
@ -186,7 +194,9 @@ def describe_replication_group(
"""
Get replication group information.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.describe_replication_group mygroup
"""
@ -254,7 +264,9 @@ def get_config(name, region=None, key=None, keyid=None, profile=None):
"""
Get the configuration for a cache cluster.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.get_config myelasticache
"""
@ -331,7 +343,9 @@ def get_node_host(name, region=None, key=None, keyid=None, profile=None):
"""
Get hostname from cache node
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.get_node_host myelasticache
"""
@ -356,7 +370,9 @@ def get_group_host(name, region=None, key=None, keyid=None, profile=None):
"""
Get hostname from replication cache group
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.get_group_host myelasticachegroup
"""
@ -384,7 +400,9 @@ def get_all_cache_subnet_groups(
"""
Return a list of all cache subnet groups with details
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.get_all_subnet_groups region=us-east-1
"""
@ -415,7 +433,9 @@ def list_cache_subnet_groups(
"""
Return a list of all cache subnet group names
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.list_subnet_groups region=us-east-1
"""
@ -431,7 +451,9 @@ def subnet_group_exists(
"""
Check to see if an ElastiCache subnet group exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.subnet_group_exists my-param-group \
region=us-east-1
@ -509,7 +531,9 @@ def get_cache_subnet_group(name, region=None, key=None, keyid=None, profile=None
"""
Get information about a cache subnet group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.get_cache_subnet_group mycache_subnet_group
"""
@ -553,7 +577,9 @@ def delete_subnet_group(name, region=None, key=None, keyid=None, profile=None):
"""
Delete an ElastiCache subnet group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.delete_subnet_group my-subnet-group \
region=us-east-1
@ -599,7 +625,9 @@ def create(
"""
Create a cache cluster.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.create myelasticache 1 redis cache.t1.micro
cache_security_group_names='["myelasticachesg"]'
@ -647,7 +675,9 @@ def delete(name, wait=False, region=None, key=None, keyid=None, profile=None):
"""
Delete a cache cluster.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.delete myelasticache
"""
@ -680,7 +710,9 @@ def create_cache_security_group(
"""
Create a cache security group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.create_cache_security_group myelasticachesg 'My Cache Security Group'
"""
@ -700,7 +732,9 @@ def delete_cache_security_group(name, region=None, key=None, keyid=None, profile
"""
Delete a cache security group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.delete_cache_security_group myelasticachesg 'My Cache Security Group'
"""
@ -729,7 +763,9 @@ def authorize_cache_security_group_ingress(
Authorize network ingress from an ec2 security group to a cache security
group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.authorize_cache_security_group_ingress myelasticachesg myec2sg 879879
"""
@ -770,7 +806,9 @@ def revoke_cache_security_group_ingress(
Revoke network ingress from an ec2 security group to a cache security
group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_elasticache.revoke_cache_security_group_ingress myelasticachesg myec2sg 879879
"""

View file

@ -86,7 +86,7 @@ def exists(name, region=None, key=None, keyid=None, profile=None):
"""
Check to see if an ELB exists.
CLI example:
CLI Example:
.. code-block:: bash
@ -110,7 +110,7 @@ def get_all_elbs(region=None, key=None, keyid=None, profile=None):
"""
Return all load balancers associated with an account
CLI example:
CLI Example:
.. code-block:: bash
@ -129,7 +129,7 @@ def list_elbs(region=None, key=None, keyid=None, profile=None):
"""
Return names of all load balancers associated with an account
CLI example:
CLI Example:
.. code-block:: bash
@ -146,7 +146,7 @@ def get_elb_config(name, region=None, key=None, keyid=None, profile=None):
"""
Get an ELB configuration.
CLI example:
CLI Example:
.. code-block:: bash
@ -212,7 +212,7 @@ def listener_dict_to_tuple(listener):
Convert an ELB listener dict into a listener tuple used by certain parts of
the AWS ELB API.
CLI example:
CLI Example:
.. code-block:: bash
@ -321,7 +321,7 @@ def create_listeners(name, listeners, region=None, key=None, keyid=None, profile
"""
Create listeners on an ELB.
CLI example:
CLI Example:
.. code-block:: bash
@ -353,7 +353,7 @@ def delete_listeners(name, ports, region=None, key=None, keyid=None, profile=Non
"""
Delete listeners on an ELB.
CLI example:
CLI Example:
.. code-block:: bash
@ -383,7 +383,7 @@ def apply_security_groups(
"""
Apply security groups to ELB.
CLI example:
CLI Example:
.. code-block:: bash
@ -409,7 +409,7 @@ def enable_availability_zones(
"""
Enable availability zones for ELB.
CLI example:
CLI Example:
.. code-block:: bash
@ -434,7 +434,7 @@ def disable_availability_zones(
"""
Disable availability zones for ELB.
CLI example:
CLI Example:
.. code-block:: bash
@ -462,7 +462,7 @@ def attach_subnets(name, subnets, region=None, key=None, keyid=None, profile=Non
"""
Attach ELB to subnets.
CLI example:
CLI Example:
.. code-block:: bash
@ -490,7 +490,7 @@ def detach_subnets(name, subnets, region=None, key=None, keyid=None, profile=Non
"""
Detach ELB from subnets.
CLI example:
CLI Example:
.. code-block:: bash
@ -518,7 +518,7 @@ def get_attributes(name, region=None, key=None, keyid=None, profile=None):
"""
Check to see if attributes are set on an ELB.
CLI example:
CLI Example:
.. code-block:: bash
@ -662,7 +662,7 @@ def get_health_check(name, region=None, key=None, keyid=None, profile=None):
"""
Get the health check configured for this ELB.
CLI example:
CLI Example:
.. code-block:: bash
@ -736,7 +736,7 @@ def register_instances(
- ``True``: instance(s) registered successfully
- ``False``: instance(s) failed to be registered
CLI example:
CLI Example:
.. code-block:: bash
@ -781,7 +781,7 @@ def deregister_instances(
- ``False``: instance(s) failed to be deregistered
- ``None``: instance(s) not valid or not registered, no action taken
CLI example:
CLI Example:
.. code-block:: bash
@ -834,7 +834,7 @@ def set_instances(
"""
Set the instances assigned to an ELB to exactly the list given
CLI example:
CLI Example:
.. code-block:: bash
@ -867,7 +867,7 @@ def get_instance_health(
"""
Get a list of instances and their health state
CLI example:
CLI Example:
.. code-block:: bash
@ -909,7 +909,7 @@ def create_policy(
.. versionadded:: 2016.3.0
CLI example:
CLI Example:
.. code-block:: bash
@ -944,7 +944,7 @@ def delete_policy(name, policy_name, region=None, key=None, keyid=None, profile=
.. versionadded:: 2016.3.0
CLI example:
CLI Example:
.. code-block:: bash
@ -977,7 +977,7 @@ def set_listener_policy(
.. versionadded:: 2016.3.0
CLI example:
CLI Example:
.. code-block:: Bash
@ -1011,7 +1011,7 @@ def set_backend_policy(
"""
Set the policies of an ELB backend server.
CLI example:
CLI Example:
salt myminion boto_elb.set_backend_policy myelb 443 "[policy1,policy2]"
"""

View file

@ -128,7 +128,7 @@ def create_target_group(
returns
(bool) - True on success, False on failure.
CLI example:
CLI Example:
.. code-block:: bash
salt myminion boto_elbv2.create_target_group learn1give1 protocol=HTTP port=54006 vpc_id=vpc-deadbeef
@ -180,7 +180,7 @@ def delete_target_group(name, region=None, key=None, keyid=None, profile=None):
returns
(bool) - True on success, False on failure.
CLI example:
CLI Example:
.. code-block:: bash
@ -214,7 +214,7 @@ def target_group_exists(name, region=None, key=None, keyid=None, profile=None):
"""
Check to see if an target group exists.
CLI example:
CLI Example:
.. code-block:: bash
@ -243,7 +243,7 @@ def describe_target_health(
"""
Get the curret health check status for targets in a target group.
CLI example:
CLI Example:
.. code-block:: bash
@ -281,7 +281,7 @@ def register_targets(name, targets, region=None, key=None, keyid=None, profile=N
- ``True``: instance(s) registered successfully
- ``False``: instance(s) failed to be registered
CLI example:
CLI Example:
.. code-block:: bash
@ -318,7 +318,7 @@ def deregister_targets(name, targets, region=None, key=None, keyid=None, profile
- ``True``: instance(s) deregistered successfully
- ``False``: instance(s) failed to be deregistered
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -578,7 +578,7 @@ def delete_group_policy(
"""
Delete a group policy.
CLI Example::
CLI Example:
.. code-block:: bash
@ -642,6 +642,8 @@ def get_all_groups(path_prefix="/", region=None, key=None, keyid=None, profile=N
CLI Example:
.. code-block:: bash
salt-call boto_iam.get_all_groups
"""
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
@ -669,6 +671,8 @@ def get_all_instance_profiles(
CLI Example:
.. code-block:: bash
salt-call boto_iam.get_all_instance_profiles
"""
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
@ -693,6 +697,8 @@ def list_instance_profiles(
CLI Example:
.. code-block:: bash
salt-call boto_iam.list_instance_profiles
"""
p = get_all_instance_profiles(path_prefix, region, key, keyid, profile)
@ -725,7 +731,7 @@ def delete_group(group_name, region=None, key=None, keyid=None, profile=None):
"""
Delete a group policy.
CLI Example::
CLI Example:
.. code-block:: bash
@ -1374,6 +1380,8 @@ def get_all_roles(path_prefix=None, region=None, key=None, keyid=None, profile=N
CLI Example:
.. code-block:: bash
salt-call boto_iam.get_all_roles
"""
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
@ -1397,6 +1405,8 @@ def get_all_users(path_prefix="/", region=None, key=None, keyid=None, profile=No
CLI Example:
.. code-block:: bash
salt-call boto_iam.get_all_users
"""
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
@ -1640,6 +1650,8 @@ def export_users(path_prefix="/", region=None, key=None, keyid=None, profile=Non
CLI Example:
.. code-block:: bash
salt-call boto_iam.export_users --out=txt | sed "s/local: //" > iam_users.sls
"""
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
@ -1677,6 +1689,8 @@ def export_roles(path_prefix="/", region=None, key=None, keyid=None, profile=Non
CLI Example:
.. code-block:: bash
salt-call boto_iam.export_roles --out=txt | sed "s/local: //" > iam_roles.sls
"""
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

View file

@ -83,7 +83,9 @@ def _get_basic_stream(stream_name, conn):
Stream info from AWS, via describe_stream
Only returns the first "page" of shards (up to 100); use _get_full_stream() for all shards.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis._get_basic_stream my_stream existing_conn
"""
@ -94,7 +96,9 @@ def _get_full_stream(stream_name, region=None, key=None, keyid=None, profile=Non
"""
Get complete stream info from AWS, via describe_stream, including all shards.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis._get_full_stream my_stream region=us-east-1
"""
@ -128,7 +132,9 @@ def get_stream_when_active(
Continues to retry when stream is updating or creating.
If the stream is deleted during retries, the loop will catch the error and break.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.get_stream_when_active my_stream region=us-east-1
"""
@ -158,7 +164,9 @@ def exists(stream_name, region=None, key=None, keyid=None, profile=None):
"""
Check if the stream exists. Returns False and the error if it does not.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.exists my_stream region=us-east-1
"""
@ -181,7 +189,9 @@ def create_stream(
"""
Create a stream with name stream_name and initial number of shards num_shards.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.create_stream my_stream N region=us-east-1
"""
@ -198,7 +208,9 @@ def delete_stream(stream_name, region=None, key=None, keyid=None, profile=None):
"""
Delete the stream with name stream_name. This cannot be undone! All data will be lost!!
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.delete_stream my_stream region=us-east-1
"""
@ -215,7 +227,9 @@ def increase_stream_retention_period(
"""
Increase stream retention period to retention_hours
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.increase_stream_retention_period my_stream N region=us-east-1
"""
@ -237,7 +251,9 @@ def decrease_stream_retention_period(
"""
Decrease stream retention period to retention_hours
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.decrease_stream_retention_period my_stream N region=us-east-1
"""
@ -259,7 +275,9 @@ def enable_enhanced_monitoring(
"""
Enable enhanced monitoring for the specified shard-level metrics on stream stream_name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.enable_enhanced_monitoring my_stream ["metrics", "to", "enable"] region=us-east-1
"""
@ -282,7 +300,9 @@ def disable_enhanced_monitoring(
"""
Disable enhanced monitoring for the specified shard-level metrics on stream stream_name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.disable_enhanced_monitoring my_stream ["metrics", "to", "disable"] region=us-east-1
"""
@ -305,7 +325,9 @@ def get_info_for_reshard(stream_details):
Modifies stream_details to add a sorted list of OpenShards.
Returns (min_hash_key, max_hash_key, stream_details)
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.get_info_for_reshard existing_stream_details
"""
@ -341,7 +363,9 @@ def long_int(hash_key):
It's necessary to convert to int/long for comparison operations.
This helper method handles python 2/3 incompatibility
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.long_int some_MD5_hash_as_string
@ -366,7 +390,9 @@ def reshard(
For safety, user must past in force=True; otherwise, the function will dry run.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis.reshard my_stream N True region=us-east-1
@ -502,7 +528,7 @@ def list_streams(region=None, key=None, keyid=None, profile=None):
"""
Return a list of all streams visible to the current account
CLI example:
CLI Example:
.. code-block:: bash
@ -532,7 +558,9 @@ def _get_next_open_shard(stream_details, shard_id):
"""
Return the next open shard after shard_id
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis._get_next_open_shard existing_stream_details shard_id
"""
@ -565,7 +593,9 @@ def _execute_with_retries(conn, function, **kwargs):
The result dict with the HTTP response and JSON data if applicable
as 'result', or an error as 'error'
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis._execute_with_retries existing_conn function_name function_kwargs
@ -607,7 +637,9 @@ def _jittered_backoff(attempt, max_retry_delay):
"""
Basic exponential backoff
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kinesis._jittered_backoff current_attempt_number max_delay_in_seconds
"""

View file

@ -75,7 +75,9 @@ def create_alias(
"""
Create a display name for a key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.create_alias 'alias/mykey' key_id
"""
@ -107,7 +109,9 @@ def create_grant(
Adds a grant to a key to specify who can access the key and under what
conditions.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.create_grant 'alias/mykey' 'arn:aws:iam::1111111:/role/myrole' operations='["Encrypt","Decrypt"]'
"""
@ -142,7 +146,9 @@ def create_key(
"""
Creates a master key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.create_key '{"Statement":...}' "My master key"
"""
@ -172,7 +178,9 @@ def decrypt(
"""
Decrypt ciphertext.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.decrypt encrypted_ciphertext
"""
@ -195,7 +203,9 @@ def key_exists(key_id, region=None, key=None, keyid=None, profile=None):
"""
Check for the existence of a key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.key_exists 'alias/mykey'
"""
@ -226,7 +236,9 @@ def describe_key(key_id, region=None, key=None, keyid=None, profile=None):
"""
Get detailed information about a key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.describe_key 'alias/mykey'
"""
@ -246,7 +258,9 @@ def disable_key(key_id, region=None, key=None, keyid=None, profile=None):
"""
Mark key as disabled.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.disable_key 'alias/mykey'
"""
@ -266,7 +280,9 @@ def disable_key_rotation(key_id, region=None, key=None, keyid=None, profile=None
"""
Disable key rotation for specified key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.disable_key_rotation 'alias/mykey'
"""
@ -286,7 +302,9 @@ def enable_key(key_id, region=None, key=None, keyid=None, profile=None):
"""
Mark key as enabled.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.enable_key 'alias/mykey'
"""
@ -306,7 +324,9 @@ def enable_key_rotation(key_id, region=None, key=None, keyid=None, profile=None)
"""
Disable key rotation for specified key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.enable_key_rotation 'alias/mykey'
"""
@ -335,7 +355,9 @@ def encrypt(
"""
Encrypt plaintext into cipher text using specified key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.encrypt 'alias/mykey' 'myplaindata' '{"aws:username":"myuser"}'
"""
@ -369,7 +391,9 @@ def generate_data_key(
"""
Generate a secure data key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.generate_data_key 'alias/mykey' number_of_bytes=1024 key_spec=AES_128
"""
@ -404,7 +428,9 @@ def generate_data_key_without_plaintext(
"""
Generate a secure data key without a plaintext copy of the key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.generate_data_key_without_plaintext 'alias/mykey' number_of_bytes=1024 key_spec=AES_128
"""
@ -431,7 +457,9 @@ def generate_random(
"""
Generate a random string.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.generate_random number_of_bytes=1024
"""
@ -452,7 +480,9 @@ def get_key_policy(
"""
Get the policy for the specified key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.get_key_policy 'alias/mykey' mypolicy
"""
@ -473,7 +503,9 @@ def get_key_rotation_status(key_id, region=None, key=None, keyid=None, profile=N
"""
Get status of whether or not key rotation is enabled for a key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.get_key_rotation_status 'alias/mykey'
"""
@ -494,7 +526,9 @@ def list_grants(
"""
List grants for the specified key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.list_grants 'alias/mykey'
"""
@ -526,7 +560,9 @@ def list_key_policies(
"""
List key_policies for the specified key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.list_key_policies 'alias/mykey'
"""
@ -550,7 +586,9 @@ def put_key_policy(
"""
Attach a key policy to the specified key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.put_key_policy 'alias/mykey' default '{"Statement":...}'
"""
@ -582,7 +620,9 @@ def re_encrypt(
"""
Reencrypt encrypted data with a new master key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.re_encrypt 'encrypted_data' 'alias/mynewkey' default '{"Statement":...}'
"""
@ -607,7 +647,9 @@ def revoke_grant(key_id, grant_id, region=None, key=None, keyid=None, profile=No
"""
Revoke a grant from a key.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.revoke_grant 'alias/mykey' 8u89hf-j09j...
"""
@ -631,7 +673,9 @@ def update_key_description(
"""
Update a key's description.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_kms.update_key_description 'alias/mykey' 'My key'
"""

View file

@ -136,7 +136,9 @@ def exists(name, tags=None, region=None, key=None, keyid=None, profile=None):
"""
Check to see if an RDS exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.exists myrds region=us-east-1
"""
@ -155,7 +157,9 @@ def option_group_exists(
"""
Check to see if an RDS option group exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1
"""
@ -174,7 +178,9 @@ def parameter_group_exists(
"""
Check to see if an RDS parameter group exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.parameter_group_exists myparametergroup \
region=us-east-1
@ -198,7 +204,9 @@ def subnet_group_exists(
"""
Check to see if an RDS subnet group exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.subnet_group_exists my-param-group \
region=us-east-1
@ -593,7 +601,9 @@ def update_parameter_group(
"""
Update an RDS parameter group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.update_parameter_group my-param-group \
parameters='{"back_log":1, "binlog_cache_size":4096}' \
@ -642,7 +652,9 @@ def describe(name, tags=None, region=None, key=None, keyid=None, profile=None):
"""
Return RDS instance details.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.describe myrds
@ -722,7 +734,9 @@ def describe_db_instances(
current scope. Arbitrary subelements or subsections of the returned dataset
can be selected by passing in a valid JMSEPath filter as well.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.describe_db_instances jmespath='DBInstances[*].DBInstanceIdentifier'
@ -757,7 +771,9 @@ def describe_db_subnet_groups(
current scope. Arbitrary subelements or subsections of the returned dataset
can be selected by passing in a valid JMSEPath filter as well.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.describe_db_subnet_groups
@ -776,7 +792,9 @@ def get_endpoint(name, tags=None, region=None, key=None, keyid=None, profile=Non
"""
Return the endpoint of an RDS instance.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.get_endpoint myrds
@ -814,7 +832,9 @@ def delete(
"""
Delete an RDS instance.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.delete myrds skip_final_snapshot=True \
region=us-east-1
@ -887,7 +907,9 @@ def delete_option_group(name, region=None, key=None, keyid=None, profile=None):
"""
Delete an RDS option group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.delete_option_group my-opt-group \
region=us-east-1
@ -916,7 +938,9 @@ def delete_parameter_group(name, region=None, key=None, keyid=None, profile=None
"""
Delete an RDS parameter group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.delete_parameter_group my-param-group \
region=us-east-1
@ -939,7 +963,9 @@ def delete_subnet_group(name, region=None, key=None, keyid=None, profile=None):
"""
Delete an RDS subnet group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_rds.delete_subnet_group my-subnet-group \
region=us-east-1

View file

@ -256,7 +256,9 @@ def zone_exists(
.. versionadded:: 2015.8.0
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto_route53.zone_exists example.org
@ -347,7 +349,9 @@ def create_zone(
profile
AWS pillar profile
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto_route53.create_zone example.org
"""
@ -443,7 +447,9 @@ def create_healthcheck(
AWS pillar profile
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto_route53.create_healthcheck 192.168.0.1
salt myminion boto_route53.create_healthcheck 192.168.0.1 port=443 hc_type=HTTPS \
@ -495,7 +501,9 @@ def delete_zone(zone, region=None, key=None, keyid=None, profile=None):
.. versionadded:: 2015.8.0
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto_route53.delete_zone example.org
"""
@ -540,7 +548,9 @@ def get_record(
"""
Get a record from a zone.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_route53.get_record test.example.org example.org A
@ -649,7 +659,9 @@ def add_record(
"""
Add a record to a zone.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_route53.add_record test.example.org 1.1.1.1 example.org A
@ -754,7 +766,9 @@ def update_record(
"""
Modify a record in a zone.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_route53.modify_record test.example.org 1.1.1.1 example.org A
@ -841,7 +855,9 @@ def delete_record(
"""
Modify a record in a zone.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_route53.delete_record test.example.org example.org A
@ -1019,7 +1035,9 @@ def create_hosted_zone(
profile
Dict, or pillar key pointing to a dict, containing AWS region/key/keyid.
CLI Example::
CLI Example:
.. code-block:: bash
salt myminion boto_route53.create_hosted_zone example.org
"""

View file

@ -96,7 +96,9 @@ def exists(
"""
Check to see if a security group exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_secgroup.exists mysecgroup
"""
@ -292,7 +294,9 @@ def get_all_security_groups(
documentation
<https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html>`_.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_secgroup.get_all_security_groups filters='{group-name: mygroup}'
"""
@ -344,7 +348,9 @@ def get_group_id(
"""
Get a Group ID given a Group Name or Group Name and VPC ID
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_secgroup.get_group_id mysecgroup
"""
@ -372,7 +378,9 @@ def convert_to_group_ids(
Given a list of security groups and a vpc_id, convert_to_group_ids will
convert all list items in the given list to security group ids.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_secgroup.convert_to_group_ids mysecgroup vpc-89yhh7h
"""
@ -423,7 +431,9 @@ def get_config(
"""
Get the configuration for a security group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_secgroup.get_config mysecgroup
"""
@ -471,7 +481,9 @@ def create(
"""
Create a security group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_secgroup.create mysecgroup 'My Security Group'
"""
@ -514,7 +526,9 @@ def delete(
"""
Delete a security group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_secgroup.delete mysecgroup
"""
@ -566,7 +580,9 @@ def authorize(
"""
Add a new rule to an existing security group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_secgroup.authorize mysecgroup ip_protocol=tcp from_port=80 to_port=80 cidr_ip='['10.0.0.0/8', '192.168.0.0/24']'
"""
@ -653,7 +669,9 @@ def revoke(
"""
Remove a rule from an existing security group.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_secgroup.revoke mysecgroup ip_protocol=tcp from_port=80 to_port=80 cidr_ip='10.0.0.0/8'
"""
@ -813,7 +831,7 @@ def set_tags(
profile
amazon profile
CLI example:
CLI Example:
.. code-block:: bash
@ -887,7 +905,7 @@ def delete_tags(
profile
amazon profile
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -74,7 +74,9 @@ def get_all_topics(region=None, key=None, keyid=None, profile=None):
"""
Returns a list of the all topics..
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_sns.get_all_topics
"""
@ -98,7 +100,9 @@ def exists(name, region=None, key=None, keyid=None, profile=None):
"""
Check to see if an SNS topic exists.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_sns.exists mytopic region=us-east-1
"""
@ -219,7 +223,9 @@ def get_arn(name, region=None, key=None, keyid=None, profile=None):
"""
Returns the full ARN for a given topic name.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion boto_sns.get_arn mytopic
"""

View file

@ -112,7 +112,7 @@ def list_(pkg=None, user=None, installed=False, env=None):
same ``env`` format as the :py:func:`cmd.run
<salt.modules.cmdmod.run>` execution function
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -3286,7 +3286,9 @@ def shells():
.. versionadded:: 2015.5.0
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' cmd.shells
"""

View file

@ -391,7 +391,7 @@ def info(*packages, **kwargs):
.. versionadded:: 2016.11.3
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -168,7 +168,9 @@ def ping(allow_failure=False, hosts=None, profile=None):
allow_failure
Throw exception if ping fails
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.ping allow_failure=True
salt myminion elasticsearch.ping profile=elasticsearch-extra
@ -188,7 +190,9 @@ def info(hosts=None, profile=None):
Return Elasticsearch information.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.info
salt myminion elasticsearch.info profile=elasticsearch-extra
@ -216,7 +220,9 @@ def node_info(nodes=None, flat_settings=False, hosts=None, profile=None):
flat_settings
Flatten settings keys
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.node_info flat_settings=True
"""
@ -245,7 +251,9 @@ def cluster_health(index=None, level="cluster", local=False, hosts=None, profile
local
Return local information, do not retrieve the state from master node
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.cluster_health
"""
@ -270,7 +278,9 @@ def cluster_stats(nodes=None, hosts=None, profile=None):
nodes
List of cluster nodes (id or name) to display stats for. Use _local for connected node, empty for all
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.cluster_stats
"""
@ -300,7 +310,9 @@ def cluster_get_settings(
include_defaults
Whether to return all default clusters setting.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.cluster_get_settings
"""
@ -331,7 +343,9 @@ def cluster_put_settings(body=None, flat_settings=False, hosts=None, profile=Non
flat_settings
Return settings in flat format.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.cluster_put_settings '{"persistent": {"indices.recovery.max_bytes_per_sec": "50mb"}}'
salt myminion elasticsearch.cluster_put_settings '{"transient": {"indices.recovery.max_bytes_per_sec": "50mb"}}'
@ -364,7 +378,9 @@ def alias_create(indices, alias, hosts=None, body=None, profile=None, source=Non
source
URL of file specifying optional definition such as routing or filter. Cannot be used in combination with ``body``.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.alias_create testindex_v1 testindex
"""
@ -396,7 +412,9 @@ def alias_delete(indices, aliases, hosts=None, body=None, profile=None, source=N
aliases
Alias names separated by comma
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.alias_delete testindex_v1 testindex
"""
@ -431,7 +449,9 @@ def alias_exists(aliases, indices=None, hosts=None, profile=None):
aliases
Alias names separated by comma
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.alias_exists None testindex
"""
@ -457,7 +477,9 @@ def alias_get(indices=None, aliases=None, hosts=None, profile=None):
aliases
Alias names separated by comma
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.alias_get testindex
"""
@ -492,7 +514,9 @@ def document_create(
id
Optional unique document identifier for specified doc_type (empty for random)
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.document_create testindex doctype1 '{}'
"""
@ -525,7 +549,9 @@ def document_delete(index, doc_type, id, hosts=None, profile=None):
id
Document identifier
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.document_delete testindex doctype1 AUx-384m0Bug_8U80wQZ
"""
@ -554,7 +580,9 @@ def document_exists(index, id, doc_type="_all", hosts=None, profile=None):
doc_type
Type of the document, use _all to fetch the first document matching the ID across all types
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.document_exists testindex AUx-384m0Bug_8U80wQZ
"""
@ -583,7 +611,9 @@ def document_get(index, id, doc_type="_all", hosts=None, profile=None):
doc_type
Type of the document, use _all to fetch the first document matching the ID across all types
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.document_get testindex AUx-384m0Bug_8U80wQZ
"""
@ -612,7 +642,9 @@ def index_create(index, body=None, hosts=None, profile=None, source=None):
source
URL to file specifying index definition. Cannot be used in combination with ``body``.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_create testindex
salt myminion elasticsearch.index_create testindex2 '{"settings" : {"index" : {"number_of_shards" : 3, "number_of_replicas" : 2}}}'
@ -648,7 +680,9 @@ def index_delete(index, hosts=None, profile=None):
index
Index name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_delete testindex
"""
@ -675,7 +709,9 @@ def index_exists(index, hosts=None, profile=None):
index
Index name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_exists testindex
"""
@ -700,7 +736,9 @@ def index_get(index, hosts=None, profile=None):
index
Index name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_get testindex
"""
@ -740,7 +778,9 @@ def index_open(
ignore_unavailable
Whether specified concrete indices should be ignored when unavailable (missing or closed)
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_open testindex
"""
@ -785,7 +825,9 @@ def index_close(
ignore_unavailable
Whether specified concrete indices should be ignored when unavailable (missing or closed)
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_close testindex
"""
@ -836,7 +878,9 @@ def index_get_settings(hosts=None, profile=None, **kwargs):
The defaults settings for the above parameters depend on the API version being used.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_get_settings index=testindex
"""
@ -895,7 +939,9 @@ def index_put_settings(body=None, hosts=None, profile=None, source=None, **kwarg
Elasticsearch time units can be found here:
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_put_settings index=testindex body='{"settings" : {"index" : {"number_of_replicas" : 2}}}'
"""
@ -940,7 +986,9 @@ def mapping_create(index, doc_type, body=None, hosts=None, profile=None, source=
source
URL to file specifying mapping definition. Cannot be used in combination with ``body``.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.mapping_create testindex user '{ "user" : { "properties" : { "message" : {"type" : "string", "store" : true } } } }'
"""
@ -973,7 +1021,9 @@ def mapping_delete(index, doc_type, hosts=None, profile=None):
doc_type
Name of the document type
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.mapping_delete testindex user
"""
@ -1003,7 +1053,9 @@ def mapping_get(index, doc_type, hosts=None, profile=None):
doc_type
Name of the document type
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.mapping_get testindex user
"""
@ -1034,7 +1086,9 @@ def index_template_create(name, body=None, hosts=None, profile=None, source=None
source
URL to file specifying template definition. Cannot be used in combination with ``body``.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_template_create testindex_templ '{ "template": "logstash-*", "order": 1, "settings": { "number_of_shards": 1 } }'
"""
@ -1064,7 +1118,9 @@ def index_template_delete(name, hosts=None, profile=None):
name
Index template name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_template_delete testindex_templ user
"""
@ -1090,7 +1146,9 @@ def index_template_exists(name, hosts=None, profile=None):
name
Index template name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_template_exists testindex_templ
"""
@ -1112,7 +1170,9 @@ def index_template_get(name, hosts=None, profile=None):
name
Index template name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.index_template_get testindex_templ
"""
@ -1139,7 +1199,9 @@ def pipeline_get(id, hosts=None, profile=None):
id
Pipeline id
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.pipeline_get mypipeline
"""
@ -1168,7 +1230,9 @@ def pipeline_delete(id, hosts=None, profile=None):
id
Pipeline id
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.pipeline_delete mypipeline
"""
@ -1200,7 +1264,9 @@ def pipeline_create(id, body, hosts=None, profile=None):
body
Pipeline definition as specified in https://www.elastic.co/guide/en/elasticsearch/reference/master/pipeline.html
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.pipeline_create mypipeline '{"description": "my custom pipeline", "processors": [{"set" : {"field": "collector_timestamp_millis", "value": "{{_ingest.timestamp}}"}}]}'
"""
@ -1231,7 +1297,9 @@ def pipeline_simulate(id, body, verbose=False, hosts=None, profile=None):
verbose
Specify if the output should be more verbose
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.pipeline_simulate mypipeline '{"docs":[{"_index":"index","_type":"type","_id":"id","_source":{"foo":"bar"}},{"_index":"index","_type":"type","_id":"id","_source":{"foo":"rab"}}]}' verbose=True
"""
@ -1257,7 +1325,9 @@ def search_template_get(id, hosts=None, profile=None):
id
Template ID
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.search_template_get mytemplate
"""
@ -1286,7 +1356,9 @@ def search_template_create(id, body, hosts=None, profile=None):
body
Search template definition
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.search_template_create mytemplate '{"template":{"query":{"match":{"title":"{{query_string}}"}}}}'
"""
@ -1313,7 +1385,9 @@ def search_template_delete(id, hosts=None, profile=None):
id
Template ID
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.search_template_delete mytemplate
"""
@ -1344,7 +1418,9 @@ def repository_get(name, local=False, hosts=None, profile=None):
local
Retrieve only local information, default is false
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.repository_get testrepo
"""
@ -1373,7 +1449,9 @@ def repository_create(name, body, hosts=None, profile=None):
body
Repository definition as in https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.repository_create testrepo '{"type":"fs","settings":{"location":"/tmp/test","compress":true}}'
"""
@ -1400,7 +1478,9 @@ def repository_delete(name, hosts=None, profile=None):
name
Repository name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.repository_delete testrepo
"""
@ -1429,7 +1509,9 @@ def repository_verify(name, hosts=None, profile=None):
name
Repository name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.repository_verify testrepo
"""
@ -1462,7 +1544,9 @@ def snapshot_status(
ignore_unavailable
Ignore unavailable snapshots
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.snapshot_status ignore_unavailable=True
"""
@ -1497,7 +1581,9 @@ def snapshot_get(
ignore_unavailable
Ignore unavailable snapshots
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.snapshot_get testrepo testsnapshot
"""
@ -1530,7 +1616,9 @@ def snapshot_create(repository, snapshot, body=None, hosts=None, profile=None):
body
Snapshot definition as in https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.snapshot_create testrepo testsnapshot '{"indices":"index_1,index_2","ignore_unavailable":true,"include_global_state":false}'
"""
@ -1563,7 +1651,9 @@ def snapshot_restore(repository, snapshot, body=None, hosts=None, profile=None):
body
Restore definition as in https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.snapshot_restore testrepo testsnapshot '{"indices":"index_1,index_2","ignore_unavailable":true,"include_global_state":true}'
"""
@ -1594,7 +1684,9 @@ def snapshot_delete(repository, snapshot, hosts=None, profile=None):
snapshot
Snapshot name
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.snapshot_delete testrepo testsnapshot
"""
@ -1643,7 +1735,9 @@ def flush_synced(hosts=None, profile=None, **kwargs):
The defaults settings for the above parameters depend on the API being used.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion elasticsearch.flush_synced index='index1,index2' ignore_unavailable=True allow_no_indices=True expand_wildcards='all'
"""

View file

@ -261,7 +261,7 @@ def delete(all=False, *databases):
::parameter: all. Default: False. Remove all snapshots, if set to True.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -284,7 +284,9 @@ def nodes(**kwargs):
"""
Return the names of the nodes composing the kubernetes cluster
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.nodes
salt '*' kubernetes.nodes kubeconfig=/etc/salt/k8s/kubeconfig context=minikube
@ -312,7 +314,9 @@ def node(name, **kwargs):
"""
Return the details of the node identified by the specified name
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.node name='minikube'
"""
@ -340,7 +344,9 @@ def node_labels(name, **kwargs):
"""
Return the labels of the node identified by the specified name
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.node_labels name="minikube"
"""
@ -358,7 +364,9 @@ def node_add_label(node_name, label_name, label_value, **kwargs):
the node identified by the name `node_name`.
Creates the label if not present.
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.node_add_label node_name="minikube" \
label_name="foo" label_value="bar"
@ -386,7 +394,9 @@ def node_remove_label(node_name, label_name, **kwargs):
Removes the label identified by `label_name` from
the node identified by the name `node_name`.
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.node_remove_label node_name="minikube" \
label_name="foo"
@ -413,7 +423,9 @@ def namespaces(**kwargs):
"""
Return the names of the available namespaces
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.namespaces
salt '*' kubernetes.namespaces kubeconfig=/etc/salt/k8s/kubeconfig context=minikube
@ -438,7 +450,9 @@ def deployments(namespace="default", **kwargs):
"""
Return a list of kubernetes deployments defined in the namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.deployments
salt '*' kubernetes.deployments namespace=default
@ -466,7 +480,9 @@ def services(namespace="default", **kwargs):
"""
Return a list of kubernetes services defined in the namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.services
salt '*' kubernetes.services namespace=default
@ -493,7 +509,9 @@ def pods(namespace="default", **kwargs):
"""
Return a list of kubernetes pods defined in the namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.pods
salt '*' kubernetes.pods namespace=default
@ -518,7 +536,9 @@ def secrets(namespace="default", **kwargs):
"""
Return a list of kubernetes secrets defined in the namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.secrets
salt '*' kubernetes.secrets namespace=default
@ -545,7 +565,9 @@ def configmaps(namespace="default", **kwargs):
"""
Return a list of kubernetes configmaps defined in the namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.configmaps
salt '*' kubernetes.configmaps namespace=default
@ -574,7 +596,9 @@ def show_deployment(name, namespace="default", **kwargs):
"""
Return the kubernetes deployment defined by name and namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.show_deployment my-nginx default
salt '*' kubernetes.show_deployment name=my-nginx namespace=default
@ -602,7 +626,9 @@ def show_service(name, namespace="default", **kwargs):
"""
Return the kubernetes service defined by name and namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.show_service my-nginx default
salt '*' kubernetes.show_service name=my-nginx namespace=default
@ -629,7 +655,9 @@ def show_pod(name, namespace="default", **kwargs):
"""
Return POD information for a given pod name defined in the namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.show_pod guestbook-708336848-fqr2x
salt '*' kubernetes.show_pod guestbook-708336848-fqr2x namespace=default
@ -654,7 +682,9 @@ def show_namespace(name, **kwargs):
"""
Return information for a given namespace defined by the specified name
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.show_namespace kube-system
"""
@ -680,7 +710,9 @@ def show_secret(name, namespace="default", decode=False, **kwargs):
The secrets can be decoded if specified by the user. Warning: this has
security implications.
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.show_secret confidential default
salt '*' kubernetes.show_secret name=confidential namespace=default
@ -711,7 +743,9 @@ def show_configmap(name, namespace="default", **kwargs):
"""
Return the kubernetes configmap defined by name and namespace.
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.show_configmap game-config default
salt '*' kubernetes.show_configmap name=game-config namespace=default
@ -738,7 +772,9 @@ def delete_deployment(name, namespace="default", **kwargs):
"""
Deletes the kubernetes deployment defined by name and namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.delete_deployment my-nginx
salt '*' kubernetes.delete_deployment name=my-nginx namespace=default
@ -794,7 +830,9 @@ def delete_service(name, namespace="default", **kwargs):
"""
Deletes the kubernetes service defined by name and namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.delete_service my-nginx default
salt '*' kubernetes.delete_service name=my-nginx namespace=default
@ -822,7 +860,9 @@ def delete_pod(name, namespace="default", **kwargs):
"""
Deletes the kubernetes pod defined by name and namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.delete_pod guestbook-708336848-5nl8c default
salt '*' kubernetes.delete_pod name=guestbook-708336848-5nl8c namespace=default
@ -851,7 +891,9 @@ def delete_namespace(name, **kwargs):
"""
Deletes the kubernetes namespace defined by name
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.delete_namespace salt
salt '*' kubernetes.delete_namespace name=salt
@ -877,7 +919,9 @@ def delete_secret(name, namespace="default", **kwargs):
"""
Deletes the kubernetes secret defined by name and namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.delete_secret confidential default
salt '*' kubernetes.delete_secret name=confidential namespace=default
@ -906,7 +950,9 @@ def delete_configmap(name, namespace="default", **kwargs):
"""
Deletes the kubernetes configmap defined by name and namespace
CLI Examples::
CLI Example:
.. code-block:: bash
salt '*' kubernetes.delete_configmap settings default
salt '*' kubernetes.delete_configmap name=settings namespace=default
@ -1056,7 +1102,9 @@ def create_secret(
"""
Creates the kubernetes secret as defined by the user.
CLI Examples::
CLI Example:
.. code-block:: bash
salt 'minion1' kubernetes.create_secret \
passwords default '{"db": "letmein"}'
@ -1104,7 +1152,9 @@ def create_configmap(
"""
Creates the kubernetes configmap as defined by the user.
CLI Examples::
CLI Example:
.. code-block:: bash
salt 'minion1' kubernetes.create_configmap \
settings default '{"example.conf": "# example file"}'
@ -1277,7 +1327,9 @@ def replace_secret(
Replaces an existing secret with a new one defined by name and namespace,
having the specificed data.
CLI Examples::
CLI Example:
.. code-block:: bash
salt 'minion1' kubernetes.replace_secret \
name=passwords data='{"db": "letmein"}'
@ -1332,7 +1384,9 @@ def replace_configmap(
Replaces an existing configmap with a new one defined by name and
namespace with the specified data.
CLI Examples::
CLI Example:
.. code-block:: bash
salt 'minion1' kubernetes.replace_configmap \
settings default '{"example.conf": "# example file"}'

View file

@ -246,7 +246,7 @@ def connect(connect_spec=None):
This object should be used as a context manager. It is safe
to nest ``with`` statements.
CLI example:
CLI Example:
.. code-block:: bash
@ -353,7 +353,7 @@ def search(
dict that maps each of the matching attribute names to a list
of its values.
CLI example:
CLI Example:
.. code-block:: bash
@ -394,7 +394,7 @@ def add(connect_spec, dn, attributes):
:returns:
``True`` if successful, raises an exception otherwise.
CLI example:
CLI Example:
.. code-block:: bash
@ -441,7 +441,7 @@ def delete(connect_spec, dn):
:returns:
``True`` if successful, raises an exception otherwise.
CLI example:
CLI Example:
.. code-block:: bash
@ -496,7 +496,7 @@ def modify(connect_spec, dn, directives):
:returns:
``True`` if successful, raises an exception otherwise.
CLI example:
CLI Example:
.. code-block:: bash
@ -567,7 +567,7 @@ def change(connect_spec, dn, before, after):
:returns:
``True`` if successful, raises an exception otherwise.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -2500,7 +2500,7 @@ def image_get(
CLI Examples:
..code-block:: bash
.. code-block:: bash
$ salt '*' lxd.image_get <fingerprint>
"""
@ -2558,7 +2558,7 @@ def image_get_by_alias(
CLI Examples:
..code-block:: bash
.. code-block:: bash
$ salt '*' lxd.image_get_by_alias xenial/amd64
"""
@ -2610,7 +2610,7 @@ def image_delete(image, remote_addr=None, cert=None, key=None, verify_cert=True)
CLI Examples:
..code-block:: bash
.. code-block:: bash
$ salt '*' lxd.image_delete xenial/amd64
"""
@ -2680,7 +2680,7 @@ def image_from_simplestreams(
CLI Examples:
..code-block:: bash
.. code-block:: bash
$ salt '*' lxd.image_from_simplestreams "https://cloud-images.ubuntu.com/releases" "trusty/amd64" aliases='["t", "trusty/amd64"]' auto_update=True
"""
@ -2761,7 +2761,7 @@ def image_from_url(
CLI Examples:
..code-block:: bash
.. code-block:: bash
$ salt '*' lxd.image_from_url https://dl.stgraber.org/lxd aliases='["busybox-amd64"]'
"""
@ -2842,7 +2842,7 @@ def image_from_file(
CLI Examples:
..code-block:: bash
.. code-block:: bash
$ salt '*' lxd.image_from_file salt://lxd/files/busybox.tar.xz aliases=["busybox-amd64"]
"""

View file

@ -571,7 +571,7 @@ def info_installed(*names, **kwargs):
names
The names of the packages for which to return information.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -133,7 +133,7 @@ def get_computer_sleep():
CLI Example:
..code-block:: bash
.. code-block:: bash
salt '*' power.get_computer_sleep
"""
@ -175,7 +175,7 @@ def get_display_sleep():
CLI Example:
..code-block:: bash
.. code-block:: bash
salt '*' power.get_display_sleep
"""
@ -217,7 +217,7 @@ def get_harddisk_sleep():
CLI Example:
..code-block:: bash
.. code-block:: bash
salt '*' power.get_harddisk_sleep
"""

View file

@ -517,7 +517,7 @@ def get_disable_keyboard_on_lock():
CLI Example:
..code-block:: bash
.. code-block:: bash
salt '*' system.get_disable_keyboard_on_lock
"""

View file

@ -72,9 +72,12 @@ def kill(timeout=15):
If you have a monitor that restarts ``salt-minion`` when it dies then this is
a great way to restart after a minion upgrade.
CLI example::
CLI Example:
.. code-block:: bash
salt minion[12] minion.kill
>$ salt minion[12] minion.kill
minion1:
----------
killed:
@ -146,9 +149,12 @@ def restart():
process to perform the restart. This behavior is intended for managed
salt minion processes.
CLI example::
CLI Example:
.. code-block:: bash
salt minion[12] minion.restart
>$ salt minion[12] minion.restart
minion1:
----------
comment:

View file

@ -34,7 +34,9 @@ def list_cidr_ips(cidr):
"""
Get a list of IP addresses from a CIDR.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion netaddress.list_cidr_ips 192.168.0.0/20
"""
@ -46,7 +48,9 @@ def list_cidr_ips_ipv6(cidr):
"""
Get a list of IPv6 addresses from a CIDR.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion netaddress.list_cidr_ips_ipv6 192.168.0.0/20
"""
@ -58,7 +62,9 @@ def cidr_netmask(cidr):
"""
Get the netmask address associated with a CIDR address.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion netaddress.cidr_netmask 192.168.0.0/20
"""
@ -70,7 +76,9 @@ def cidr_broadcast(cidr):
"""
Get the broadcast address associated with a CIDR address.
CLI example::
CLI Example:
.. code-block:: bash
salt myminion netaddress.cidr_netmask 192.168.0.0/20
"""

View file

@ -1851,7 +1851,9 @@ def get_route(ip):
.. versionchanged:: 2016.11.4
Added support for AIX
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' network.get_route 10.10.10.10
"""

View file

@ -631,7 +631,9 @@ def check_table(table=None, family="ipv4"):
"""
Check for the existence of a table
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' nftables.check_table nat
"""

View file

@ -751,7 +751,9 @@ def bootstrap_salt(
minion is running as will be created, otherwise the needed bootstrapping
tools will need to be available on the host.
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' nspawn.bootstrap_salt arch1
"""

View file

@ -1137,7 +1137,7 @@ def info_installed(*names, **kwargs):
install_date_time_t, md5sum, packager, provides, recommends,
replaces, size, source, suggests, url, version
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -36,7 +36,7 @@ def enable():
"""
Enable the Packet Filter.
CLI example:
CLI Example:
.. code-block:: bash
@ -67,7 +67,7 @@ def disable():
"""
Disable the Packet Filter.
CLI example:
CLI Example:
.. code-block:: bash
@ -102,7 +102,7 @@ def loglevel(level):
Log level. Should be one of the following: emerg, alert, crit, err, warning, notice,
info or debug (OpenBSD); or none, urgent, misc, loud (FreeBSD).
CLI example:
CLI Example:
.. code-block:: bash
@ -152,7 +152,7 @@ def load(file="/etc/pf.conf", noop=False):
noop:
Don't actually load the rules, just parse them.
CLI example:
CLI Example:
.. code-block:: bash
@ -196,7 +196,7 @@ def flush(modifier):
Please refer to the OpenBSD `pfctl(8) <https://man.openbsd.org/pfctl#T>`_
documentation for a detailed explanation of each command.
CLI example:
CLI Example:
.. code-block:: bash
@ -258,7 +258,7 @@ def table(command, table, **kwargs):
Please refer to the OpenBSD `pfctl(8) <https://man.openbsd.org/pfctl#T>`_
documentation for a detailed explanation of each command.
CLI example:
CLI Example:
.. code-block:: bash
@ -335,7 +335,7 @@ def show(modifier):
- states
- tables
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -675,7 +675,9 @@ def install(
salt '*' pip.install <package name> bin_env=/path/to/virtualenv
salt '*' pip.install <package name> bin_env=/path/to/pip_bin
Complicated CLI example::
Complicated CLI Example:
.. code-block:: bash
salt '*' pip.install markdown,django \
editable=git+https://github.com/worldcompany/djangoembed.git#egg=djangoembed upgrade=True no_deps=True

View file

@ -466,7 +466,7 @@ def diff(package_path, path):
:param path: Full path to the installed file
:return: Difference or empty string. For binary files only a notification.
CLI example:
CLI Example:
.. code-block:: bash
@ -507,7 +507,7 @@ def info(*packages, **kwargs):
:return:
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -153,7 +153,7 @@ def list_snapshots(config="root"):
"""
List available snapshots
CLI example:
CLI Example:
.. code-block:: bash
@ -174,7 +174,7 @@ def get_snapshot(number=0, config="root"):
"""
Get detailed information about a given snapshot
CLI example:
CLI Example:
.. code-block:: bash
@ -195,7 +195,7 @@ def list_configs():
"""
List all available configs
CLI example:
CLI Example:
.. code-block:: bash
@ -222,7 +222,7 @@ def set_config(name="root", **kwargs):
"""
Set configuration values
CLI example:
CLI Example:
.. code-block:: bash
@ -288,7 +288,7 @@ def get_config(name="root"):
"""
Retrieves all values from a given configuration
CLI example:
CLI Example:
.. code-block:: bash
@ -323,7 +323,7 @@ def create_config(
Extra Snapper configuration opts dictionary. It will override the values provided
by the given template (if any).
CLI example:
CLI Example:
.. code-block:: bash
@ -397,7 +397,7 @@ def create_snapshot(
Returns the number of the created snapshot.
CLI example:
CLI Example:
.. code-block:: bash
@ -455,7 +455,7 @@ def delete_snapshot(snapshots_ids=None, config="root"):
snapshots_ids
List of the snapshots IDs to be deleted.
CLI example:
CLI Example:
.. code-block:: bash
@ -509,7 +509,7 @@ def modify_snapshot(
userdata
Change the userdata dictionary of the snapshot. (dict)
CLI example:
CLI Example:
.. code-block:: bash
@ -650,7 +650,7 @@ def status(config="root", num_pre=None, num_post=None):
num_post
last snapshot ID to compare. Default is 0 (current state)
CLI example:
CLI Example:
.. code-block:: bash
@ -694,7 +694,7 @@ def changed_files(config="root", num_pre=None, num_post=None):
num_post
last snapshot ID to compare. Default is 0 (current state)
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -218,7 +218,7 @@ def list_all(
with the prefix; alarms that have the prefix will be skipped. This can be
used to convert existing alarms to be managed by salt, as follows:
CLI example:
CLI Example:
1. Make a "backup" of all existing searches
$ salt-call splunk_search.list_all --out=txt | sed "s/local: //" > legacy_searches.sls

View file

@ -30,7 +30,7 @@ def attr(key, value=None):
:return: value or bool
CLI example:
CLI Example:
.. code-block:: bash
salt '*' sysfs.attr block/sda/queue/logical_block_size
@ -51,7 +51,7 @@ def write(key, value):
"""
Write a SysFS attribute/action
CLI example:
CLI Example:
.. code-block:: bash
salt '*' sysfs.write devices/system/cpu/cpu0/cpufreq/scaling_governor 'performance'
@ -74,7 +74,7 @@ def read(key, root=""):
:return: the full (tree of) SysFS attributes under key
CLI example:
CLI Example:
.. code-block:: bash
salt '*' sysfs.read class/net/em1/statistics
@ -140,7 +140,7 @@ def target(key, full=True):
:return: fullpath or basename of path
CLI example:
CLI Example:
.. code-block:: bash
salt '*' sysfs.read class/ttyS0
@ -164,7 +164,7 @@ def interfaces(root):
Generate a dictionary with all available interfaces relative to root.
Symlinks are not followed.
CLI example:
CLI Example:
.. code-block:: bash
salt '*' sysfs.interfaces block/bcache0/bcache

View file

@ -253,7 +253,9 @@ def get_route(ip):
.. versionadded:: 2016.11.5
CLI Example::
CLI Example:
.. code-block:: bash
salt '*' network.get_route 10.10.10.10
"""

View file

@ -1060,7 +1060,7 @@ def list_downloaded(**kwargs):
List prefetched packages downloaded by Yum in the local disk.
CLI example:
CLI Example:
.. code-block:: bash
@ -1094,7 +1094,7 @@ def info_installed(*names, **kwargs):
:param all_versions:
Include information for all versions of the packages installed on the minion.
CLI example:
CLI Example:
.. code-block:: bash
@ -3209,7 +3209,7 @@ def download(*packages, **kwargs):
``yum-utils`` will already be installed on the minion if the package
was installed from the Fedora / EPEL repositories.
CLI example:
CLI Example:
.. code-block:: bash
@ -3280,7 +3280,7 @@ def diff(*paths, **kwargs):
:param path: Full path to the installed file
:return: Difference string or raises and exception if examined file is binary.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -573,7 +573,7 @@ def info_installed(*names, **kwargs):
:param root:
Operate on a different root directory.
CLI example:
CLI Example:
.. code-block:: bash
@ -616,7 +616,7 @@ def info_available(*names, **kwargs):
root
operate on a different root directory.
CLI example:
CLI Example:
.. code-block:: bash
@ -709,7 +709,7 @@ def latest_version(*names, **kwargs):
root
operate on a different root directory.
CLI example:
CLI Example:
.. code-block:: bash
@ -2598,7 +2598,7 @@ def download(*packages, **kwargs):
root
operate on a different root directory.
CLI example:
CLI Example:
.. code-block:: bash
@ -2655,7 +2655,7 @@ def list_downloaded(root=None, **kwargs):
root
operate on a different root directory.
CLI example:
CLI Example:
.. code-block:: bash
@ -2693,7 +2693,7 @@ def diff(*paths, **kwargs):
:param path: Full path to the installed file
:return: Difference string or raises and exception if examined file is binary.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -691,7 +691,7 @@ def salt_api_acl_tool(username, request):
in order to provide whitelisting for the API similar to the
master, but over the API.
..code-block:: yaml
.. code-block:: yaml
rest_cherrypy:
api_acl:

View file

@ -135,7 +135,7 @@ def package_list():
List "packages" by executing a command via ssh
This function is called in response to the salt command
..code-block::bash
.. code-block::bash
salt target_minion pkg.list_pkgs
"""

View file

@ -67,7 +67,7 @@ def cmd(fun, *args, **kwargs):
overridden by setting an ``id`` configuration parameter in the
master config file.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -108,7 +108,7 @@ def create_target_group(
returns
(bool) - True on success, False on failure.
CLI example:
CLI Example:
.. code-block:: yaml
create-target:
@ -168,7 +168,7 @@ def delete_target_group(name, region=None, key=None, keyid=None, profile=None):
returns
(bool) - True on success, False on failure.
CLI example:
CLI Example:
.. code-block:: bash

View file

@ -10,7 +10,7 @@
Run the state as below
..code-block:: yaml
.. code-block:: yaml
salt-proxy-configure:
salt_proxy.configure_proxy:
@ -43,7 +43,7 @@ def configure_proxy(name, proxyname="p8000", start=True):
Example:
..code-block:: yaml
.. code-block:: yaml
salt-proxy-configure:
salt_proxy.configure_proxy: