Skip to content

Commit

Permalink
Add to the RequestParamsMapper docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleknap committed Nov 18, 2015
1 parent 6f1460b commit c73f44a
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion awscli/customizations/s3/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,28 @@ class RequestParamsMapper(object):
Each method in the class maps to a particular operation and will set
the request parameters depending on the operation and CLI parameters
provided.
provided. For each of the class's methods the parameters are as follows:
:type request_params: dict
:param request_params: A dictionary to be filled out with the appropriate
parameters for the specified client operation using the current CLI
parameters
:type cli_params: dict
:param cli_params: A dictionary of the current CLI params that will be
used to generate the request parameters for the specified operation
For example, take the mapping of request parameters for PutObject::
>>> cli_request_params = {'sse': 'AES256', 'storage_class': 'GLACIER'}
>>> request_params = {}
>>> RequestParamsMapper.map_put_object_params(
request_params, cli_request_params)
>>> print(request_params)
{'StorageClass': 'GLACIER', 'ServerSideEncryption': 'AES256'}
Note that existing parameters in ``request_params`` will be overriden if
a parameter in ``cli_params`` maps to the existing parameter.
"""
@classmethod
def map_put_object_params(cls, request_params, cli_params):
Expand Down

0 comments on commit c73f44a

Please sign in to comment.