HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/awscli/customizations/__pycache__/putmetricdata.cpython-38.pyc
U

<�^�@s\dZddlZddlmZddlmZddlmZdd�Zdd	�Z	d
d�Z
Gdd
�d
e�ZdS)z�
This customization adds the following scalar parameters to the
cloudwatch put-metric-data operation:

* --metric-name
* --dimensions
* --timestamp
* --value
* --statistic-values
* --unit
* --storage-resolution

�N)�CustomArgument)�split_on_commas)�#validate_mutually_exclusive_handlercCs0|�dt�|�dtdgdddddd	g��dS)
Nz2building-argument-table.cloudwatch.put-metric-dataz0operation-args-parsed.cloudwatch.put-metric-data�metric_dataZmetric_name�	timestamp�unit�value�
dimensionsZstatistic_values)�register�
_promote_argsr)Z
event_handler�r�E/usr/lib/python3/dist-packages/awscli/customizations/putmetricdata.py�register_put_metric_data!s����rcKs�d|d_tddd�|d<tddd�|d<tdd	d�|d<td
dd�|d
<tdd
d�|d<tddd�|d<|jjdj}|jd}td|jd�|d<dS)NFzmetric-datazmetric-namezThe name of the metric.)Z	help_textrzyThe time stamp used for the metric.  If not specified, the default value is set to the time the metric data was received.rzThe unit of metric.ra=The value for the metric.  Although the --value parameter accepts numbers of type Double, Amazon CloudWatch truncates values with very large exponents.  Values with base-10 exponents greater than 126 (1 x 10^126) are truncated.  Likewise, values with base-10 exponents less than -130 (1 x 10^-130) are also truncated.r	a�The --dimensions argument further expands on the identity of a metric using a Name=Value pair, separated by commas, for example: <code>--dimensions InstanceID=1-23456789,InstanceType=m1.small</code>. Note that the <code>--dimensions</code> argument has a different format when used in <code>get-metric-data</code>, where for the same example you would use the format <code>--dimensions Name=InstanceID,Value=i-aaba32d4 Name=InstanceType,value=m1.small </code>.zstatistic-valuesz2A set of statistical values describing the metric.�
MetricData�StorageResolutionzstorage-resolution)Zrequired�PutMetricArgumentZinput_shape�members�memberZ
documentation)Zargument_tableZoperation_model�kwargsrZstorage_resolutionrrr
r+s>
�
�
�
�
	�

�

�rcs�fdd�}|S)Ncs��fdd�}|S)Ncs6|dkrdS�|krig|�<|�d}�|||�S)Nrr)�self�
parametersr�
first_element)�func�namerr
�_add_to_params^s
zIinsert_first_element.<locals>._wrap_add_to_params.<locals>._add_to_paramsr)rr�r)rr
�_wrap_add_to_params]sz1insert_first_element.<locals>._wrap_add_to_paramsr)rrrrr
�insert_first_element\src@s�eZdZdd�Zed�dd��Zed�dd��Zed�dd	��Zed�d
d��Zed�dd
��Z	ed�dd��Z
ed�dd��ZdS)rcCs"d|j�dd�}t||�||�S)Nz
_add_param_%s�-�_)r�replace�getattr)rrrZmethod_namerrr
�
add_to_paramsoszPutMetricArgument.add_to_paramsrcCs||d<dS)NZ
MetricNamer�rrrrrr
�_add_param_metric_namessz(PutMetricArgument._add_param_metric_namecCs||d<dS)NZUnitrr#rrr
�_add_param_unitwsz!PutMetricArgument._add_param_unitcCs||d<dS)NZ	Timestamprr#rrr
�_add_param_timestamp{sz&PutMetricArgument._add_param_timestampcCst�|�|d<dS)N�Value)�decimal�Decimalr#rrr
�_add_param_valuesz"PutMetricArgument._add_param_valuecCs<g}t|�D]"}|�d�\}}|�||d��q||d<dS)N�=)�Namer'Z
Dimensions)r�split�append)rrrr	�pair�keyrrr
�_add_param_dimensions�s
z'PutMetricArgument._add_param_dimensionscCs:i}t|�D] }|�d�\}}t�|�||<q||d<dS)Nr+ZStatisticValues)rr-r(r))rrrZ
statisticsr/r0rrr
�_add_param_statistic_values�s
z-PutMetricArgument._add_param_statistic_valuescCst|�|d<dS)Nr)�intr#rrr
�_add_param_storage_resolution�sz/PutMetricArgument._add_param_storage_resolutionN)�__name__�
__module__�__qualname__r"rr$r%r&r*r1r2r4rrrr
rns






r)�__doc__r(Zawscli.argumentsrZawscli.utilsrZawscli.customizations.utilsrrrrrrrrr
�<module>
s

1