text stringlengths 81 112k |
|---|
Adjust panel spans to take up the available width.
For each group of panels that would be laid out on the same level, scale up
the unspecified panel spans to fill up the level.
def _auto_adjust_panel_spans(dashboard):
'''Adjust panel spans to take up the available width.
For each group of panels that... |
Pin rows to the top of the dashboard.
def _ensure_pinned_rows(dashboard):
'''Pin rows to the top of the dashboard.'''
pinned_row_titles = __salt__['pillar.get'](_PINNED_ROWS_PILLAR)
if not pinned_row_titles:
return
pinned_row_titles_lower = []
for title in pinned_row_titles:
pinned... |
Assign panels auto-incrementing IDs.
def _ensure_panel_ids(dashboard):
'''Assign panels auto-incrementing IDs.'''
panel_id = 1
for row in dashboard.get('rows', []):
for panel in row.get('panels', []):
panel['id'] = panel_id
panel_id += 1 |
Explode annotation_tags into annotations.
def _ensure_annotations(dashboard):
'''Explode annotation_tags into annotations.'''
if 'annotation_tags' not in dashboard:
return
tags = dashboard['annotation_tags']
annotations = {
'enable': True,
'list': [],
}
for tag in tags:
... |
Get a specific dashboard.
def _get(url, profile):
'''Get a specific dashboard.'''
request_url = "{0}/api/dashboards/{1}".format(profile.get('grafana_url'),
url)
response = requests.get(
request_url,
headers={
"Accept": "applicati... |
Delete a specific dashboard.
def _delete(url, profile):
'''Delete a specific dashboard.'''
request_url = "{0}/api/dashboards/{1}".format(profile.get('grafana_url'),
url)
response = requests.delete(
request_url,
headers={
"Accept"... |
Update a specific dashboard.
def _update(dashboard, profile):
'''Update a specific dashboard.'''
payload = {
'dashboard': dashboard,
'overwrite': True
}
request_url = "{0}/api/dashboards/db".format(profile.get('grafana_url'))
response = requests.post(
request_url,
he... |
Return a dictionary of changes between dashboards.
def _dashboard_diff(_new_dashboard, _old_dashboard):
'''Return a dictionary of changes between dashboards.'''
diff = {}
# Dashboard diff
new_dashboard = copy.deepcopy(_new_dashboard)
old_dashboard = copy.deepcopy(_old_dashboard)
dashboard_diff... |
Strip falsey entries.
def _stripped(d):
'''Strip falsey entries.'''
ret = {}
for k, v in six.iteritems(d):
if v:
ret[k] = v
return ret |
Given an email address, checks the local
cache if corresponding email address: channel_id
mapping exists
email
Email escalation policy
profile
A dict of telemetry config information.
def _retrieve_channel_id(email, profile='telemetry'):
'''
Given an email address, checks the lo... |
Get all alert definitions associated with a given deployment or if metric_name
is specified, obtain the specific alert config
Returns dictionary or list of dictionaries.
CLI Example:
salt myminion telemetry.get_alert_config rs-ds033197 currentConnections profile=telemetry
salt myminion te... |
Given an email address, creates a notification-channels
if one is not found and also returns the corresponding
notification channel id.
notify_channel
Email escalation policy
profile
A dict of telemetry config information.
CLI Example:
salt myminion telemetry.get_notificat... |
get all the alarms set up against the current deployment
Returns dictionary of alarm information
CLI Example:
salt myminion telemetry.get_alarms rs-ds033197 profile=telemetry
def get_alarms(deployment_id, profile="telemetry"):
'''
get all the alarms set up against the current deployment
... |
create an telemetry alarms.
data is a dict of alert configuration data.
Returns (bool success, str message) tuple.
CLI Example:
salt myminion telemetry.create_alarm rs-ds033197 {} profile=telemetry
def create_alarm(deployment_id, metric_name, data, api_key=None, profile="telemetry"):
'''
... |
update an telemetry alarms. data is a dict of alert configuration data.
Returns (bool success, str message) tuple.
CLI Example:
salt myminion telemetry.update_alarm rs-ds033197 {} profile=telemetry
def update_alarm(deployment_id, metric_name, data, api_key=None, profile="telemetry"):
'''
upd... |
delete an alert specified by alert_id or if not specified blows away all the alerts
in the current deployment.
Returns (bool success, str message) tuple.
CLI Example:
salt myminion telemetry.delete_alarms rs-ds033197 profile=telemetry
def delete_alarms(deployment_id, alert_id=None, metric_n... |
Decompress returned HTTP content depending on the specified encoding.
Currently supports identity/none, deflate, and gzip, which should
cover 99%+ of the content on the internet.
def __decompressContent(coding, pgctnt):
'''
Decompress returned HTTP content depending on the specified encoding.
Curre... |
Query a resource, and decode the return data
def query(url,
method='GET',
params=None,
data=None,
data_file=None,
header_dict=None,
header_list=None,
header_file=None,
username=None,
password=None,
auth=None,
... |
Return the location of the ca bundle file. See the following article:
http://tinyurl.com/k7rx42a
def get_ca_bundle(opts=None):
'''
Return the location of the ca bundle file. See the following article:
http://tinyurl.com/k7rx42a
'''
if hasattr(get_ca_bundle, '__return_value__'):
... |
Attempt to update the CA bundle file from a URL
If not specified, the local location on disk (``target``) will be
auto-detected, if possible. If it is not found, then a new location on disk
will be created and updated.
The default ``source`` is:
http://curl.haxx.se/ca/cacert.pem
This is ... |
Render a template
def _render(template, render, renderer, template_dict, opts):
'''
Render a template
'''
if render:
if template_dict is None:
template_dict = {}
if not renderer:
renderer = opts.get('renderer', 'jinja|yaml')
rend = salt.loader.render(opts... |
Parse the "Set-cookie" header, and return a list of cookies.
This function is here because Tornado's HTTPClient doesn't handle cookies.
def parse_cookie_header(header):
'''
Parse the "Set-cookie" header, and return a list of cookies.
This function is here because Tornado's HTTPClient doesn't handle c... |
Make sure no secret fields show up in logs
def sanitize_url(url, hide_fields):
'''
Make sure no secret fields show up in logs
'''
if isinstance(hide_fields, list):
url_comps = splitquery(url)
log_url = url_comps[0]
if len(url_comps) > 1:
log_url += '?'
for pa... |
Recursive function to sanitize each component of the url.
def _sanitize_url_components(comp_list, field):
'''
Recursive function to sanitize each component of the url.
'''
if not comp_list:
return ''
elif comp_list[0].startswith('{0}='.format(field)):
ret = '{0}=XXXXXXXXXX&'.format(... |
Retrieves information about a registered nameserver. Returns the following
information:
- IP Address set for the nameserver
- Domain name which was queried
- A list of nameservers and their statuses
sld
SLD of the domain name
tld
TLD of the domain name
nameserver
... |
Deletes a nameserver. Returns ``True`` if the nameserver was updated
successfully.
sld
SLD of the domain name
tld
TLD of the domain name
nameserver
Nameserver to create
old_ip
Current ip address
new_ip
New ip address
CLI Example:
.. code-blo... |
Deletes a nameserver. Returns ``True`` if the nameserver was deleted
successfully
sld
SLD of the domain name
tld
TLD of the domain name
nameserver
Nameserver to delete
CLI Example:
.. code-block:: bash
salt '*' namecheap_domains_ns.delete sld tld nameserver
... |
Creates a new nameserver. Returns ``True`` if the nameserver was created
successfully.
sld
SLD of the domain name
tld
TLD of the domain name
nameserver
Nameserver to create
ip
Nameserver IP address
CLI Example:
.. code-block:: bash
salt '*' name... |
Shows installed version of dnsmasq.
CLI Example:
.. code-block:: bash
salt '*' dnsmasq.version
def version():
'''
Shows installed version of dnsmasq.
CLI Example:
.. code-block:: bash
salt '*' dnsmasq.version
'''
cmd = 'dnsmasq -v'
out = __salt__['cmd.run'](cmd... |
Shows installed version of dnsmasq and compile options.
CLI Example:
.. code-block:: bash
salt '*' dnsmasq.fullversion
def fullversion():
'''
Shows installed version of dnsmasq and compile options.
CLI Example:
.. code-block:: bash
salt '*' dnsmasq.fullversion
'''
... |
Sets a value or a set of values in the specified file. By default, if
conf-dir is configured in this file, salt will attempt to set the option
in any file inside the conf-dir where it has already been enabled. If it
does not find it inside any files, it will append it to the main config
file. Setting fo... |
Dumps all options from the config file.
config_file
The location of the config file from which to obtain contents.
Defaults to ``/etc/dnsmasq.conf``.
CLI Examples:
.. code-block:: bash
salt '*' dnsmasq.get_config
salt '*' dnsmasq.get_config config_file=/etc/dnsmasq.conf
... |
Generic function for parsing dnsmasq files including includes.
def _parse_dnamasq(filename):
'''
Generic function for parsing dnsmasq files including includes.
'''
fileopts = {}
if not os.path.isfile(filename):
raise CommandExecutionError(
'Error: No such file \'{0}\''.format(f... |
Read in the dict structure generated by the salt key API methods and
print the structure.
def output(data, **kwargs): # pylint: disable=unused-argument
'''
Read in the dict structure generated by the salt key API methods and
print the structure.
'''
color = salt.utils.color.get_colors(
... |
Get a boto connection to SQS.
def _get_sqs_conn(profile, region=None, key=None, keyid=None):
'''
Get a boto connection to SQS.
'''
if profile:
if isinstance(profile, six.string_types):
_profile = __opts__[profile]
elif isinstance(profile, dict):
_profile = profil... |
Listen to sqs and fire message on event bus
def start(queue, profile=None, tag='salt/engine/sqs', owner_acct_id=None):
'''
Listen to sqs and fire message on event bus
'''
if __opts__.get('__role') == 'master':
fire_master = salt.utils.event.get_master_event(
__opts__,
__... |
Send a file from the master to the location in specified
.. note::
gzip compression is not supported in the salt-ssh version of
cp.get_file. The argument is only accepted for interface compatibility.
def get_file(path,
dest,
saltenv='base',
makedirs=False,
... |
Transfer a directory down
def get_dir(path, dest, saltenv='base'):
'''
Transfer a directory down
'''
src = __context__['fileclient'].cache_dir(
path,
saltenv,
cachedir=os.path.join('salt-ssh', __salt__.kwargs['id_']))
src = ' '.join(src)
single = salt.client.ssh.Single(
... |
Freeze python types by turning them into immutable structures.
def freeze(obj):
'''
Freeze python types by turning them into immutable structures.
'''
if isinstance(obj, dict):
return ImmutableDict(obj)
if isinstance(obj, list):
return ImmutableList(obj)
if isinstance(obj, set):... |
Display alternatives settings for defined command name
CLI Example:
.. code-block:: bash
salt '*' alternatives.display editor
def display(name):
'''
Display alternatives settings for defined command name
CLI Example:
.. code-block:: bash
salt '*' alternatives.display edito... |
Display master link for the alternative
.. versionadded:: 2015.8.13,2016.3.4,2016.11.0
CLI Example:
.. code-block:: bash
salt '*' alternatives.show_link editor
def show_link(name):
'''
Display master link for the alternative
.. versionadded:: 2015.8.13,2016.3.4,2016.11.0
CLI E... |
Check if the given path is an alternative for a name.
.. versionadded:: 2015.8.4
CLI Example:
.. code-block:: bash
salt '*' alternatives.check_exists name path
def check_exists(name, path):
'''
Check if the given path is an alternative for a name.
.. versionadded:: 2015.8.4
CL... |
Install symbolic links determining default commands
CLI Example:
.. code-block:: bash
salt '*' alternatives.install editor /usr/bin/editor /usr/bin/emacs23 50
def install(name, link, path, priority):
'''
Install symbolic links determining default commands
CLI Example:
.. code-block... |
Remove symbolic links determining the default commands.
CLI Example:
.. code-block:: bash
salt '*' alternatives.remove name path
def remove(name, path):
'''
Remove symbolic links determining the default commands.
CLI Example:
.. code-block:: bash
salt '*' alternatives.remo... |
Trigger alternatives to set the path for <name> as
specified by priority.
CLI Example:
.. code-block:: bash
salt '*' alternatives.auto name
def auto(name):
'''
Trigger alternatives to set the path for <name> as
specified by priority.
CLI Example:
.. code-block:: bash
... |
Read the link from /etc/alternatives
Throws an OSError if the link does not exist
def _read_link(name):
'''
Read the link from /etc/alternatives
Throws an OSError if the link does not exist
'''
alt_link_path = '/etc/alternatives/{0}'.format(name)
return salt.utils.path.readlink(alt_link_p... |
Returns a placement solver
service_instance
Service instance to the host or vCenter
def get_placement_solver(service_instance):
'''
Returns a placement solver
service_instance
Service instance to the host or vCenter
'''
stub = salt.utils.vmware.get_new_service_instance_stub(
... |
Returns a list of all capability definitions.
profile_manager
Reference to the profile manager.
def get_capability_definitions(profile_manager):
'''
Returns a list of all capability definitions.
profile_manager
Reference to the profile manager.
'''
res_type = pbm.profile.Resou... |
Returns a list of policies with the specified ids.
profile_manager
Reference to the profile manager.
policy_ids
List of policy ids to retrieve.
def get_policies_by_id(profile_manager, policy_ids):
'''
Returns a list of policies with the specified ids.
profile_manager
Refe... |
Returns a list of the storage policies, filtered by name.
profile_manager
Reference to the profile manager.
policy_names
List of policy names to filter by.
Default is None.
get_all_policies
Flag specifying to return all policies, regardless of the specified
filter.... |
Creates a storage policy.
profile_manager
Reference to the profile manager.
policy_spec
Policy update spec.
def create_storage_policy(profile_manager, policy_spec):
'''
Creates a storage policy.
profile_manager
Reference to the profile manager.
policy_spec
Po... |
Updates a storage policy.
profile_manager
Reference to the profile manager.
policy
Reference to the policy to be updated.
policy_spec
Policy update spec.
def update_storage_policy(profile_manager, policy, policy_spec):
'''
Updates a storage policy.
profile_manager
... |
Returns the default storage policy reference assigned to a datastore.
profile_manager
Reference to the profile manager.
datastore
Reference to the datastore.
def get_default_storage_policy_of_datastore(profile_manager, datastore):
'''
Returns the default storage policy reference assig... |
Assigns a storage policy as the default policy to a datastore.
profile_manager
Reference to the profile manager.
policy
Reference to the policy to assigned.
datastore
Reference to the datastore.
def assign_default_storage_policy_to_datastore(profile_manager, policy,
... |
Set a value into the Redis SDB.
def set_(key, value, profile=None):
'''
Set a value into the Redis SDB.
'''
if not profile:
return False
redis_kwargs = profile.copy()
redis_kwargs.pop('driver')
redis_conn = redis.StrictRedis(**redis_kwargs)
return redis_conn.set(key, value) |
Get a value from the Redis SDB.
def get(key, profile=None):
'''
Get a value from the Redis SDB.
'''
if not profile:
return False
redis_kwargs = profile.copy()
redis_kwargs.pop('driver')
redis_conn = redis.StrictRedis(**redis_kwargs)
return redis_conn.get(key) |
Ensures a load balancer is present.
:param name: Load Balancer name
:type name: ``str``
:param port: Port the load balancer should listen on, defaults to 80
:type port: ``str``
:param protocol: Loadbalancer protocol, defaults to http.
:type protocol: ``str``
:param profile: The profil... |
Ensures a load balancer is absent.
:param name: Load Balancer name
:type name: ``str``
:param profile: The profile key
:type profile: ``str``
def balancer_absent(name, profile, **libcloud_kwargs):
'''
Ensures a load balancer is absent.
:param name: Load Balancer name
:type name: `... |
Ensure a load balancer member is present
:param ip: IP address for the new member
:type ip: ``str``
:param port: Port for the new member
:type port: ``int``
:param balancer_id: id of a load balancer you want to attach the member to
:type balancer_id: ``str``
:param profile: The profil... |
Ensure a load balancer member is absent, based on IP and Port
:param ip: IP address for the member
:type ip: ``str``
:param port: Port for the member
:type port: ``int``
:param balancer_id: id of a load balancer you want to detach the member from
:type balancer_id: ``str``
:param prof... |
parses the output into a dictionary
def _parser(result):
'''
parses the output into a dictionary
'''
# regexes to match
_total_time = re.compile(r'total time:\s*(\d*.\d*s)')
_total_execution = re.compile(r'event execution:\s*(\d*.\d*s?)')
_min_response_time = re.compile(r'min:\s*(\d*.\d*ms... |
Tests for the CPU performance of minions.
CLI Examples:
.. code-block:: bash
salt '*' sysbench.cpu
def cpu():
'''
Tests for the CPU performance of minions.
CLI Examples:
.. code-block:: bash
salt '*' sysbench.cpu
'''
# Test data
max_primes = [500, 1000, 2500, ... |
This tests the performance of the processor's scheduler
CLI Example:
.. code-block:: bash
salt '*' sysbench.threads
def threads():
'''
This tests the performance of the processor's scheduler
CLI Example:
.. code-block:: bash
salt '*' sysbench.threads
'''
# Test da... |
Tests the implementation of mutex
CLI Examples:
.. code-block:: bash
salt '*' sysbench.mutex
def mutex():
'''
Tests the implementation of mutex
CLI Examples:
.. code-block:: bash
salt '*' sysbench.mutex
'''
# Test options and the values they take
# --mutex-num... |
This tests the memory for read and write operations.
CLI Examples:
.. code-block:: bash
salt '*' sysbench.memory
def memory():
'''
This tests the memory for read and write operations.
CLI Examples:
.. code-block:: bash
salt '*' sysbench.memory
'''
# test defaults
... |
This tests for the file read and write operations
Various modes of operations are
* sequential write
* sequential rewrite
* sequential read
* random read
* random write
* random read and write
The test works with 32 files with each file being 1Gb in size
The test consumes a lot of ... |
Return LVM version from lvm version
CLI Example:
.. code-block:: bash
salt '*' lvm.version
def version():
'''
Return LVM version from lvm version
CLI Example:
.. code-block:: bash
salt '*' lvm.version
'''
cmd = 'lvm version'
out = __salt__['cmd.run'](cmd).split... |
Return all version info from lvm version
CLI Example:
.. code-block:: bash
salt '*' lvm.fullversion
def fullversion():
'''
Return all version info from lvm version
CLI Example:
.. code-block:: bash
salt '*' lvm.fullversion
'''
ret = {}
cmd = 'lvm version'
o... |
Return information about the physical volume(s)
pvname
physical device name
real
dereference any symlinks and report the real device
.. versionadded:: 2015.8.7
quiet
if the physical volume is not present, do not show any error
CLI Examples:
.. code-block:: bash... |
Return information about the volume group(s)
vgname
volume group name
quiet
if the volume group is not present, do not show any error
CLI Examples:
.. code-block:: bash
salt '*' lvm.vgdisplay
salt '*' lvm.vgdisplay nova-volumes
def vgdisplay(vgname='', quiet=False):... |
Return information about the logical volume(s)
lvname
logical device name
quiet
if the logical volume is not present, do not show any error
CLI Examples:
.. code-block:: bash
salt '*' lvm.lvdisplay
salt '*' lvm.lvdisplay /dev/vg_myserver/root
def lvdisplay(lvname=''... |
Set a physical device to be used as an LVM physical volume
override
Skip devices, if they are already LVM physical volumes
CLI Examples:
.. code-block:: bash
salt mymachine lvm.pvcreate /dev/sdb1,/dev/sdb2
salt mymachine lvm.pvcreate /dev/sdb1 dataalignmentoffset=7s
def pvcreate... |
Remove a physical device being used as an LVM physical volume
override
Skip devices, if they are already not used as LVM physical volumes
CLI Examples:
.. code-block:: bash
salt mymachine lvm.pvremove /dev/sdb1,/dev/sdb2
def pvremove(devices, override=True):
'''
Remove a physica... |
Create an LVM volume group
CLI Examples:
.. code-block:: bash
salt mymachine lvm.vgcreate my_vg /dev/sdb1,/dev/sdb2
salt mymachine lvm.vgcreate my_vg /dev/sdb1 clustered=y
def vgcreate(vgname, devices, **kwargs):
'''
Create an LVM volume group
CLI Examples:
.. code-block:: ... |
Add physical volumes to an LVM volume group
CLI Examples:
.. code-block:: bash
salt mymachine lvm.vgextend my_vg /dev/sdb1,/dev/sdb2
salt mymachine lvm.vgextend my_vg /dev/sdb1
def vgextend(vgname, devices):
'''
Add physical volumes to an LVM volume group
CLI Examples:
.. c... |
Create a new logical volume, with option for which physical volume to be used
CLI Examples:
.. code-block:: bash
salt '*' lvm.lvcreate new_volume_name vg_name size=10G
salt '*' lvm.lvcreate new_volume_name vg_name extents=100 pv=/dev/sdb
salt '*' lvm.lvcreate new_snapshot ... |
Remove an LVM volume group
CLI Examples:
.. code-block:: bash
salt mymachine lvm.vgremove vgname
salt mymachine lvm.vgremove vgname force=True
def vgremove(vgname):
'''
Remove an LVM volume group
CLI Examples:
.. code-block:: bash
salt mymachine lvm.vgremove vgname... |
Remove a given existing logical volume from a named existing volume group
CLI Example:
.. code-block:: bash
salt '*' lvm.lvremove lvname vgname force=True
def lvremove(lvname, vgname):
'''
Remove a given existing logical volume from a named existing volume group
CLI Example:
.. cod... |
Return information about the logical volume(s)
CLI Examples:
.. code-block:: bash
salt '*' lvm.lvresize +12M /dev/mapper/vg1-test
salt '*' lvm.lvresize lvpath=/dev/mapper/vg1-test extents=+100%FREE
def lvresize(size=None, lvpath=None, extents=None):
'''
Return information about the ... |
.. versionadded:: 2019.2.0
List all resource groups within a subscription.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.resource_groups_list
def resource_groups_list(**kwargs):
'''
.. versionadded:: 2019.2.0
List all resource groups within a subscription.
CLI ... |
.. versionadded:: 2019.2.0
Check for the existence of a named resource group in the current subscription.
:param name: The resource group name to check.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.resource_group_check_existence testgroup
def resource_group_check_existence... |
.. versionadded:: 2019.2.0
Get a dictionary representing a resource group's properties.
:param name: The resource group name to get.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.resource_group_get testgroup
def resource_group_get(name, **kwargs):
'''
.. versionadde... |
.. versionadded:: 2019.2.0
Create or update a resource group in a given location.
:param name: The name of the resource group to create or update.
:param location: The location of the resource group. This value
is not able to be updated once the resource group is created.
CLI Example:
.... |
.. versionadded:: 2019.2.0
Delete a resource group from the subscription.
:param name: The resource group name to delete.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.resource_group_delete testgroup
def resource_group_delete(name, **kwargs):
'''
.. versionadded:: 2... |
.. versionadded:: 2019.2.0
Get a deployment operation within a deployment.
:param operation: The operation ID of the operation within the deployment.
:param deployment: The name of the deployment containing the operation.
:param resource_group: The resource group name assigned to the
deploym... |
.. versionadded:: 2019.2.0
List all deployment operations within a deployment.
:param name: The name of the deployment to query.
:param resource_group: The resource group name assigned to the
deployment.
:param result_limit: (Default: 10) The limit on the list of deployment
operation... |
.. versionadded:: 2019.2.0
Delete a deployment.
:param name: The name of the deployment to delete.
:param resource_group: The resource group name assigned to the
deployment.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.deployment_delete testdeploy testgroup
de... |
.. versionadded:: 2019.2.0
Check the existence of a deployment.
:param name: The name of the deployment to query.
:param resource_group: The resource group name assigned to the
deployment.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.deployment_check_existence ... |
.. versionadded:: 2019.2.0
Get details about a specific deployment.
:param name: The name of the deployment to query.
:param resource_group: The resource group name assigned to the
deployment.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.deployment_get testdepl... |
.. versionadded:: 2019.2.0
Cancel a deployment if in 'Accepted' or 'Running' state.
:param name: The name of the deployment to cancel.
:param resource_group: The resource group name assigned to the
deployment.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.deploy... |
.. versionadded:: 2019.2.0
Validates whether the specified template is syntactically correct
and will be accepted by Azure Resource Manager.
:param name: The name of the deployment to validate.
:param resource_group: The resource group name assigned to the
deployment.
:param deploy_mode:... |
.. versionadded:: 2019.2.0
Exports the template used for the specified deployment.
:param name: The name of the deployment to query.
:param resource_group: The resource group name assigned to the
deployment.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.deployme... |
.. versionadded:: 2019.2.0
List all deployments within a resource group.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.deployments_list testgroup
def deployments_list(resource_group, **kwargs):
'''
.. versionadded:: 2019.2.0
List all deployments within a resource gr... |
.. versionadded:: 2019.2.0
List all locations for a subscription.
:param subscription_id: The ID of the subscription to query.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.subscriptions_list_locations XXXXXXXX
def subscriptions_list_locations(subscription_id=None, **kwargs... |
.. versionadded:: 2019.2.0
Get details about a subscription.
:param subscription_id: The ID of the subscription to query.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.subscription_get XXXXXXXX
def subscription_get(subscription_id=None, **kwargs):
'''
.. versionadde... |
.. versionadded:: 2019.2.0
List all subscriptions for a tenant.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.subscriptions_list
def subscriptions_list(**kwargs):
'''
.. versionadded:: 2019.2.0
List all subscriptions for a tenant.
CLI Example:
.. code-bloc... |
.. versionadded:: 2019.2.0
List all tenants for your account.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.tenants_list
def tenants_list(**kwargs):
'''
.. versionadded:: 2019.2.0
List all tenants for your account.
CLI Example:
.. code-block:: bash
... |
.. versionadded:: 2019.2.0
Delete a policy assignment.
:param name: The name of the policy assignment to delete.
:param scope: The scope of the policy assignment.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.policy_assignment_delete testassign \
/subscriptions/... |
.. versionadded:: 2019.2.0
Create a policy assignment.
:param name: The name of the policy assignment to create.
:param scope: The scope of the policy assignment.
:param definition_name: The name of the policy definition to assign.
CLI Example:
.. code-block:: bash
salt-call azure... |
.. versionadded:: 2019.2.0
Get details about a specific policy assignment.
:param name: The name of the policy assignment to query.
:param scope: The scope of the policy assignment.
CLI Example:
.. code-block:: bash
salt-call azurearm_resource.policy_assignment_get testassign \
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.