MCPcopy Index your code
hub / github.com/aws/aws-cli / unpack_argument

Function unpack_argument

awscli/argprocess.py:65–89  ·  view source on GitHub ↗

Unpack an argument's value from the commandline. This is part one of a two step process in handling commandline arguments. Emits the load-cli-arg event with service, operation, and parameter names. Example:: load-cli-arg.ec2.describe-instances.foo

(
    session, service_name, operation_name, cli_argument, value
)

Source from the content-addressed store, hash-verified

63
64
65def unpack_argument(
66 session, service_name, operation_name, cli_argument, value
67):
68 """
69 Unpack an argument's value from the commandline. This is part one of a two
70 step process in handling commandline arguments. Emits the load-cli-arg
71 event with service, operation, and parameter names. Example::
72
73 load-cli-arg.ec2.describe-instances.foo
74
75 """
76 param_name = getattr(cli_argument, 'name', 'anonymous')
77
78 value_override = session.emit_first_non_none_response(
79 'load-cli-arg.%s.%s.%s' % (service_name, operation_name, param_name),
80 param=cli_argument,
81 value=value,
82 service_name=service_name,
83 operation_name=operation_name,
84 )
85
86 if value_override is not None:
87 value = value_override
88
89 return value
90
91
92def detect_shape_structure(param):

Callers 2

_unpack_argMethod · 0.90
__call__Method · 0.90

Calls 1

Tested by

no test coverage detected