o .&a@s`ddlmZddlmZddlmZddlZddZddZGd d d eZ Gd d d eZ dS) ) BasicCommand)!create_client_from_parsed_globals) b64decodeNcCs|dtdS)Nzbuilding-command-table.ecr)register_inject_commands)clir;/usr/lib/python3/dist-packages/awscli/customizations/ecr.pyregister_ecr_commandssr cKst||d<t||d<dS)N get-loginget-login-password)ECRLoginECRGetLoginPassword) command_tablesessionkwargsrrr rs rc @sZeZdZdZdZedZdddddd d d d d dd ddddd d d ddgZddZ dS)r zLog in with 'docker login'r zecr/get-login_description.rstz registry-idszbA list of AWS account IDs that correspond to the Amazon ECR registries that you want to log in to.F+)name help_textrequirednargsz include-email store_true include_emailTaESpecify if the '-e' flag should be included in the 'docker login' command. The '-e' option has been deprecated and is removed in Docker version 17.06 and later. You must specify --no-include-email if you're using Docker version 17.06 or later. The default behavior is to include the '-e' flag in the 'docker login' output.)raction group_namedestdefaultrrzno-include-emailzInclude email arg store_false)rrrrrrrc Cst|jd|}|js|}n|j|jd}|dD]9}t|d}|d\}}ddd|d |g} |jr=| d d g| |d t j d | t j dqdS)Necr) registryIdsauthorizationDataauthorizationToken:dockerloginz-uz-pz-enone proxyEndpoint  r)r_session registry_idsget_authorization_tokenrdecodesplitrextendappendsysstdoutwritejoin) self parsed_argsparsed_globals ecr_clientresultauth auth_tokenusernamepasswordcommandrrr _run_mainEs$  zECRLogin._run_mainN) __name__ __module__ __qualname____doc__NAMEr FROM_FILE DESCRIPTION ARG_TABLEr>rrrr r s6  "r c@s&eZdZdZdZedZddZdS)rz?Get a password to be used with container clients such as Dockerr z&ecr/get-login-password_description.rstc Cs\t|jd|}|}|dd}t|d}|d\}}tj|tjddS)Nrr rr!r"r() rr)r+rr,r-r0r1r2) r4r5r6r7r8r9r:_r<rrr r>`s   zECRGetLoginPassword._run_mainN) r?r@rArBrCrrDrEr>rrrr rYs r) awscli.customizations.commandsrawscli.customizations.utilsrbase64rr0r rr rrrrr s  <