o
    .&ßa³
  ã                   @   s$   d dl mZ d dl mZ dd„ ZdS )é    )Ú	constants)Ú
exceptionsc                 C   sø   g }| D ]u}i }|  ¡ }d|v r|d |d< n|d |d< |d |d< d|v r-|d |d< d|v r7|d |d< d|v rPd|v rJ|d D ]}|  ¡ }qC|d |d< d|v rt|d }i |d< d|v rh|d |d d< d|v rt|d |d d< | |¡ q|S )	z™
    Helper method that converts --instance-fleets option value in
    create-cluster to Amazon Elastic MapReduce InstanceFleetConfig
    data type.
    ÚNameÚInstanceFleetTypeÚTargetOnDemandCapacityÚTargetSpotCapacityÚInstanceTypeConfigsÚLaunchSpecificationsÚSpotSpecificationÚOnDemandSpecification)ÚkeysÚappend)Úparsed_instance_fleetsÚinstance_fleetsÚinstance_fleetÚinstance_fleet_configr   Úinstance_type_configÚinstance_type_config_keysÚ'instanceFleetProvisioningSpecifications© r   úO/usr/lib/python3/dist-packages/awscli/customizations/emr/instancefleetsutils.pyÚ"validate_and_build_instance_fleets   s8   

ÿ
ÿr   N)Úawscli.customizations.emrr   r   r   r   r   r   r   Ú<module>   s   