| 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 : |
o
.&�a= � @ sH d dl Z d dlmZ d dlmZ d dlmZmZmZ G dd� de�Z dS )� N)�ClientError)�BasicCommand)�validate_region�validate_instance_name�INSTANCE_NAME_ARGc @ s^ e Zd ZdZdZeddddd�gZdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� 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
C s� |}| j |_t||� t|� | j jd|j|j|jd�| _| j jd|jd�| _ z-| �
|� |jr5| �|� | �
|� |jsL| �|� | �|� | �|� tj�d� W d S tyu } ztj�� tj�d�|�� W Y d }~d S d }~ww )N�
codedeploy)�region_name�endpoint_url�verify�iam)r znRun 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�sessionr r �
create_client�regionr �
verify_sslr r �_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_mainc C s� t j�d� | jj|jd�}|d d |_|j�d�d }|j|d � |_|d d |_ t j�d�
|j�� |j r[t j�d � |j D ]}t j�d
�
|d |d �� qBt j�d
� d S d S )Nz/Retrieving on-premises instance information... ��instanceName�instanceInfo�
iamUserArn�/� r zDONE
IamUserArn: {0}
zTags:z Key={0},Value={1}�Key�Value�
)r r! r"