403Webshell
Server IP : 167.99.254.82  /  Your IP : 216.73.216.68
Web Server : Apache
System : Linux host.techisquad.com 5.15.0-187-generic #197-Ubuntu SMP Fri Jul 17 19:17:01 UTC 2026 x86_64
User : pawluxera ( 1011)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/awscli/customizations/codedeploy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/awscli/customizations/codedeploy/__pycache__/deregister.cpython-310.pyc
o

.&�a=�@sHddlZddlmZddlmZddlmZmZmZGdd�de�Z	dS)�N)�ClientError)�BasicCommand)�validate_region�validate_instance_name�INSTANCE_NAME_ARGc@s^eZdZdZdZeddddd�gZdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�
Deregister�
deregisterz�Removes any tags from the on-premises instance; deregisters the on-premises instance from AWS CodeDeploy; and, unless requested otherwise, deletes the IAM user for the on-premises instance.zno-delete-iam-user�
store_trueFzMOptional. Do not delete the IAM user for the registered on-premises instance.)�name�action�default�	help_textc
Cs�|}|j|_t||�t|�|jjd|j|j|jd�|_|jjd|jd�|_	z-|�
|�|jr5|�|�|�
|�|jsL|�|�|�|�|�|�tj�d�WdStyu}ztj��tj�d�|��WYd}~dSd}~ww)N�
codedeploy)�region_name�endpoint_url�verify�iam)rznRun the following command on the on-premises instance to uninstall the codedeploy-agent:
aws deploy uninstall
z�ERROR
{0}
Deregister the on-premises instance by following the instructions in "Configure Existing On-Premises Instances by Using AWS CodeDeploy" in the AWS CodeDeploy User Guide.
)�_session�sessionrr�
create_client�regionr�
verify_sslrr�_get_instance_info�tags�_remove_tags�_deregister_instance�no_delete_iam_user�_delete_user_policy�_delete_access_key�_delete_iam_user�sys�stdout�write�	Exception�flush�stderr�format)�self�parsed_args�parsed_globals�params�e�r,�M/usr/lib/python3/dist-packages/awscli/customizations/codedeploy/deregister.py�	_run_main-sD
��






�
���zDeregister._run_maincCs�tj�d�|jj|jd�}|dd|_|j�d�d}|j|d�|_|dd|_	tj�d�
|j��|j	r[tj�d	�|j	D]}tj�d
�
|d|d��qBtj�d
�dSdS)Nz/Retrieving on-premises instance information... ��instanceName�instanceInfo�
iamUserArn�/�rzDONE
IamUserArn: {0}
zTags:z Key={0},Value={1}�Key�Value�
)r r!r"r�get_on_premises_instance�
instance_name�iam_user_arn�rfind�	user_namerr&)r'r*�response�start�tagr,r,r-rWs,���
��zDeregister._get_instance_infocCs2tj�d�|jj|j|jgd�tj�d�dS)Nz/Removing tags from the on-premises instance... )r�
instanceNames�DONE
)r r!r"r�&remove_tags_from_on_premises_instancesrr9�r'r*r,r,r-rns�zDeregister._remove_tagscCs,tj�d�|jj|jd�tj�d�dS)Nz*Deregistering the on-premises instance... r/rA)r r!r"r�deregister_on_premises_instancer9rCr,r,r-rvs
�zDeregister._deregister_instancec
Cs�tj�d�|j�d�}z|j|jd�D]}|dD]}|jj|j|d�qqWn tyH}z|j	�
di��
d�dkr>|�WYd}~nd}~wwtj�d	�dS)
Nz"Deleting the IAM user policies... �list_user_policies��UserName�PolicyNames)rG�
PolicyName�Error�Code�NoSuchEntityrA)r r!r"r�
get_paginator�paginater<�delete_user_policyrr=�get)r'r*rEr=�policy_namer+r,r,r-r}s(
�������zDeregister._delete_user_policyc
Cs�tj�d�|j�d�}z|j|jd�D]}|dD]
}|jj|j|dd�qqWn tyJ}z|j	�
di��
d�d	kr@|�WYd}~nd}~wwtj�d
�dS)Nz%Deleting the IAM user access keys... �list_access_keysrF�AccessKeyMetadata�AccessKeyId)rGrTrJrKrLrA)r r!r"rrMrNr<�delete_access_keyrr=rP)r'r*rRr=�
access_keyr+r,r,r-r�s(
�������zDeregister._delete_access_keyc
Csztj�d�|j��z
|jj|jd�Wn ty4}z|j�	di��	d�dkr*|�WYd}~nd}~wwtj�d�dS)NzDeleting the IAM user ({0})... rFrJrKrLrA)
r r!r"r&r<r�delete_userrr=rP)r'r*r+r,r,r-r�s
����zDeregister._delete_iam_userN)�__name__�
__module__�__qualname__�NAME�DESCRIPTIONr�	ARG_TABLEr.rrrrrrr,r,r,r-rs$���
*r)
r �botocore.exceptionsr�awscli.customizations.commandsr�&awscli.customizations.codedeploy.utilsrrrrr,r,r,r-�<module>s



Youez - 2016 - github.com/yon3zu
LinuXploit