MCPcopy Create free account
hub / github.com/aws/aws-cli / add_to_params

Method add_to_params

awscli/arguments.py:457–479  ·  view source on GitHub ↗
(self, parameters, value)

Source from the content-addressed store, hash-verified

455 )
456
457 def add_to_params(self, parameters, value):
458 if value is None:
459 return
460 else:
461 # This is a two step process. First is the process of converting
462 # the command line value into a python value. Normally this is
463 # handled by argparse directly, but there are cases where extra
464 # processing is needed. For example, "--foo name=value" the value
465 # can be converted from "name=value" to {"name": "value"}. This is
466 # referred to as the "unpacking" process. Once we've unpacked the
467 # argument value, we have to decide how this is converted into
468 # something that can be consumed by botocore. Many times this is
469 # just associating the key and value in the params dict as down
470 # below. Sometimes this can be more complicated, and subclasses
471 # can customize as they need.
472 unpacked = self._unpack_argument(value)
473 LOG.debug(
474 'Unpacked value of %r for parameter "%s": %r',
475 value,
476 self.py_name,
477 unpacked,
478 )
479 parameters[self._serialized_name] = unpacked
480
481 def _unpack_argument(self, value):
482 service_name = self._operation_model.service_model.service_name

Calls 1

_unpack_argumentMethod · 0.95