Code stringlengths 103 85.9k | Summary listlengths 0 94 |
|---|---|
Please provide a description of the function:def _add_volume(line):
'''
Analyse the line of volumes of ``drbdadm status``
'''
section = _analyse_status_type(line)
fields = line.strip().split()
volume = {}
for field in fields:
volume[field.split(':')[0]] = field.split(':')[1]
if... | [] |
Please provide a description of the function:def _add_peernode(line):
'''
Analyse the line of peer nodes of ``drbdadm status``
'''
global lastpnodevolumes
fields = line.strip().split()
peernode = {}
peernode["peernode name"] = fields[0]
#Could be role or connection:
peernode[fields... | [] |
Please provide a description of the function:def _line_parser(line):
'''
Call action for different lines
'''
section = _analyse_status_type(line)
fields = line.strip().split()
switch = {
'': _empty,
'RESOURCE': _add_res,
'PEERNODE': _add_peernode,
'LOCALDISK': _a... | [] |
Please provide a description of the function:def overview():
'''
Show status of the DRBD devices, support two nodes only.
drbd-overview is removed since drbd-utils-9.6.0,
use status instead.
CLI Example:
.. code-block:: bash
salt '*' drbd.overview
'''
cmd = 'drbd-overview'
... | [] |
Please provide a description of the function:def status(name='all'):
'''
Using drbdadm to show status of the DRBD devices,
available in the latest drbd9.
Support multiple nodes, multiple volumes.
:type name: str
:param name:
Resource name.
:return: drbd status of resource.
:rty... | [] |
Please provide a description of the function:def _parse_return_code_powershell(string):
'''
return from the input string the return code of the powershell command
'''
regex = re.search(r'ReturnValue\s*: (\d*)', string)
if not regex:
return (False, 'Could not parse PowerShell return code.')
... | [] |
Please provide a description of the function:def _psrdp(cmd):
'''
Create a Win32_TerminalServiceSetting WMI Object as $RDP and execute the
command cmd returns the STDOUT of the command
'''
rdp = ('$RDP = Get-WmiObject -Class Win32_TerminalServiceSetting '
'-Namespace root\\CIMV2\\Terminal... | [] |
Please provide a description of the function:def list_sessions(logged_in_users_only=False):
'''
List information about the sessions.
.. versionadded:: 2016.11.0
:param logged_in_users_only: If True, only return sessions with users logged in.
:return: A list containing dictionaries of session infor... | [] |
Please provide a description of the function:def get_session(session_id):
'''
Get information about a session.
.. versionadded:: 2016.11.0
:param session_id: The numeric Id of the session.
:return: A dictionary of session information.
CLI Example:
.. code-block:: bash
salt '*' r... | [] |
Please provide a description of the function:def disconnect_session(session_id):
'''
Disconnect a session.
.. versionadded:: 2016.11.0
:param session_id: The numeric Id of the session.
:return: A boolean representing whether the disconnect succeeded.
CLI Example:
.. code-block:: bash
... | [] |
Please provide a description of the function:def logoff_session(session_id):
'''
Initiate the logoff of a session.
.. versionadded:: 2016.11.0
:param session_id: The numeric Id of the session.
:return: A boolean representing whether the logoff succeeded.
CLI Example:
.. code-block:: bash... | [] |
Please provide a description of the function:def envs(backend=None, sources=False):
'''
Return the available fileserver environments. If no backend is provided,
then the environments for all configured backends will be returned.
backend
Narrow fileserver backends to a subset of the enabled ones... | [] |
Please provide a description of the function:def clear_file_list_cache(saltenv=None, backend=None):
'''
.. versionadded:: 2016.11.0
The Salt fileserver caches the files/directories/symlinks for each
fileserver backend and environment as they are requested. This is done to
help the fileserver scale ... | [] |
Please provide a description of the function:def file_list(saltenv='base', backend=None):
'''
Return a list of files from the salt fileserver
saltenv : base
The salt fileserver environment to be listed
backend
Narrow fileserver backends to a subset of the enabled ones. If all
p... | [] |
Please provide a description of the function:def symlink_list(saltenv='base', backend=None):
'''
Return a list of symlinked files and dirs
saltenv : base
The salt fileserver environment to be listed
backend
Narrow fileserver backends to a subset of the enabled ones. If all
pass... | [] |
Please provide a description of the function:def dir_list(saltenv='base', backend=None):
'''
Return a list of directories in the given environment
saltenv : base
The salt fileserver environment to be listed
backend
Narrow fileserver backends to a subset of the enabled ones. If all
... | [] |
Please provide a description of the function:def empty_dir_list(saltenv='base', backend=None):
'''
.. versionadded:: 2015.5.0
Return a list of empty directories in the given environment
saltenv : base
The salt fileserver environment to be listed
backend
Narrow fileserver backends ... | [] |
Please provide a description of the function:def update(backend=None):
'''
Update the fileserver cache. If no backend is provided, then the cache for
all configured backends will be updated.
backend
Narrow fileserver backends to a subset of the enabled ones.
.. versionchanged:: 2015.5.... | [] |
Please provide a description of the function:def clear_cache(backend=None):
'''
.. versionadded:: 2015.5.0
Clear the fileserver cache from VCS fileserver backends (:mod:`git
<salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn
<salt.fileserver.svnfs>`). Executing this runner with n... | [] |
Please provide a description of the function:def clear_lock(backend=None, remote=None):
'''
.. versionadded:: 2015.5.0
Clear the fileserver update lock from VCS fileserver backends (:mod:`git
<salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn
<salt.fileserver.svnfs>`). This shoul... | [] |
Please provide a description of the function:def lock(backend=None, remote=None):
'''
.. versionadded:: 2015.5.0
Set a fileserver update lock for VCS fileserver backends (:mod:`git
<salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn
<salt.fileserver.svnfs>`).
.. note::
... | [] |
Please provide a description of the function:def run(self):
'''
Run the logic for saltkey
'''
self._update_opts()
cmd = self.opts['fun']
veri = None
ret = None
try:
if cmd in ('accept', 'reject', 'delete'):
ret = self._run_cmd(... | [] |
Please provide a description of the function:def gen_keys(self, keydir=None, keyname=None, keysize=None, user=None):
'''
Generate minion RSA public keypair
'''
keydir, keyname, keysize, user = self._get_key_attrs(keydir, keyname,
... | [] |
Please provide a description of the function:def gen_signature(self, privkey, pubkey, sig_path):
'''
Generate master public-key-signature
'''
return salt.crypt.gen_signature(privkey,
pubkey,
sig_path,
... | [] |
Please provide a description of the function:def gen_keys_signature(self, priv, pub, signature_path, auto_create=False, keysize=None):
'''
Generate master public-key-signature
'''
# check given pub-key
if pub:
if not os.path.isfile(pub):
return 'Public... | [] |
Please provide a description of the function:def check_minion_cache(self, preserve_minions=None):
'''
Check the minion cache to make sure that old minion data is cleared
Optionally, pass in a list of minions which should have their caches
preserved. To preserve all caches, set __opts__[... | [] |
Please provide a description of the function:def check_master(self):
'''
Log if the master is not running
:rtype: bool
:return: Whether or not the master is running
'''
if not os.path.exists(
os.path.join(
self.opts['sock_dir'],
... | [] |
Please provide a description of the function:def name_match(self, match, full=False):
'''
Accept a glob which to match the of a key and return the key's location
'''
if full:
matches = self.all_keys()
else:
matches = self.list_keys()
ret = {}
... | [] |
Please provide a description of the function:def dict_match(self, match_dict):
'''
Accept a dictionary of keys and return the current state of the
specified keys
'''
ret = {}
cur_keys = self.list_keys()
for status, keys in six.iteritems(match_dict):
fo... | [] |
Please provide a description of the function:def local_keys(self):
'''
Return a dict of local keys
'''
ret = {'local': []}
for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(self.opts['pki_dir'])):
if fn_.endswith('.pub') or fn_.endswith('.pem'):
... | [] |
Please provide a description of the function:def list_keys(self):
'''
Return a dict of managed keys and what the key status are
'''
key_dirs = self._check_minions_directories()
ret = {}
for dir_ in key_dirs:
if dir_ is None:
continue
... | [] |
Please provide a description of the function:def all_keys(self):
'''
Merge managed keys with local keys
'''
keys = self.list_keys()
keys.update(self.local_keys())
return keys | [] |
Please provide a description of the function:def list_status(self, match):
'''
Return a dict of managed keys under a named status
'''
acc, pre, rej, den = self._check_minions_directories()
ret = {}
if match.startswith('acc'):
ret[os.path.basename(acc)] = []
... | [] |
Please provide a description of the function:def key_str(self, match):
'''
Return the specified public key or keys based on a glob
'''
ret = {}
for status, keys in six.iteritems(self.name_match(match)):
ret[status] = {}
for key in salt.utils.data.sorted_ig... | [] |
Please provide a description of the function:def accept(self, match=None, match_dict=None, include_rejected=False, include_denied=False):
'''
Accept public keys. If "match" is passed, it is evaluated as a glob.
Pre-gathered matches can also be passed via "match_dict".
'''
if matc... | [] |
Please provide a description of the function:def accept_all(self):
'''
Accept all keys in pre
'''
keys = self.list_keys()
for key in keys[self.PEND]:
try:
shutil.move(
os.path.join(
self.opts['pki_dir... | [] |
Please provide a description of the function:def delete_key(self,
match=None,
match_dict=None,
preserve_minions=None,
revoke_auth=False):
'''
Delete public keys. If "match" is passed, it is evaluated as a glob.
Pre-g... | [] |
Please provide a description of the function:def delete_all(self):
'''
Delete all keys
'''
for status, keys in six.iteritems(self.list_keys()):
for key in keys:
try:
os.remove(os.path.join(self.opts['pki_dir'], status, key))
... | [] |
Please provide a description of the function:def reject_all(self):
'''
Reject all keys in pre
'''
keys = self.list_keys()
for key in keys[self.PEND]:
try:
shutil.move(
os.path.join(
self.opts['pki_dir... | [] |
Please provide a description of the function:def finger(self, match, hash_type=None):
'''
Return the fingerprint for a specified key
'''
if hash_type is None:
hash_type = __opts__['hash_type']
matches = self.name_match(match, True)
ret = {}
for status... | [] |
Please provide a description of the function:def finger_all(self, hash_type=None):
'''
Return fingerprints for all keys
'''
if hash_type is None:
hash_type = __opts__['hash_type']
ret = {}
for status, keys in six.iteritems(self.all_keys()):
ret[st... | [] |
Please provide a description of the function:def __catalina_home():
'''
Tomcat paths differ depending on packaging
'''
locations = ['/usr/share/tomcat*', '/opt/tomcat']
for location in locations:
folders = glob.glob(location)
if folders:
for catalina_home in folders:
... | [] |
Please provide a description of the function:def _get_credentials():
'''
Get the username and password from opts, grains, or pillar
'''
ret = {
'user': False,
'passwd': False
}
# Loop through opts, grains, and pillar
# Return the first acceptable configuration found
for ... | [] |
Please provide a description of the function:def _auth(uri):
'''
returns a authentication handler.
Get user & password from grains, if are not set default to
modules.config.option
If user & pass are missing return False
'''
user, password = _get_credentials()
if user is False or passwo... | [] |
Please provide a description of the function:def extract_war_version(war):
'''
Extract the version from the war file name. There does not seem to be a
standard for encoding the version into the `war file name`_
.. _`war file name`: https://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html
Examp... | [] |
Please provide a description of the function:def _wget(cmd, opts=None, url='http://localhost:8080/manager', timeout=180):
'''
A private function used to issue the command to tomcat via the manager
webapp
cmd
the command to execute
url
The URL of the server manager webapp (example:
... | [] |
Please provide a description of the function:def _simple_cmd(cmd, app, url='http://localhost:8080/manager', timeout=180):
'''
Simple command wrapper to commands that need only a path option
'''
try:
opts = {
'path': app,
'version': ls(url)[app]['version']
}
... | [] |
Please provide a description of the function:def ls(url='http://localhost:8080/manager', timeout=180):
'''
list all the deployed webapps
url : http://localhost:8080/manager
the URL of the server manager webapp
timeout : 180
timeout for HTTP request
CLI Examples:
.. code-block:... | [] |
Please provide a description of the function:def status_webapp(app, url='http://localhost:8080/manager', timeout=180):
'''
return the status of the webapp (stopped | running | missing)
app
the webapp context path
url : http://localhost:8080/manager
the URL of the server manager webapp
... | [] |
Please provide a description of the function:def serverinfo(url='http://localhost:8080/manager', timeout=180):
'''
return details about the server
url : http://localhost:8080/manager
the URL of the server manager webapp
timeout : 180
timeout for HTTP request
CLI Examples:
.. c... | [] |
Please provide a description of the function:def deploy_war(war,
context,
force='no',
url='http://localhost:8080/manager',
saltenv='base',
timeout=180,
temp_war_location=None,
version=True):
'''
Deploy a WAR... | [] |
Please provide a description of the function:def passwd(passwd,
user='',
alg='sha1',
realm=None):
'''
This function replaces the $CATALINA_HOME/bin/digest.sh script
convert a clear-text password to the $CATALINA_BASE/conf/tomcat-users.xml
format
CLI Examples:
.... | [] |
Please provide a description of the function:def version():
'''
Return server version from catalina.sh version
CLI Example:
.. code-block:: bash
salt '*' tomcat.version
'''
cmd = __catalina_home() + '/bin/catalina.sh version'
out = __salt__['cmd.run'](cmd).splitlines()
for lin... | [] |
Please provide a description of the function:def fullversion():
'''
Return all server information from catalina.sh version
CLI Example:
.. code-block:: bash
salt '*' tomcat.fullversion
'''
cmd = __catalina_home() + '/bin/catalina.sh version'
ret = {}
out = __salt__['cmd.run'](... | [] |
Please provide a description of the function:def signal(signal=None):
'''
Signals catalina to start, stop, securestart, forcestop.
CLI Example:
.. code-block:: bash
salt '*' tomcat.signal start
'''
valid_signals = {'forcestop': 'stop -force',
'securestart': 'start... | [] |
Please provide a description of the function:def _get_options(ret=None):
'''
Get the appoptics options from salt.
'''
attrs = {
'api_token': 'api_token',
'api_url': 'api_url',
'tags': 'tags',
'sls_states': 'sls_states'
}
_options = salt.returners.get_returner_opt... | [] |
Please provide a description of the function:def _get_appoptics(options):
'''
Return an appoptics connection object.
'''
conn = appoptics_metrics.connect(
options.get('api_token'),
sanitizer=appoptics_metrics.sanitize_metric_name,
hostname=options.get('api_url'))
log.info("Co... | [] |
Please provide a description of the function:def returner(ret):
'''
Parse the return data and return metrics to AppOptics.
For each state that's provided in the configuration, return tagged metrics for
the result of that state if it's present.
'''
options = _get_options(ret)
states_to_repo... | [] |
Please provide a description of the function:def present(host, service_root, trigger_desc, service_name=None, **kwargs):
'''
.. versionadded:: Fluorine
Ensure service exists under service root.
:param host: Technical name of the host
:param service_root: Path of service (path is split by /)
:p... | [] |
Please provide a description of the function:def absent(host, service_root, service_name=None, **kwargs):
'''
.. versionadded:: Fluorine
Ensure service does not exists under service root.
:param host: Technical name of the host
:param service_root: Path of service (path is split /)
:param servi... | [] |
Please provide a description of the function:def filetree(collector, *paths):
'''
Add all files in the tree. If the "path" is a file,
only that file will be added.
:param path: File or directory
:return:
'''
_paths = []
# Unglob
for path in paths:
_paths += glob.glob(path)
... | [] |
Please provide a description of the function:def _get_powercfg_minute_values(scheme, guid, subguid, safe_name):
'''
Returns the AC/DC values in an dict for a guid and subguid for a the given
scheme
'''
if scheme is None:
scheme = _get_current_scheme()
if __grains__['osrelease'] == '7':
... | [] |
Please provide a description of the function:def _set_powercfg_value(scheme, sub_group, setting_guid, power, value):
'''
Sets the AC/DC values of a setting with the given power for the given scheme
'''
if scheme is None:
scheme = _get_current_scheme()
cmd = 'powercfg /set{0}valueindex {1} {... | [] |
Please provide a description of the function:def set_monitor_timeout(timeout, power='ac', scheme=None):
'''
Set the monitor timeout in minutes for the given power scheme
Args:
timeout (int):
The amount of time in minutes before the monitor will timeout
power (str):
... | [] |
Please provide a description of the function:def set_disk_timeout(timeout, power='ac', scheme=None):
'''
Set the disk timeout in minutes for the given power scheme
Args:
timeout (int):
The amount of time in minutes before the disk will timeout
power (str):
Set the v... | [] |
Please provide a description of the function:def set_standby_timeout(timeout, power='ac', scheme=None):
'''
Set the standby timeout in minutes for the given power scheme
Args:
timeout (int):
The amount of time in minutes before the computer sleeps
power (str):
Set t... | [] |
Please provide a description of the function:def set_hibernate_timeout(timeout, power='ac', scheme=None):
'''
Set the hibernate timeout in minutes for the given power scheme
Args:
timeout (int):
The amount of time in minutes before the computer hibernates
power (str):
... | [] |
Please provide a description of the function:def present(profile='pagerduty', subdomain=None, api_key=None, **kwargs):
'''
Ensure that a pagerduty schedule exists.
This method accepts as args everything defined in
https://developer.pagerduty.com/documentation/rest/schedules/create.
This means that m... | [] |
Please provide a description of the function:def _diff(state_data, resource_object):
'''helper method to compare salt state info with the PagerDuty API json structure,
and determine if we need to update.
returns the dict to pass to the PD API to perform the update, or empty dict if no update.
'''
... | [] |
Please provide a description of the function:def _cron_id(cron):
'''SAFETYBELT, Only set if we really have an identifier'''
cid = None
if cron['identifier']:
cid = cron['identifier']
else:
cid = SALT_CRON_NO_IDENTIFIER
if cid:
return _ensure_string(cid) | [] |
Please provide a description of the function:def _cron_matched(cron, cmd, identifier=None):
'''Check if:
- we find a cron with same cmd, old state behavior
- but also be smart enough to remove states changed crons where we do
not removed priorly by a cron.absent by matching on the provided
... | [] |
Please provide a description of the function:def _render_tab(lst):
'''
Takes a tab list structure and renders it to a list for applying it to
a file
'''
ret = []
for pre in lst['pre']:
ret.append('{0}\n'.format(pre))
if ret:
if ret[-1] != TAG:
ret.append(TAG)
... | [] |
Please provide a description of the function:def _get_cron_cmdstr(path, user=None):
'''
Returns a format string, to be used to build a crontab command.
'''
if user:
cmd = 'crontab -u {0}'.format(user)
else:
cmd = 'crontab'
return '{0} {1}'.format(cmd, path) | [] |
Please provide a description of the function:def write_cron_file(user, path):
'''
Writes the contents of a file to a user's crontab
CLI Example:
.. code-block:: bash
salt '*' cron.write_cron_file root /tmp/new_cron
.. versionchanged:: 2015.8.9
.. note::
Some OS' do not supp... | [] |
Please provide a description of the function:def _write_cron_lines(user, lines):
'''
Takes a list of lines to be committed to a user's crontab and writes it
'''
lines = [salt.utils.stringutils.to_str(_l) for _l in lines]
path = salt.utils.files.mkstemp()
if _check_instance_uid_match(user) or __g... | [] |
Please provide a description of the function:def _date_time_match(cron, **kwargs):
'''
Returns true if the minute, hour, etc. params match their counterparts from
the dict returned from list_tab().
'''
return all([kwargs.get(x) is None or cron[x] == six.text_type(kwargs[x])
or (six.t... | [] |
Please provide a description of the function:def raw_cron(user):
'''
Return the contents of the user's crontab
CLI Example:
.. code-block:: bash
salt '*' cron.raw_cron root
'''
if _check_instance_uid_match(user) or __grains__.get('os_family') in ('Solaris', 'AIX'):
cmd = 'cron... | [] |
Please provide a description of the function:def list_tab(user):
'''
Return the contents of the specified user's crontab
CLI Example:
.. code-block:: bash
salt '*' cron.list_tab root
'''
data = raw_cron(user)
ret = {'pre': [],
'crons': [],
'special': [],
... | [] |
Please provide a description of the function:def get_entry(user, identifier=None, cmd=None):
'''
Return the specified entry from user's crontab.
identifier will be used if specified, otherwise will lookup cmd
Either identifier or cmd should be specified.
user:
User's crontab to query
i... | [] |
Please provide a description of the function:def set_special(user,
special,
cmd,
commented=False,
comment=None,
identifier=None):
'''
Set up a special command in the crontab.
CLI Example:
.. code-block:: bash
salt... | [] |
Please provide a description of the function:def _get_cron_date_time(**kwargs):
'''
Returns a dict of date/time values to be used in a cron entry
'''
# Define ranges (except daymonth, as it depends on the month)
range_max = {
'minute': list(list(range(60))),
'hour': list(list(range(2... | [] |
Please provide a description of the function:def set_job(user,
minute,
hour,
daymonth,
month,
dayweek,
cmd,
commented=False,
comment=None,
identifier=None):
'''
Sets a cron job up for a specified user.
... | [] |
Please provide a description of the function:def rm_special(user, cmd, special=None, identifier=None):
'''
Remove a special cron job for a specified user.
CLI Example:
.. code-block:: bash
salt '*' cron.rm_special root /usr/bin/foo
'''
lst = list_tab(user)
ret = 'absent'
rm_ =... | [] |
Please provide a description of the function:def rm_job(user,
cmd,
minute=None,
hour=None,
daymonth=None,
month=None,
dayweek=None,
identifier=None):
'''
Remove a cron job for a specified user. If any of the day/time params are
spe... | [] |
Please provide a description of the function:def set_env(user, name, value=None):
'''
Set up an environment variable in the crontab.
CLI Example:
.. code-block:: bash
salt '*' cron.set_env root MAILTO user@example.com
'''
lst = list_tab(user)
for env in lst['env']:
if name... | [] |
Please provide a description of the function:def rm_env(user, name):
'''
Remove cron environment variable for a specified user.
CLI Example:
.. code-block:: bash
salt '*' cron.rm_env root MAILTO
'''
lst = list_tab(user)
ret = 'absent'
rm_ = None
for ind in range(len(lst['e... | [] |
Please provide a description of the function:def exists(Bucket,
region=None, key=None, keyid=None, profile=None):
'''
Given a bucket name, check to see if the given bucket exists.
Returns True if the given bucket exists and returns False if the given
bucket does not exist.
CLI Example:
... | [] |
Please provide a description of the function:def create(Bucket,
ACL=None, LocationConstraint=None,
GrantFullControl=None,
GrantRead=None,
GrantReadACP=None,
GrantWrite=None,
GrantWriteACP=None,
region=None, key=None, keyid=None, profile=None):... | [] |
Please provide a description of the function:def delete(Bucket, MFA=None, RequestPayer=None, Force=False,
region=None, key=None, keyid=None, profile=None):
'''
Given a bucket name, delete it, optionally emptying it first.
Returns {deleted: true} if the bucket was deleted and returns
{deleted... | [] |
Please provide a description of the function:def delete_objects(Bucket, Delete, MFA=None, RequestPayer=None,
region=None, key=None, keyid=None, profile=None):
'''
Delete objects in a given S3 bucket.
Returns {deleted: true} if all objects were deleted
and {deleted: false, failed: [ke... | [] |
Please provide a description of the function:def describe(Bucket,
region=None, key=None, keyid=None, profile=None):
'''
Given a bucket name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_s3_bucket... | [] |
Please provide a description of the function:def empty(Bucket, MFA=None, RequestPayer=None, region=None, key=None,
keyid=None, profile=None):
'''
Delete all objects in a given S3 bucket.
Returns {deleted: true} if all objects were deleted
and {deleted: false, failed: [key, ...]} otherwise
... | [] |
Please provide a description of the function:def list(region=None, key=None, keyid=None, profile=None):
'''
List all buckets owned by the authenticated sender of the request.
Returns list of buckets
CLI Example:
.. code-block:: yaml
Owner: {...}
Buckets:
- {...}
... | [] |
Please provide a description of the function:def list_object_versions(Bucket, Delimiter=None, EncodingType=None, Prefix=None,
region=None, key=None, keyid=None, profile=None):
'''
List objects in a given S3 bucket.
Returns a list of objects.
CLI Example:
.. code-block:: bash
... | [] |
Please provide a description of the function:def list_objects(Bucket, Delimiter=None, EncodingType=None, Prefix=None,
FetchOwner=False, StartAfter=None, region=None, key=None,
keyid=None, profile=None):
'''
List objects in a given S3 bucket.
Returns a list of objects.
... | [] |
Please provide a description of the function:def put_acl(Bucket,
ACL=None,
AccessControlPolicy=None,
GrantFullControl=None,
GrantRead=None,
GrantReadACP=None,
GrantWrite=None,
GrantWriteACP=None,
region=None, key=None, keyid=None, p... | [] |
Please provide a description of the function:def put_cors(Bucket,
CORSRules,
region=None, key=None, keyid=None, profile=None):
'''
Given a valid config, update the CORS rules for a bucket.
Returns {updated: true} if CORS was updated and returns
{updated: False} if CORS was not upd... | [] |
Please provide a description of the function:def put_lifecycle_configuration(Bucket,
Rules,
region=None, key=None, keyid=None, profile=None):
'''
Given a valid config, update the Lifecycle rules for a bucket.
Returns {updated: true} if Lifecycle was updated and returns
{updated: F... | [] |
Please provide a description of the function:def put_logging(Bucket,
TargetBucket=None, TargetPrefix=None, TargetGrants=None,
region=None, key=None, keyid=None, profile=None):
'''
Given a valid config, update the logging parameters for a bucket.
Returns {updated: true} if parameters w... | [] |
Please provide a description of the function:def put_notification_configuration(Bucket,
TopicConfigurations=None, QueueConfigurations=None,
LambdaFunctionConfigurations=None,
region=None, key=None, keyid=None, profile=None):
'''
Given a valid config, update the notification para... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.