repository_name stringclasses 316
values | func_path_in_repository stringlengths 6 223 | func_name stringlengths 1 134 | language stringclasses 1
value | func_code_string stringlengths 57 65.5k | func_documentation_string stringlengths 1 46.3k | split_name stringclasses 1
value | func_code_url stringlengths 91 315 | called_functions listlengths 1 156 ⌀ | enclosing_scope stringlengths 2 1.48M |
|---|---|---|---|---|---|---|---|---|---|
saltstack/salt | salt/grains/core.py | ip_fqdn | python | def ip_fqdn():
'''
Return ip address and FQDN grains
'''
if salt.utils.platform.is_proxy():
return {}
ret = {}
ret['ipv4'] = salt.utils.network.ip_addrs(include_loopback=True)
ret['ipv6'] = salt.utils.network.ip_addrs6(include_loopback=True)
_fqdn = hostname()['fqdn']
for s... | Return ip address and FQDN grains | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2194-L2226 | [
"def hostname():\n '''\n Return fqdn, hostname, domainname\n '''\n # This is going to need some work\n # Provides:\n # fqdn\n # host\n # localhost\n # domain\n global __FQDN__\n grains = {}\n\n if salt.utils.platform.is_proxy():\n return grains\n\n grains['local... | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | ip_interfaces | python | def ip_interfaces():
'''
Provide a dict of the connected interfaces and their ip addresses
The addresses will be passed as a list for each interface
'''
# Provides:
# ip_interfaces
if salt.utils.platform.is_proxy():
return {}
ret = {}
ifaces = _get_interfaces()
for fa... | Provide a dict of the connected interfaces and their ip addresses
The addresses will be passed as a list for each interface | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2229-L2254 | [
"def _get_interfaces():\n '''\n Provide a dict of the connected interfaces and their ip addresses\n '''\n\n global _INTERFACES\n if not _INTERFACES:\n _INTERFACES = salt.utils.network.interfaces()\n return _INTERFACES\n"
] | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | hwaddr_interfaces | python | def hwaddr_interfaces():
'''
Provide a dict of the connected interfaces and their
hw addresses (Mac Address)
'''
# Provides:
# hwaddr_interfaces
ret = {}
ifaces = _get_interfaces()
for face in ifaces:
if 'hwaddr' in ifaces[face]:
ret[face] = ifaces[face]['hwaddr... | Provide a dict of the connected interfaces and their
hw addresses (Mac Address) | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2307-L2319 | [
"def _get_interfaces():\n '''\n Provide a dict of the connected interfaces and their ip addresses\n '''\n\n global _INTERFACES\n if not _INTERFACES:\n _INTERFACES = salt.utils.network.interfaces()\n return _INTERFACES\n"
] | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | dns | python | def dns():
'''
Parse the resolver configuration file
.. versionadded:: 2016.3.0
'''
# Provides:
# dns
if salt.utils.platform.is_windows() or 'proxyminion' in __opts__:
return {}
resolv = salt.utils.dns.parse_resolv()
for key in ('nameservers', 'ip4_nameservers', 'ip6_nam... | Parse the resolver configuration file
.. versionadded:: 2016.3.0 | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2322-L2339 | null | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | get_machine_id | python | def get_machine_id():
'''
Provide the machine-id for machine/virtualization combination
'''
# Provides:
# machine-id
if platform.system() == 'AIX':
return _aix_get_machine_id()
locations = ['/etc/machine-id', '/var/lib/dbus/machine-id']
existing_locations = [loc for loc in loc... | Provide the machine-id for machine/virtualization combination | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2342-L2357 | [
"def fopen(*args, **kwargs):\n '''\n Wrapper around open() built-in to set CLOEXEC on the fd.\n\n This flag specifies that the file descriptor should be closed when an exec\n function is invoked;\n\n When a file descriptor is allocated (as with open or dup), this bit is\n initially cleared on the ... | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | saltpath | python | def saltpath():
'''
Return the path of the salt module
'''
# Provides:
# saltpath
salt_path = os.path.abspath(os.path.join(__file__, os.path.pardir))
return {'saltpath': os.path.dirname(salt_path)} | Return the path of the salt module | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2403-L2410 | null | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | _hw_data | python | def _hw_data(osdata):
'''
Get system specific hardware data from dmidecode
Provides
biosversion
productname
manufacturer
serialnumber
biosreleasedate
uuid
.. versionadded:: 0.9.5
'''
if salt.utils.platform.is_proxy():
return {}
grai... | Get system specific hardware data from dmidecode
Provides
biosversion
productname
manufacturer
serialnumber
biosreleasedate
uuid
.. versionadded:: 0.9.5 | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2448-L2737 | null | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | _get_hash_by_shell | python | def _get_hash_by_shell():
'''
Shell-out Python 3 for compute reliable hash
:return:
'''
id_ = __opts__.get('id', '')
id_hash = None
py_ver = sys.version_info[:2]
if py_ver >= (3, 3):
# Python 3.3 enabled hash randomization, so we need to shell out to get
# a reliable hash... | Shell-out Python 3 for compute reliable hash
:return: | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2740-L2762 | null | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | get_server_id | python | def get_server_id():
'''
Provides an integer based on the FQDN of a machine.
Useful as server-id in MySQL replication or anywhere else you'll need an ID
like this.
'''
# Provides:
# server_id
if salt.utils.platform.is_proxy():
server_id = {}
else:
use_crc = __opts_... | Provides an integer based on the FQDN of a machine.
Useful as server-id in MySQL replication or anywhere else you'll need an ID
like this. | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2765-L2788 | [
"def _get_hash_by_shell():\n '''\n Shell-out Python 3 for compute reliable hash\n :return:\n '''\n id_ = __opts__.get('id', '')\n id_hash = None\n py_ver = sys.version_info[:2]\n if py_ver >= (3, 3):\n # Python 3.3 enabled hash randomization, so we need to shell out to get\n # ... | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | default_gateway | python | def default_gateway():
'''
Populates grains which describe whether a server has a default gateway
configured or not. Uses `ip -4 route show` and `ip -6 route show` and greps
for a `default` at the beginning of any line. Assuming the standard
`default via <ip>` format for default gateways, it will al... | Populates grains which describe whether a server has a default gateway
configured or not. Uses `ip -4 route show` and `ip -6 route show` and greps
for a `default` at the beginning of any line. Assuming the standard
`default via <ip>` format for default gateways, it will also parse out the
ip address of ... | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2801-L2844 | null | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/grains/core.py | kernelparams | python | def kernelparams():
'''
Return the kernel boot parameters
'''
if salt.utils.platform.is_windows():
# TODO: add grains using `bcdedit /enum {current}`
return {}
else:
try:
with salt.utils.files.fopen('/proc/cmdline', 'r') as fhr:
cmdline = fhr.read(... | Return the kernel boot parameters | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/core.py#L2847-L2869 | null | # -*- coding: utf-8 -*-
'''
The static grains, these are the core, or built in grains.
When grains are loaded they are not loaded in the same way that modules are
loaded, grain functions are detected and executed, the functions MUST
return a dict which will be applied to the main grains dict. This module
will always b... |
saltstack/salt | salt/modules/osquery.py | _table_attrs | python | def _table_attrs(table):
'''
Helper function to find valid table attributes
'''
cmd = ['osqueryi'] + ['--json'] + ['pragma table_info({0})'.format(table)]
res = __salt__['cmd.run_all'](cmd)
if res['retcode'] == 0:
attrs = []
text = salt.utils.json.loads(res['stdout'])
for... | Helper function to find valid table attributes | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L36-L48 | null | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | _osquery | python | def _osquery(sql, format='json'):
'''
Helper function to run raw osquery queries
'''
ret = {
'result': True,
}
cmd = ['osqueryi'] + ['--json'] + [sql]
res = __salt__['cmd.run_all'](cmd)
if res['stderr']:
ret['result'] = False
ret['error'] = res['stderr']
else... | Helper function to run raw osquery queries | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L51-L67 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | _osquery_cmd | python | def _osquery_cmd(table, attrs=None, where=None, format='json'):
'''
Helper function to run osquery queries
'''
ret = {
'result': True,
}
if attrs:
if isinstance(attrs, list):
valid_attrs = _table_attrs(table)
if valid_attrs:
for a in attrs... | Helper function to run osquery queries | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L70-L111 | [
"def _table_attrs(table):\n '''\n Helper function to find valid table attributes\n '''\n cmd = ['osqueryi'] + ['--json'] + ['pragma table_info({0})'.format(table)]\n res = __salt__['cmd.run_all'](cmd)\n if res['retcode'] == 0:\n attrs = []\n text = salt.utils.json.loads(res['stdout']... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | version | python | def version():
'''
Return version of osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.version
'''
_false_return = {'result': False,
'comment': 'OSQuery version unavailable.'}
res = _osquery_cmd(table='osquery_info', attrs=['version'])
if 'result'... | Return version of osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.version | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L114-L130 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | rpm_packages | python | def rpm_packages(attrs=None, where=None):
'''
Return cpuid information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.rpm_packages
'''
if __grains__['os_family'] == 'RedHat':
return _osquery_cmd(table='rpm_packages', attrs=attrs, where=where)
return {'resu... | Return cpuid information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.rpm_packages | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L133-L146 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | kernel_integrity | python | def kernel_integrity(attrs=None, where=None):
'''
Return kernel_integrity information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.kernel_integrity
'''
if __grains__['os_family'] in ['RedHat', 'Debian']:
return _osquery_cmd(table='kernel_integrity', attrs=at... | Return kernel_integrity information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.kernel_integrity | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L149-L161 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | kernel_modules | python | def kernel_modules(attrs=None, where=None):
'''
Return kernel_modules information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.kernel_modules
'''
if __grains__['os_family'] in ['RedHat', 'Debian']:
return _osquery_cmd(table='kernel_modules', attrs=attrs, whe... | Return kernel_modules information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.kernel_modules | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L164-L176 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | memory_map | python | def memory_map(attrs=None, where=None):
'''
Return memory_map information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.memory_map
'''
if __grains__['os_family'] in ['RedHat', 'Debian']:
return _osquery_cmd(table='memory_map', attrs=attrs, where=where)
re... | Return memory_map information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.memory_map | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L179-L191 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | process_memory_map | python | def process_memory_map(attrs=None, where=None):
'''
Return process_memory_map information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.process_memory_map
'''
if __grains__['os_family'] in ['RedHat', 'Debian']:
return _osquery_cmd(table='process_memory_map', ... | Return process_memory_map information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.process_memory_map | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L194-L206 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | shared_memory | python | def shared_memory(attrs=None, where=None):
'''
Return shared_memory information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.shared_memory
'''
if __grains__['os_family'] in ['RedHat', 'Debian']:
return _osquery_cmd(table='shared_memory', attrs=attrs, where=w... | Return shared_memory information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.shared_memory | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L209-L221 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | apt_sources | python | def apt_sources(attrs=None, where=None):
'''
Return apt_sources information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.apt_sources
'''
if __grains__['os_family'] == 'Debian':
return _osquery_cmd(table='apt_sources', attrs=attrs, where=where)
return {'r... | Return apt_sources information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.apt_sources | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L224-L236 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | deb_packages | python | def deb_packages(attrs=None, where=None):
'''
Return deb_packages information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.deb_packages
'''
if __grains__['os_family'] == 'Debian':
return _osquery_cmd(table='deb_packages', attrs=attrs, where=where)
return... | Return deb_packages information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.deb_packages | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L239-L251 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/modules/osquery.py | alf | python | def alf(attrs=None, where=None):
'''
Return alf information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.alf
'''
if salt.utils.platform.is_darwin():
return _osquery_cmd(table='alf', attrs=attrs, where=where)
return {'result': False, 'comment': 'Only avai... | Return alf information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.alf | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/osquery.py#L657-L669 | [
"def _osquery_cmd(table, attrs=None, where=None, format='json'):\n '''\n Helper function to run osquery queries\n '''\n ret = {\n 'result': True,\n }\n\n if attrs:\n if isinstance(attrs, list):\n valid_attrs = _table_attrs(table)\n if valid_attrs:\n ... | # -*- coding: utf-8 -*-
'''
Support for OSQuery - https://osquery.io.
.. versionadded:: 2015.8.0
'''
from __future__ import absolute_import, print_function, unicode_literals
# Import python libs
import logging
# Import Salt libs
import salt.utils.json
import salt.utils.path
import salt.utils.platform
log = logging.... |
saltstack/salt | salt/utils/lazy.py | verify_fun | python | def verify_fun(lazy_obj, fun):
'''
Check that the function passed really exists
'''
if not fun:
raise salt.exceptions.SaltInvocationError(
'Must specify a function to run!\n'
'ex: manage.up'
)
if fun not in lazy_obj:
# If the requested function isn't a... | Check that the function passed really exists | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/lazy.py#L19-L30 | null | # -*- coding: utf-8 -*-
'''
Lazily-evaluated data structures, primarily used by Salt's loader
'''
# Import Python Libs
from __future__ import absolute_import, unicode_literals
import logging
import salt.exceptions
try:
from collections.abc import MutableMapping
except ImportError:
from collections import Muta... |
saltstack/salt | salt/utils/lazy.py | LazyDict.clear | python | def clear(self):
'''
Clear the dict
'''
# create a dict to store loaded values in
self._dict = getattr(self, 'mod_dict_class', dict)()
# have we already loded everything?
self.loaded = False | Clear the dict | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/lazy.py#L52-L60 | null | class LazyDict(MutableMapping):
'''
A base class of dict which will lazily load keys once they are needed
TODO: negative caching? If you ask for 'foo' and it doesn't exist it will
look EVERY time unless someone calls load_all()
As of now this is left to the class which inherits from this base
'... |
saltstack/salt | salt/modules/boto_iam.py | instance_profile_exists | python | def instance_profile_exists(name, region=None, key=None, keyid=None,
profile=None):
'''
Check to see if an instance profile exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
'''
conn = _get_conn(region=regio... | Check to see if an instance profile exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L86-L105 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | role_exists | python | def role_exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if an IAM role exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.role_exists myirole
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:
conn... | Check to see if an IAM role exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.role_exists myirole | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L160-L175 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | describe_role | python | def describe_role(name, region=None, key=None, keyid=None, profile=None):
'''
Get information for a role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.describe_role myirole
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:
info = c... | Get information for a role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.describe_role myirole | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L178-L209 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | create_user | python | def create_user(user_name, path=None, region=None, key=None, keyid=None,
profile=None):
'''
Create a user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_user myuser
'''
if not path:
path = '/'
if get_user(us... | Create a user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_user myuser | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L212-L237 | [
"def get_user(user_name=None, region=None, key=None, keyid=None, profile=None):\n '''\n Get user information.\n\n .. versionadded:: 2015.8.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_user myuser\n '''\n conn = _get_conn(region=region, key=key, keyid=keyid, ... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_all_access_keys | python | def get_all_access_keys(user_name, marker=None, max_items=None,
region=None, key=None, keyid=None, profile=None):
'''
Get all access keys from a user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_access_keys myuser
... | Get all access keys from a user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_access_keys myuser | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L240-L259 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_user | python | def delete_user(user_name, region=None, key=None, keyid=None,
profile=None):
'''
Delete a user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_user myuser
'''
if not get_user(user_name, region, key, keyid, profile):
... | Delete a user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_user myuser | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L305-L328 | [
"def get_user(user_name=None, region=None, key=None, keyid=None, profile=None):\n '''\n Get user information.\n\n .. versionadded:: 2015.8.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_user myuser\n '''\n conn = _get_conn(region=region, key=key, keyid=keyid, ... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_user | python | def get_user(user_name=None, region=None, key=None, keyid=None, profile=None):
'''
Get user information.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_user myuser
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
... | Get user information.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_user myuser | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L331-L352 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_group | python | def get_group(group_name, region=None, key=None, keyid=None, profile=None):
'''
Get group information.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_group mygroup
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
... | Get group information.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_group mygroup | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L384-L405 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_group_members | python | def get_group_members(group_name, region=None, key=None, keyid=None, profile=None):
'''
Get group information.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_group mygroup
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=p... | Get group information.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_group mygroup | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L408-L440 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | add_user_to_group | python | def add_user_to_group(user_name, group_name, region=None, key=None, keyid=None,
profile=None):
'''
Add user to group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.add_user_to_group myuser mygroup
'''
user = get_user(use... | Add user to group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.add_user_to_group myuser mygroup | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L443-L472 | [
"def get_user(user_name=None, region=None, key=None, keyid=None, profile=None):\n '''\n Get user information.\n\n .. versionadded:: 2015.8.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_user myuser\n '''\n conn = _get_conn(region=region, key=key, keyid=keyid, ... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | user_exists_in_group | python | def user_exists_in_group(user_name, group_name, region=None, key=None, keyid=None,
profile=None):
'''
Check if user exists in group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.user_exists_in_group myuser mygroup
'''
... | Check if user exists in group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.user_exists_in_group myuser mygroup | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L475-L498 | [
"def get_group_members(group_name, region=None, key=None, keyid=None, profile=None):\n '''\n Get group information.\n\n .. versionadded:: 2016.3.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_group mygroup\n '''\n conn = _get_conn(region=region, key=key, keyid... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | put_group_policy | python | def put_group_policy(group_name, policy_name, policy_json, region=None, key=None,
keyid=None, profile=None):
'''
Adds or updates the specified policy document for the specified group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam... | Adds or updates the specified policy document for the specified group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.put_group_policy mygroup policyname policyrules | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L533-L564 | [
"def dumps(obj, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.dumps, and assumes that ensure_ascii is False (unless explicitly\n passed as True) for unicode compatibility. Note that setting it to True\n will mess up any unicode characters, as they will be dumped as the string\n lite... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_group_policy | python | def delete_group_policy(group_name, policy_name, region=None, key=None,
keyid=None, profile=None):
'''
Delete a group policy.
CLI Example::
.. code-block:: bash
salt myminion boto_iam.delete_group_policy mygroup mypolicy
'''
conn = _get_conn(region=region, key=... | Delete a group policy.
CLI Example::
.. code-block:: bash
salt myminion boto_iam.delete_group_policy mygroup mypolicy | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L567-L593 | [
"def get_group_policy(group_name, policy_name, region=None, key=None,\n keyid=None, profile=None):\n '''\n Retrieves the specified policy document for the specified group.\n\n .. versionadded:: 2015.8.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.ge... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_group_policy | python | def get_group_policy(group_name, policy_name, region=None, key=None,
keyid=None, profile=None):
'''
Retrieves the specified policy document for the specified group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_group_policy m... | Retrieves the specified policy document for the specified group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_group_policy mygroup policyname | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L596-L622 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_all_groups | python | def get_all_groups(path_prefix='/', region=None, key=None, keyid=None,
profile=None):
'''
Get and return all IAM group details, starting at the optional path.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.get_all_groups
'''
conn = _get_conn(region=region,... | Get and return all IAM group details, starting at the optional path.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.get_all_groups | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L625-L650 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_all_instance_profiles | python | def get_all_instance_profiles(path_prefix='/', region=None, key=None,
keyid=None, profile=None):
'''
Get and return all IAM instance profiles, starting at the optional path.
.. versionadded:: 2016.11.0
CLI Example:
salt-call boto_iam.get_all_instance_profiles
... | Get and return all IAM instance profiles, starting at the optional path.
.. versionadded:: 2016.11.0
CLI Example:
salt-call boto_iam.get_all_instance_profiles | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L653-L674 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | list_instance_profiles | python | def list_instance_profiles(path_prefix='/', region=None, key=None,
keyid=None, profile=None):
'''
List all IAM instance profiles, starting at the optional path.
.. versionadded:: 2016.11.0
CLI Example:
salt-call boto_iam.list_instance_profiles
'''
p = get_al... | List all IAM instance profiles, starting at the optional path.
.. versionadded:: 2016.11.0
CLI Example:
salt-call boto_iam.list_instance_profiles | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L677-L689 | [
"def get_all_instance_profiles(path_prefix='/', region=None, key=None,\n keyid=None, profile=None):\n '''\n Get and return all IAM instance profiles, starting at the optional path.\n\n .. versionadded:: 2016.11.0\n\n CLI Example:\n\n salt-call boto_iam.get_all_instanc... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_all_group_policies | python | def get_all_group_policies(group_name, region=None, key=None, keyid=None,
profile=None):
'''
Get a list of policy names from a group.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_group_policies mygroup
'''
conn = _get_conn(region=region, ... | Get a list of policy names from a group.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_group_policies mygroup | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L692-L712 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_group | python | def delete_group(group_name, region=None, key=None,
keyid=None, profile=None):
'''
Delete a group policy.
CLI Example::
.. code-block:: bash
salt myminion boto_iam.delete_group mygroup
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
... | Delete a group policy.
CLI Example::
.. code-block:: bash
salt myminion boto_iam.delete_group mygroup | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L715-L741 | [
"def get_group(group_name, region=None, key=None, keyid=None, profile=None):\n '''\n Get group information.\n\n .. versionadded:: 2015.8.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_group mygroup\n '''\n conn = _get_conn(region=region, key=key, keyid=keyid, ... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | create_login_profile | python | def create_login_profile(user_name, password, region=None, key=None,
keyid=None, profile=None):
'''
Creates a login profile for the specified user, give the user the
ability to access AWS services and the AWS Management Console.
.. versionadded:: 2015.8.0
CLI Example:
... | Creates a login profile for the specified user, give the user the
ability to access AWS services and the AWS Management Console.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_login_profile user_name password | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L744-L773 | [
"def get_user(user_name=None, region=None, key=None, keyid=None, profile=None):\n '''\n Get user information.\n\n .. versionadded:: 2015.8.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_user myuser\n '''\n conn = _get_conn(region=region, key=key, keyid=keyid, ... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_all_mfa_devices | python | def get_all_mfa_devices(user_name, region=None, key=None, keyid=None,
profile=None):
'''
Get all MFA devices associated with an IAM user.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_mfa_devices user_name
'''
... | Get all MFA devices associated with an IAM user.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_mfa_devices user_name | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L807-L835 | [
"def get_user(user_name=None, region=None, key=None, keyid=None, profile=None):\n '''\n Get user information.\n\n .. versionadded:: 2015.8.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_user myuser\n '''\n conn = _get_conn(region=region, key=key, keyid=keyid, ... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_virtual_mfa_device | python | def delete_virtual_mfa_device(serial, region=None, key=None, keyid=None, profile=None):
'''
Deletes the specified virtual MFA device.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_virtual_mfa_device serial_num
'''
conn = __utils__['boto3.get_connection_func']('iam')(... | Deletes the specified virtual MFA device.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_virtual_mfa_device serial_num | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L870-L891 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | update_account_password_policy | python | def update_account_password_policy(allow_users_to_change_password=None,
hard_expiry=None, max_password_age=None,
minimum_password_length=None,
password_reuse_prevention=None,
requi... | Update the password policy for the AWS account.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.update_account_password_policy True | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L894-L929 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_account_policy | python | def get_account_policy(region=None, key=None, keyid=None, profile=None):
'''
Get account policy for the AWS account.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_account_policy
'''
conn = _get_conn(region=region, key=key, keyid=keyid, pr... | Get account policy for the AWS account.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_account_policy | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L932-L952 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | create_role | python | def create_role(name, policy_document=None, path=None, region=None, key=None,
keyid=None, profile=None):
'''
Create an instance role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_role myrole
'''
conn = _get_conn(region=region, key=key, keyid=keyid, p... | Create an instance role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_role myrole | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L955-L980 | [
"def role_exists(name, region=None, key=None, keyid=None, profile=None):\n '''\n Check to see if an IAM role exists.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.role_exists myirole\n '''\n conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)\n t... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_role | python | def delete_role(name, region=None, key=None, keyid=None, profile=None):
'''
Delete an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_role myirole
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
if not role_exists(name, region,... | Delete an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_role myirole | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L983-L1004 | [
"def role_exists(name, region=None, key=None, keyid=None, profile=None):\n '''\n Check to see if an IAM role exists.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.role_exists myirole\n '''\n conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)\n t... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | profile_associated | python | def profile_associated(role_name, profile_name, region, key, keyid, profile):
'''
Check to see if an instance profile is associated with an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.profile_associated myirole myiprofile
'''
conn = _get_conn(region=region, key=... | Check to see if an instance profile is associated with an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.profile_associated myirole myiprofile | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1007-L1032 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | associate_profile_to_role | python | def associate_profile_to_role(profile_name, role_name, region=None, key=None,
keyid=None, profile=None):
'''
Associate an instance profile with an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.associate_profile_to_role myirole myiprofile
... | Associate an instance profile with an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.associate_profile_to_role myirole myiprofile | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1035-L1065 | [
"def instance_profile_exists(name, region=None, key=None, keyid=None,\n profile=None):\n '''\n Check to see if an instance profile exists.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.instance_profile_exists myiprofile\n '''\n conn = _get_c... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | list_role_policies | python | def list_role_policies(role_name, region=None, key=None, keyid=None,
profile=None):
'''
Get a list of policy names from a role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_role_policies myirole
'''
conn = _get_conn(region=region, key=key, keyid... | Get a list of policy names from a role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_role_policies myirole | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1101-L1120 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_role_policy | python | def get_role_policy(role_name, policy_name, region=None, key=None,
keyid=None, profile=None):
'''
Get a role policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_role_policy myirole mypolicy
'''
conn = _get_conn(region=region, key=key, keyid=keyid, ... | Get a role policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_role_policy myirole mypolicy | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1123-L1145 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | create_role_policy | python | def create_role_policy(role_name, policy_name, policy, region=None, key=None,
keyid=None, profile=None):
'''
Create or modify a role policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_role_policy myirole mypolicy '{"MyPolicy": "Statement": [{"Action... | Create or modify a role policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_role_policy myirole mypolicy '{"MyPolicy": "Statement": [{"Action": ["sqs:*"], "Effect": "Allow", "Resource": ["arn:aws:sqs:*:*:*"], "Sid": "MyPolicySqs1"}]}' | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1148-L1182 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_role_policy | python | def delete_role_policy(role_name, policy_name, region=None, key=None,
keyid=None, profile=None):
'''
Delete a role policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_role_policy myirole mypolicy
'''
conn = _get_conn(region=region, key=key, k... | Delete a role policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_role_policy myirole mypolicy | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1185-L1210 | [
"def get_role_policy(role_name, policy_name, region=None, key=None,\n keyid=None, profile=None):\n '''\n Get a role policy.\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_role_policy myirole mypolicy\n '''\n conn = _get_conn(region=region, key=ke... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | update_assume_role_policy | python | def update_assume_role_policy(role_name, policy_document, region=None,
key=None, keyid=None, profile=None):
'''
Update an assume role policy for a role.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.update_assume_role_po... | Update an assume role policy for a role.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.update_assume_role_policy myrole '{"Statement":"..."}' | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1213-L1239 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | build_policy | python | def build_policy(region=None, key=None, keyid=None, profile=None):
'''
Build a default assume role policy.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.build_policy
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
... | Build a default assume role policy.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.build_policy | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1242-L1275 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_account_id | python | def get_account_id(region=None, key=None, keyid=None, profile=None):
'''
Get a the AWS account id associated with the used credentials.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_account_id
'''
cache_key = 'boto_iam.account_id'
if cache_key not in __context__:
... | Get a the AWS account id associated with the used credentials.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_account_id | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1278-L1314 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_all_roles | python | def get_all_roles(path_prefix=None, region=None, key=None, keyid=None,
profile=None):
'''
Get and return all IAM role details, starting at the optional path.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.get_all_roles
'''
conn = _get_conn(region=region, k... | Get and return all IAM role details, starting at the optional path.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.get_all_roles | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1317-L1342 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_all_users | python | def get_all_users(path_prefix='/', region=None, key=None, keyid=None,
profile=None):
'''
Get and return all IAM user details, starting at the optional path.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.get_all_users
'''
conn = _get_conn(region=region, ke... | Get and return all IAM user details, starting at the optional path.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.get_all_users | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1345-L1370 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_all_user_policies | python | def get_all_user_policies(user_name, marker=None, max_items=None, region=None, key=None, keyid=None, profile=None):
'''
Get all user policies.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_user_policies myuser
'''
conn = _get_conn(reg... | Get all user policies.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_user_policies myuser | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1373-L1395 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_user_policy | python | def get_user_policy(user_name, policy_name, region=None, key=None, keyid=None, profile=None):
'''
Retrieves the specified policy document for the specified user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_user_policy myuser mypolicyname
''... | Retrieves the specified policy document for the specified user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_user_policy myuser mypolicyname | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1398-L1423 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | put_user_policy | python | def put_user_policy(user_name, policy_name, policy_json, region=None, key=None, keyid=None, profile=None):
'''
Adds or updates the specified policy document for the specified user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.put_user_policy myuser ... | Adds or updates the specified policy document for the specified user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.put_user_policy myuser policyname policyrules | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1426-L1455 | [
"def dumps(obj, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.dumps, and assumes that ensure_ascii is False (unless explicitly\n passed as True) for unicode compatibility. Note that setting it to True\n will mess up any unicode characters, as they will be dumped as the string\n lite... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_user_policy | python | def delete_user_policy(user_name, policy_name, region=None, key=None, keyid=None, profile=None):
'''
Delete a user policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_user_policy myuser mypolicy
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=prof... | Delete a user policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_user_policy myuser mypolicy | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1458-L1483 | [
"def get_user_policy(user_name, policy_name, region=None, key=None, keyid=None, profile=None):\n '''\n Retrieves the specified policy document for the specified user.\n\n .. versionadded:: 2015.8.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_user_policy myuser mypo... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | upload_server_cert | python | def upload_server_cert(cert_name, cert_body, private_key, cert_chain=None, path=None,
region=None, key=None, keyid=None, profile=None):
'''
Upload a certificate to Amazon.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.upload_se... | Upload a certificate to Amazon.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.upload_server_cert mycert_name crt priv_key
:param cert_name: The name for the server certificate. Do not include the path in this value.
:param cert_body: The contents of... | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1486-L1522 | [
"def get_server_certificate(cert_name, region=None, key=None, keyid=None, profile=None):\n '''\n Returns certificate information from Amazon\n\n .. versionadded:: 2015.8.0\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_server_certificate mycert_name\n '''\n conn... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | list_server_certificates | python | def list_server_certificates(path_prefix='/', region=None, key=None, keyid=None, profile=None):
'''
Lists the server certificates stored in IAM that have the specified path prefix.
.. versionadded:: ???
:param path_prefix:
The path prefix for filtering the results. For example: /company/serv... | Lists the server certificates stored in IAM that have the specified path prefix.
.. versionadded:: ???
:param path_prefix:
The path prefix for filtering the results. For example: /company/servercerts would get
all server certificates for which the path starts with /company/servercerts .
... | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1525-L1572 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_server_cert | python | def delete_server_cert(cert_name, region=None, key=None, keyid=None, profile=None):
'''
Deletes a certificate from Amazon.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_server_cert mycert_name
'''
conn = _get_conn(region=region, key=ke... | Deletes a certificate from Amazon.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_server_cert mycert_name | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1599-L1617 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | export_users | python | def export_users(path_prefix='/', region=None, key=None, keyid=None,
profile=None):
'''
Get all IAM user details. Produces results that can be used to create an
sls file.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.export_users --out=txt | sed "s/local: //"... | Get all IAM user details. Produces results that can be used to create an
sls file.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.export_users --out=txt | sed "s/local: //" > iam_users.sls | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1620-L1656 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | export_roles | python | def export_roles(path_prefix='/', region=None, key=None, keyid=None, profile=None):
'''
Get all IAM role details. Produces results that can be used to create an
sls file.
CLI Example:
salt-call boto_iam.export_roles --out=txt | sed "s/local: //" > iam_roles.sls
'''
conn = _get_conn(reg... | Get all IAM role details. Produces results that can be used to create an
sls file.
CLI Example:
salt-call boto_iam.export_roles --out=txt | sed "s/local: //" > iam_roles.sls | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1659-L1693 | [
"def loads(s, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.loads and prevents a traceback in the event that a bytestring is\n passed to the function. (Python < 3.6 cannot load bytestrings)\n\n You can pass an alternate json module (loaded via import_json() above)\n using the _json_... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | policy_exists | python | def policy_exists(policy_name,
region=None, key=None, keyid=None, profile=None):
'''
Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
'''
conn = _get_conn(region=region, key=key, keyid=keyid, p... | Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1706-L1724 | [
"def _get_policy_arn(name, region=None, key=None, keyid=None, profile=None):\n if name.startswith('arn:aws:iam:'):\n return name\n\n account_id = get_account_id(\n region=region, key=key, keyid=keyid, profile=profile\n )\n return 'arn:aws:iam::{0}:policy/{1}'.format(account_id, name)\n"
] | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_policy | python | def get_policy(policy_name,
region=None, key=None, keyid=None, profile=None):
'''
Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile... | Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1727-L1745 | [
"def _get_policy_arn(name, region=None, key=None, keyid=None, profile=None):\n if name.startswith('arn:aws:iam:'):\n return name\n\n account_id = get_account_id(\n region=region, key=key, keyid=keyid, profile=profile\n )\n return 'arn:aws:iam::{0}:policy/{1}'.format(account_id, name)\n"
] | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | create_policy | python | def create_policy(policy_name, policy_document, path=None, description=None,
region=None, key=None, keyid=None, profile=None):
'''
Create a policy.
CLI Example:
.. code-block:: bash
salt myminios boto_iam.create_policy mypolicy '{"Version": "2012-10-17", "Statement": [{ "Effe... | Create a policy.
CLI Example:
.. code-block:: bash
salt myminios boto_iam.create_policy mypolicy '{"Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": ["s3:Get*", "s3:List*"], "Resource": ["arn:aws:s3:::my-bucket/shared/*"]},]}' | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1748-L1776 | [
"def dumps(obj, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.dumps, and assumes that ensure_ascii is False (unless explicitly\n passed as True) for unicode compatibility. Note that setting it to True\n will mess up any unicode characters, as they will be dumped as the string\n lite... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | list_policies | python | def list_policies(region=None, key=None, keyid=None, profile=None):
'''
List policies.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_policies
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:
policies = []
for ret in _... | List policies.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_policies | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1806-L1827 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | policy_version_exists | python | def policy_version_exists(policy_name, version_id,
region=None, key=None, keyid=None, profile=None):
'''
Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
'''
conn = _get_conn(region=region, key... | Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1830-L1848 | [
"def _get_policy_arn(name, region=None, key=None, keyid=None, profile=None):\n if name.startswith('arn:aws:iam:'):\n return name\n\n account_id = get_account_id(\n region=region, key=key, keyid=keyid, profile=profile\n )\n return 'arn:aws:iam::{0}:policy/{1}'.format(account_id, name)\n"
] | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_policy_version | python | def get_policy_version(policy_name, version_id,
region=None, key=None, keyid=None, profile=None):
'''
Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
'''
conn = _get_conn(region=region, key=key, ... | Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1851-L1871 | [
"def _get_policy_arn(name, region=None, key=None, keyid=None, profile=None):\n if name.startswith('arn:aws:iam:'):\n return name\n\n account_id = get_account_id(\n region=region, key=key, keyid=keyid, profile=profile\n )\n return 'arn:aws:iam::{0}:policy/{1}'.format(account_id, name)\n"
] | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | create_policy_version | python | def create_policy_version(policy_name, policy_document, set_as_default=None,
region=None, key=None, keyid=None, profile=None):
'''
Create a policy version.
CLI Example:
.. code-block:: bash
salt myminios boto_iam.create_policy_version mypolicy '{"Version": "2012-10-17", "Stat... | Create a policy version.
CLI Example:
.. code-block:: bash
salt myminios boto_iam.create_policy_version mypolicy '{"Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": ["s3:Get*", "s3:List*"], "Resource": ["arn:aws:s3:::my-bucket/shared/*"]},]}' | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1874-L1902 | [
"def dumps(obj, **kwargs):\n '''\n .. versionadded:: 2018.3.0\n\n Wraps json.dumps, and assumes that ensure_ascii is False (unless explicitly\n passed as True) for unicode compatibility. Note that setting it to True\n will mess up any unicode characters, as they will be dumped as the string\n lite... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_policy_version | python | def delete_policy_version(policy_name, version_id,
region=None, key=None, keyid=None, profile=None):
'''
Delete a policy version.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_policy_version mypolicy v1
'''
conn = _get_conn(region=region, key=key, k... | Delete a policy version.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_policy_version mypolicy v1 | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1905-L1930 | [
"def _get_policy_arn(name, region=None, key=None, keyid=None, profile=None):\n if name.startswith('arn:aws:iam:'):\n return name\n\n account_id = get_account_id(\n region=region, key=key, keyid=keyid, profile=profile\n )\n return 'arn:aws:iam::{0}:policy/{1}'.format(account_id, name)\n",
... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | list_policy_versions | python | def list_policy_versions(policy_name,
region=None, key=None, keyid=None, profile=None):
'''
List versions of a policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_policy_versions mypolicy
'''
conn = _get_conn(region=region, key=key, keyid=keyid, pro... | List versions of a policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_policy_versions mypolicy | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L1933-L1953 | [
"def _get_policy_arn(name, region=None, key=None, keyid=None, profile=None):\n if name.startswith('arn:aws:iam:'):\n return name\n\n account_id = get_account_id(\n region=region, key=key, keyid=keyid, profile=profile\n )\n return 'arn:aws:iam::{0}:policy/{1}'.format(account_id, name)\n"
] | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | detach_user_policy | python | def detach_user_policy(policy_name, user_name,
region=None, key=None, keyid=None, profile=None):
'''
Detach a managed policy to a user.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.detach_user_policy mypolicy myuser
'''
conn = _get_conn(region=region, key... | Detach a managed policy to a user.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.detach_user_policy mypolicy myuser | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L2006-L2027 | [
"def _get_policy_arn(name, region=None, key=None, keyid=None, profile=None):\n if name.startswith('arn:aws:iam:'):\n return name\n\n account_id = get_account_id(\n region=region, key=key, keyid=keyid, profile=profile\n )\n return 'arn:aws:iam::{0}:policy/{1}'.format(account_id, name)\n"
] | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | list_entities_for_policy | python | def list_entities_for_policy(policy_name, path_prefix=None, entity_filter=None,
region=None, key=None, keyid=None, profile=None):
'''
List entities that a policy is attached to.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_entities_for_policy mypolicy
''... | List entities that a policy is attached to.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_entities_for_policy mypolicy | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L2126-L2165 | [
"def iteritems(d, **kw):\n return d.iteritems(**kw)\n",
"def _get_policy_arn(name, region=None, key=None, keyid=None, profile=None):\n if name.startswith('arn:aws:iam:'):\n return name\n\n account_id = get_account_id(\n region=region, key=key, keyid=keyid, profile=profile\n )\n return... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | list_attached_role_policies | python | def list_attached_role_policies(role_name, path_prefix=None, entity_filter=None,
region=None, key=None, keyid=None, profile=None):
'''
List entities attached to the given role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_entities_for_policy mypolicy
'''... | List entities attached to the given role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_entities_for_policy mypolicy | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L2230-L2258 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | create_saml_provider | python | def create_saml_provider(name, saml_metadata_document, region=None, key=None, keyid=None, profile=None):
'''
Create SAML provider
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_saml_provider my_saml_provider_name saml_metadata_document
'''
conn = _get_conn(region=regi... | Create SAML provider
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_saml_provider my_saml_provider_name saml_metadata_document | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L2261-L2280 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_saml_provider_arn | python | def get_saml_provider_arn(name, region=None, key=None, keyid=None, profile=None):
'''
Get SAML provider
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_saml_provider_arn my_saml_provider_name
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
t... | Get SAML provider
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_saml_provider_arn my_saml_provider_name | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L2283-L2304 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | delete_saml_provider | python | def delete_saml_provider(name, region=None, key=None, keyid=None, profile=None):
'''
Delete SAML provider
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_saml_provider my_saml_provider_name
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
... | Delete SAML provider
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_saml_provider my_saml_provider_name | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L2307-L2330 | [
"def get_saml_provider_arn(name, region=None, key=None, keyid=None, profile=None):\n '''\n Get SAML provider\n\n CLI Example:\n\n .. code-block:: bash\n\n salt myminion boto_iam.get_saml_provider_arn my_saml_provider_name\n '''\n conn = _get_conn(region=region, key=key, keyid=keyid, profile... | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | list_saml_providers | python | def list_saml_providers(region=None, key=None, keyid=None, profile=None):
'''
List SAML providers.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_saml_providers
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:
providers = []
... | List SAML providers.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_saml_providers | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L2333-L2353 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/modules/boto_iam.py | get_saml_provider | python | def get_saml_provider(name, region=None, key=None, keyid=None, profile=None):
'''
Get SAML provider document.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_saml_provider arn
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:
prov... | Get SAML provider document.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_saml_provider arn | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_iam.py#L2356-L2373 | null | # -*- coding: utf-8 -*-
'''
Connection module for Amazon IAM
.. versionadded:: 2014.7.0
:configuration: This module accepts explicit iam credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no furthe... |
saltstack/salt | salt/beacons/adb.py | validate | python | def validate(config):
'''
Validate the beacon configuration
'''
# Configuration for adb beacon should be a dictionary with states array
if not isinstance(config, list):
log.info('Configuration for adb beacon must be a list.')
return False, ('Configuration for adb beacon must be a lis... | Validate the beacon configuration | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/adb.py#L32-L60 | null | # -*- coding: utf-8 -*-
'''
Beacon to emit adb device state changes for Android devices
.. versionadded:: 2016.3.0
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals
import logging
# Salt libs
import salt.utils.path
from salt.ext.six.moves import map
log = logging.getLogger(__name__)
... |
saltstack/salt | salt/beacons/adb.py | beacon | python | def beacon(config):
'''
Emit the status of all devices returned by adb
Specify the device states that should emit an event,
there will be an event for each device with the
event type and device specified.
.. code-block:: yaml
beacons:
adb:
- states:
... | Emit the status of all devices returned by adb
Specify the device states that should emit an event,
there will be an event for each device with the
event type and device specified.
.. code-block:: yaml
beacons:
adb:
- states:
- offline
- u... | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/adb.py#L63-L144 | null | # -*- coding: utf-8 -*-
'''
Beacon to emit adb device state changes for Android devices
.. versionadded:: 2016.3.0
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals
import logging
# Salt libs
import salt.utils.path
from salt.ext.six.moves import map
log = logging.getLogger(__name__)
... |
saltstack/salt | salt/thorium/reg.py | set_ | python | def set_(name, add, match):
'''
Add a value to the named set
USAGE:
.. code-block:: yaml
foo:
reg.set:
- add: bar
- match: my/custom/event
'''
ret = {'name': name,
'changes': {},
'comment': '',
'result': True}
if n... | Add a value to the named set
USAGE:
.. code-block:: yaml
foo:
reg.set:
- add: bar
- match: my/custom/event | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/reg.py#L17-L47 | [
"def expr_match(line, expr):\n '''\n Checks whether or not the passed value matches the specified expression.\n Tries to match expr first as a glob using fnmatch.fnmatch(), and then tries\n to match expr as a regular expression. Originally designed to match minion\n IDs for whitelists/blacklists.\n\n... | # -*- coding: utf-8 -*-
'''
Used to manage the thorium register. The thorium register is where compound
values are stored and computed, such as averages etc.
'''
# import python libs
from __future__ import absolute_import, division, print_function, unicode_literals
import salt.utils.stringutils
__func_alias__ = {
... |
saltstack/salt | salt/thorium/reg.py | list_ | python | def list_(name, add, match, stamp=False, prune=0):
'''
Add the specified values to the named list
If ``stamp`` is True, then the timestamp from the event will also be added
if ``prune`` is set to an integer higher than ``0``, then only the last
``prune`` values will be kept in the list.
USAGE:... | Add the specified values to the named list
If ``stamp`` is True, then the timestamp from the event will also be added
if ``prune`` is set to an integer higher than ``0``, then only the last
``prune`` values will be kept in the list.
USAGE:
.. code-block:: yaml
foo:
reg.list:
... | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/reg.py#L50-L92 | [
"def expr_match(line, expr):\n '''\n Checks whether or not the passed value matches the specified expression.\n Tries to match expr first as a glob using fnmatch.fnmatch(), and then tries\n to match expr as a regular expression. Originally designed to match minion\n IDs for whitelists/blacklists.\n\n... | # -*- coding: utf-8 -*-
'''
Used to manage the thorium register. The thorium register is where compound
values are stored and computed, such as averages etc.
'''
# import python libs
from __future__ import absolute_import, division, print_function, unicode_literals
import salt.utils.stringutils
__func_alias__ = {
... |
saltstack/salt | salt/thorium/reg.py | mean | python | def mean(name, add, match):
'''
Accept a numeric value from the matched events and store a running average
of the values in the given register. If the specified value is not numeric
it will be skipped
USAGE:
.. code-block:: yaml
foo:
reg.mean:
- add: data_field
... | Accept a numeric value from the matched events and store a running average
of the values in the given register. If the specified value is not numeric
it will be skipped
USAGE:
.. code-block:: yaml
foo:
reg.mean:
- add: data_field
- match: my/custom/event | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/reg.py#L95-L133 | [
"def expr_match(line, expr):\n '''\n Checks whether or not the passed value matches the specified expression.\n Tries to match expr first as a glob using fnmatch.fnmatch(), and then tries\n to match expr as a regular expression. Originally designed to match minion\n IDs for whitelists/blacklists.\n\n... | # -*- coding: utf-8 -*-
'''
Used to manage the thorium register. The thorium register is where compound
values are stored and computed, such as averages etc.
'''
# import python libs
from __future__ import absolute_import, division, print_function, unicode_literals
import salt.utils.stringutils
__func_alias__ = {
... |
saltstack/salt | salt/thorium/reg.py | clear | python | def clear(name):
'''
Clear the namespace from the register
USAGE:
.. code-block:: yaml
clearns:
reg.clear:
- name: myregister
'''
ret = {'name': name,
'changes': {},
'comment': '',
'result': True}
if name in __reg__:
_... | Clear the namespace from the register
USAGE:
.. code-block:: yaml
clearns:
reg.clear:
- name: myregister | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/reg.py#L136-L154 | null | # -*- coding: utf-8 -*-
'''
Used to manage the thorium register. The thorium register is where compound
values are stored and computed, such as averages etc.
'''
# import python libs
from __future__ import absolute_import, division, print_function, unicode_literals
import salt.utils.stringutils
__func_alias__ = {
... |
saltstack/salt | salt/thorium/reg.py | delete | python | def delete(name):
'''
Delete the namespace from the register
USAGE:
.. code-block:: yaml
deletens:
reg.delete:
- name: myregister
'''
ret = {'name': name,
'changes': {},
'comment': '',
'result': True}
if name in __reg__:
... | Delete the namespace from the register
USAGE:
.. code-block:: yaml
deletens:
reg.delete:
- name: myregister | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/reg.py#L157-L175 | null | # -*- coding: utf-8 -*-
'''
Used to manage the thorium register. The thorium register is where compound
values are stored and computed, such as averages etc.
'''
# import python libs
from __future__ import absolute_import, division, print_function, unicode_literals
import salt.utils.stringutils
__func_alias__ = {
... |
saltstack/salt | salt/states/etcd_mod.py | set_ | python | def set_(name, value, profile=None, **kwargs):
'''
Set a key in etcd
name
The etcd key name, for example: ``/foo/bar/baz``.
value
The value the key should contain.
profile
Optional, defaults to ``None``. Sets the etcd profile to use which has
been defined in the Sal... | Set a key in etcd
name
The etcd key name, for example: ``/foo/bar/baz``.
value
The value the key should contain.
profile
Optional, defaults to ``None``. Sets the etcd profile to use which has
been defined in the Salt Master config.
.. code-block:: yaml
... | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/etcd_mod.py#L147-L192 | null | # -*- coding: utf-8 -*-
'''
Manage etcd Keys
================
.. versionadded:: 2015.8.0
:depends: - python-etcd
This state module supports setting and removing keys from etcd.
Configuration
-------------
To work with an etcd server you must configure an etcd profile. The etcd config
can be set in either the Sal... |
saltstack/salt | salt/states/etcd_mod.py | directory | python | def directory(name, profile=None, **kwargs):
'''
Create a directory in etcd.
name
The etcd directory name, for example: ``/foo/bar/baz``.
profile
Optional, defaults to ``None``. Sets the etcd profile to use which has
been defined in the Salt Master config.
.. code-block... | Create a directory in etcd.
name
The etcd directory name, for example: ``/foo/bar/baz``.
profile
Optional, defaults to ``None``. Sets the etcd profile to use which has
been defined in the Salt Master config.
.. code-block:: yaml
my_etd_config:
etcd.ho... | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/etcd_mod.py#L224-L263 | null | # -*- coding: utf-8 -*-
'''
Manage etcd Keys
================
.. versionadded:: 2015.8.0
:depends: - python-etcd
This state module supports setting and removing keys from etcd.
Configuration
-------------
To work with an etcd server you must configure an etcd profile. The etcd config
can be set in either the Sal... |
saltstack/salt | salt/states/etcd_mod.py | rm | python | def rm(name, recurse=False, profile=None, **kwargs):
'''
Deletes a key from etcd
name
The etcd key name to remove, for example ``/foo/bar/baz``.
recurse
Optional, defaults to ``False``. If ``True`` performs a recursive delete.
profile
Optional, defaults to ``None``. Sets t... | Deletes a key from etcd
name
The etcd key name to remove, for example ``/foo/bar/baz``.
recurse
Optional, defaults to ``False``. If ``True`` performs a recursive delete.
profile
Optional, defaults to ``None``. Sets the etcd profile to use which has
been defined in the Salt... | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/etcd_mod.py#L266-L305 | null | # -*- coding: utf-8 -*-
'''
Manage etcd Keys
================
.. versionadded:: 2015.8.0
:depends: - python-etcd
This state module supports setting and removing keys from etcd.
Configuration
-------------
To work with an etcd server you must configure an etcd profile. The etcd config
can be set in either the Sal... |
saltstack/salt | salt/states/etcd_mod.py | mod_watch | python | def mod_watch(name, **kwargs):
'''
The etcd watcher, called to invoke the watch command.
When called, execute a etcd function based on a watch call requisite.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called ... | The etcd watcher, called to invoke the watch command.
When called, execute a etcd function based on a watch call requisite.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this func... | train | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/etcd_mod.py#L337-L368 | [
"def rm(name, recurse=False, profile=None, **kwargs):\n '''\n Deletes a key from etcd\n\n name\n The etcd key name to remove, for example ``/foo/bar/baz``.\n\n recurse\n Optional, defaults to ``False``. If ``True`` performs a recursive delete.\n\n profile\n Optional, defaults to ... | # -*- coding: utf-8 -*-
'''
Manage etcd Keys
================
.. versionadded:: 2015.8.0
:depends: - python-etcd
This state module supports setting and removing keys from etcd.
Configuration
-------------
To work with an etcd server you must configure an etcd profile. The etcd config
can be set in either the Sal... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.