o .&ay@sdZddlmZddlmZddlmZddlmZddlm Z ddZ d d Z d d Z d dZ ddZddZGdddeZdS)aS This customization splits the modify-option-group into two separate commands: * ``add-option-group`` * ``remove-option-group`` In both commands the ``--options-to-remove`` and ``--options-to-add`` args will be renamed to just ``--options``. All the remaining args will be available in both commands (which proxy modify-option-group). )ServiceOperation)CLIOperationCaller)utils) BasicCommand) uni_printcCs(|dt|dt|dtdS)Nbuilding-command-table.rdsz6building-argument-table.rds.add-option-to-option-groupz;building-argument-table.rds.remove-option-from-option-group)register_building_command_table_rename_add_option_rename_remove_optionclir;/usr/lib/python3/dist-packages/awscli/customizations/rds.pyregister_rds_modify_split"s rcCs|dtdS)Nr)r_add_generate_db_auth_tokenr rrr#register_add_generate_db_auth_token*srcKst|}||d<dS)Ngenerate-db-auth-token)GenerateDBAuthTokenCommand) command_tablesessionkwargscommandrrrr.s rcKtj|ddd|d=dS)Noptions-to-includeoptionsnew_nameoptions-to-removerrename_argumentargument_tablerrrrr 3 r cKr)Nrrrrrr!rrrr 9r#r cKsR|d=|d}|d}tddt|||d|d<tdd||t|d|d<dS)Nzmodify-option-grouprdsModifyOptionGroupzadd-option-to-option-group) parent_namenameoperation_callerroperation_modelzremove-option-from-option-group)r&r'rr)r()get_service_modelr)rr)rrr rds_modelmodify_operation_modelrrrr ?s   r c@s@eZdZdZdZdddddddd d d dd dgZd dZdS)rrzEGenerates an auth token used to connect to a db with IAM credentials.hostnameTz+The hostname of the database to connect to.)r'required help_textportintegerz-The port number the database is listening on.)r' cli_type_namer.r/usernamezThe username to log in as.cCsB|jd|j|j|j}|j|j|j|jd}t |t ddS)Nr$) DBHostnamePort DBUsername r) _session create_clientregion endpoint_url verify_sslgenerate_db_auth_tokenr-r0r3r)self parsed_argsparsed_globalsr$tokenrrr _run_mainas z$GenerateDBAuthTokenCommand._run_mainN)__name__ __module__ __qualname__NAME DESCRIPTION ARG_TABLErBrrrrrSs rN)__doc__awscli.clidriverrrawscli.customizationsrawscli.customizations.commandsrawscli.customizations.utilsrrrrr r r rrrrrs