https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/awscli/customizations/codedeploy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

.&�a �@s�ddlZddlZddlZddlmZmZddlmZmZm	Z	m
Z
ddlmZdZ
dZdZdZd	Zd
Zddd
dd�Zddddd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS) �N)�urlopen�URLError)�System�Ubuntu�Windows�RHEL��timeout�d�
��z^[A-Za-z0-9+=,.@_-]+$z2^arn:aws:iam::[0-9]{12}:user/[A-Za-z0-9/+=,.@_-]+$z
instance-namez--instance-name <instance-name>Tz/Required. The name of the on-premises instance.)�name�synopsis�required�	help_textziam-user-arnz--iam-user-arn <iam-user-arn>Fz@Optional. The IAM user associated with the on-premises instance.cCs0|jr|j|_n|j�d�|_|jstd��dS)N�regionzRegion not specified.)r�session�get_config_variable�RuntimeError)�params�parsed_globals�r�H/usr/lib/python3/dist-packages/awscli/customizations/codedeploy/utils.py�validate_region2s
�rcCsT|jr&t�t|j�std��|j�d�rtd��t|j�tkr(td�t���dSdS)Nz*Instance name contains invalid characters.zi-z%Instance name cannot start with 'i-'.z3Instance name cannot be longer than {0} characters.)	�
instance_name�re�match�INSTANCE_NAME_PATTERN�
ValueError�
startswith�len�MAX_INSTANCE_NAME_LENGTH�format�rrrr�validate_instance_name;s���r%cCsr|jr5t|j�tkrtd�t���|jD]"}t|d�tkr%td�t���t|d�tkr4td�t���qdSdS)Nz.Instances can only have a maximum of {0} tags.�Keyz-Tag Key cannot be longer than {0} characters.�Valuez/Tag Value cannot be longer than {0} characters.)�tagsr!�MAX_TAGS_PER_INSTANCErr#�MAX_TAG_KEY_LENGTH�MAX_TAG_VALUE_LENGTH)r�tagrrr�
validate_tagsIs.��
������r-cCs$|jrt�t|j�std��dSdS)NzInvalid IAM user ARN.)�iam_user_arnrr�IAM_USER_ARN_PATTERNrr$rrr�validate_iam_user_arn`s
��r0c	Cs�t��dkr tj��d}d|vrt|�|_d|vrt|�|_nt��dkr+t|�|_d|vr4tt	j
��z
tddd	�td
��tt
fyJYdSw)N�LinuxrrzRed Hat Enterprise Linux Serverr�systemz(http://169.254.169.254/latest/meta-data/�rz'Amazon EC2 instances are not supported.)�platformr2�awscli�compat�linux_distributionrrrrr�UNSUPPORTED_SYSTEM_MSGrrr	)r�distributionrrr�validate_instancefs&

�
��r:cCsp|�dd�}||vr4t||�}|r6t�dt|��}|r)|�d�|_|�d�|_dStd�	|�dd����dSdS)N�-�_zs3://(.+?)/(.+)r3�zC--{0} must specify the Amazon S3 URL format as s3://<bucket>/<key>.)
�replace�getattrrr�str�group�bucket�keyrr#)r�arg_name�s3_location�matcherrrr�validate_s3_locationzs 

���rG)r4r�
awscli.compatr5rr�(awscli.customizations.codedeploy.systemsrrrr�socketr	r"r)r*r+rr/�INSTANCE_NAME_ARG�IAM_USER_ARN_ARGrr%r-r0r:rGrrrr�<module>s8
�
�
	

https://t.me/RX1948 - 2025