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/boto/ec2/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/boto/ec2/__pycache__/image.cpython-310.pyc
o

ckF[�?�@spddlmZmZddlmZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e	�Z
Gdd�de	�Zd
S)�)�	EC2Object�TaggedEC2Object)�BlockDeviceMappingc@�eZdZdd�Zdd�ZdS)�ProductCodescC�dS�N���self�name�attrs�
connectionr	r	�0/usr/lib/python3/dist-packages/boto/ec2/image.py�startElement�zProductCodes.startElementcC�|dkr|�|�dSdS)N�productCode��append�rr�valuerr	r	r�
endElement��zProductCodes.endElementN��__name__�
__module__�__qualname__rrr	r	r	rr�rc@r)�BillingProductscCrrr	r
r	r	rr%rzBillingProducts.startElementcCr)N�billingProductrrr	r	rr(rzBillingProducts.endElementNrr	r	r	rr$rrcs�eZdZdZd"�fdd�	Zdd�Z�fdd�Zd	d
�Zdd�Zd#dd�Z								
					
d$dd�Z
d#dd�Zd%dd�Z		
d&dd�Z
		
d&dd�Zd%dd�Zd%dd�Zd%d d!�Z�ZS)'�Imagez!
    Represents an EC2 Image
    Ncs�tt|��|�d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_t�|_t�|_d|_d|_d|_d|_d|_d|_d|_dS)NF)�superr!�__init__�id�location�state�ownerId�owner_id�owner_alias�	is_public�architecture�platform�type�	kernel_id�
ramdisk_idr�descriptionr�
product_codesr�billing_products�block_device_mapping�root_device_type�root_device_name�virtualization_type�
hypervisor�instance_lifecycle�sriov_net_support)rr��	__class__r	rr#2s0
zImage.__init__cCs
d|jS)NzImage:%s)r$)rr	r	r�__repr__Ls
zImage.__repr__csVtt|��|||�}|dur|S|dkrt�|_|jS|dkr"|jS|dkr)|jSdS)N�blockDeviceMapping�productCodes�billingProducts)r"r!rrr3r1r2)rrr
r�retvalr:r	rrOszImage.startElementcCs�|dkr	||_dS|dkr||_dS|dkr||_dS|dkr'||_||_dS|dkrF|dkr4d|_dS|dkr=d	|_dStd
||jf��|dkrO||_dS|dkrX||_dS|d
kra||_	dS|dkrj||_
dS|dkrs||_dS|dkr|||_dS|dkr�||_
dS|dkr�||_dS|dkr�||_dS|dkr�||_dS|dkr�||_dS|dkr�||_dS|dkr�||_dS|dkr�||_dSt|||�dS)N�imageId�
imageLocation�
imageState�imageOwnerId�isPublic�falseF�trueTz,Unexpected value of isPublic %s for image %sr+�	imageType�kernelId�	ramdiskId�imageOwnerAliasr,rr0�rootDeviceType�rootDeviceName�virtualizationTyper7�instanceLifecycle�sriovNetSupport)r$r%r&r'r(r*�	Exceptionr+r-r.r/r)r,rr0r4r5r6r7r8r9�setattrrr	r	rr]sb





��













zImage.endElementcCs|j�|j�dSr)�__dict__�update)r�updatedr	r	r�_update�sz
Image._updateFcCs\|jj|jg|d�}t|�dkr"|d}|j|jkr|�|�|jS|r+td|j��|jS)a�
        Update the image's state information by making a call to fetch
        the current image attributes from the service.

        :type validate: bool
        :param validate: By default, if EC2 returns no data about the
                         image the update method returns quietly.  If
                         the validate param is True, however, it will
                         raise a ValueError exception if no data is
                         returned from EC2.
        ��dry_runrz%s is not a valid Image ID)r�get_all_imagesr$�lenrV�
ValueErrorr&)r�validaterX�rs�imgr	r	rrT�s
�zImage.update��m1.smallcCs>|jj|j|||||||||	|
|||
||||||||||d�S)aZ
        Runs this instance.

        :type min_count: int
        :param min_count: The minimum number of instances to start

        :type max_count: int
        :param max_count: The maximum number of instances to start

        :type key_name: string
        :param key_name: The name of the key pair with which to
            launch instances.

        :type security_groups: list of strings
        :param security_groups: The names of the security groups with which to
            associate instances.

        :type user_data: string
        :param user_data: The Base64-encoded MIME user data to be made
            available to the instance(s) in this reservation.

        :type instance_type: string
        :param instance_type: The type of instance to run:

            * t1.micro
            * m1.small
            * m1.medium
            * m1.large
            * m1.xlarge
            * m3.medium
            * m3.large
            * m3.xlarge
            * m3.2xlarge
            * c1.medium
            * c1.xlarge
            * m2.xlarge
            * m2.2xlarge
            * m2.4xlarge
            * cr1.8xlarge
            * hi1.4xlarge
            * hs1.8xlarge
            * cc1.4xlarge
            * cg1.4xlarge
            * cc2.8xlarge
            * g2.2xlarge
            * c3.large
            * c3.xlarge
            * c3.2xlarge
            * c3.4xlarge
            * c3.8xlarge
            * c4.large
            * c4.xlarge
            * c4.2xlarge
            * c4.4xlarge
            * c4.8xlarge
            * i2.xlarge
            * i2.2xlarge
            * i2.4xlarge
            * i2.8xlarge
            * t2.micro
            * t2.small
            * t2.medium

        :type placement: string
        :param placement: The Availability Zone to launch the instance into.

        :type kernel_id: string
        :param kernel_id: The ID of the kernel with which to launch the
            instances.

        :type ramdisk_id: string
        :param ramdisk_id: The ID of the RAM disk with which to launch the
            instances.

        :type monitoring_enabled: bool
        :param monitoring_enabled: Enable CloudWatch monitoring on
            the instance.

         :type subnet_id: string
        :param subnet_id: The subnet ID within which to launch the instances
            for VPC.

        :type private_ip_address: string
        :param private_ip_address: If you're using VPC, you can
            optionally use this parameter to assign the instance a
            specific available IP address from the subnet (e.g.,
            10.0.0.25).

        :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping`
        :param block_device_map: A BlockDeviceMapping data structure
            describing the EBS volumes associated with the Image.

        :type disable_api_termination: bool
        :param disable_api_termination: If True, the instances will be locked
            and will not be able to be terminated via the API.

        :type instance_initiated_shutdown_behavior: string
        :param instance_initiated_shutdown_behavior: Specifies whether the
            instance stops or terminates on instance-initiated shutdown.
            Valid values are:

            * stop
            * terminate

        :type placement_group: string
        :param placement_group: If specified, this is the name of the placement
            group in which the instance(s) will be launched.

        :type additional_info: string
        :param additional_info: Specifies additional information to make
            available to the instance(s).

        :type security_group_ids: list of strings
        :param security_group_ids: The ID of the VPC security groups with
            which to associate instances.

        :type instance_profile_name: string
        :param instance_profile_name: The name of
            the IAM Instance Profile (IIP) to associate with the instances.

        :type instance_profile_arn: string
        :param instance_profile_arn: The Amazon resource name (ARN) of
            the IAM Instance Profile (IIP) to associate with the instances.

        :type tenancy: string
        :param tenancy: The tenancy of the instance you want to
            launch. An instance with a tenancy of 'dedicated' runs on
            single-tenant hardware and can only be launched into a
            VPC. Valid values are:"default" or "dedicated".
            NOTE: To use dedicated tenancy you MUST specify a VPC
            subnet-ID as well.

        :rtype: Reservation
        :return: The :class:`boto.ec2.instance.Reservation` associated with
                 the request for machines

        )�security_group_ids�additional_info�instance_profile_name�instance_profile_arn�tenancyrX)r�
run_instancesr$)r�	min_count�	max_count�key_name�security_groups�	user_data�addressing_type�
instance_type�	placementr.r/�monitoring_enabled�	subnet_id�block_device_map�disable_api_termination�$instance_initiated_shutdown_behavior�private_ip_address�placement_grouprarbrcrdrerXr	r	r�run�s �z	Image.runcCs|jj|j||d�S)NrW)r�deregister_imager$)r�delete_snapshotrXr	r	r�
deregisterP�
�zImage.deregistercC�|jj|jd|d�}|jS�N�launchPermissionrW)r�get_image_attributer$r
�rrX�	img_attrsr	r	r�get_launch_permissionsW��zImage.get_launch_permissionscC�|jj|jdd|||d�S)Nr}�addrW�r�modify_image_attributer$�r�user_ids�group_namesrXr	r	r�set_launch_permissions_�
�zImage.set_launch_permissionscCr�)Nr}�removerWr�r�r	r	r�remove_launch_permissionshr�zImage.remove_launch_permissionscCs|jj|jd|d�Sr|)r�reset_image_attributer$)rrXr	r	r�reset_launch_attributesqrzzImage.reset_launch_attributescCr{)N�kernelrW)rr~r$r�rr	r	r�
get_kernelxr�zImage.get_kernelcCr{)N�ramdiskrW)rr~r$r�rr	r	r�get_ramdisk�r�zImage.get_ramdiskr)FF)r_r_NNNNr`NNNFNNFNNNNNNNNF)F)NNF)rrr�__doc__r#r<rrrVrTrvryr�r�r�r�r�r��
__classcell__r	r	r:rr!-sB5

�
'

�	
�
	
r!c@�&eZdZddd�Zdd�Zdd�ZdS)	�ImageAttributeNcCsd|_d|_d|_i|_dSr)rr�r�r
�r�parentr	r	rr#�s
zImageAttribute.__init__cCs"|dkrt�|jd<|jdSdS)Nr=r3)rr
r
r	r	rr�s
zImageAttribute.startElementcCs�|dkr	d|_dS|dkr$d|jvr|jd�|�dS|g|jd<dS|dkr?d|jvr7|jd�|�dS|g|jd<dS|dkrZd|jvrR|jd�|�dS|g|jd<dS|d	krc||_dS|d
krl||_dS|dkru||_dSt|||�dS)Nr}�launch_permission�group�groups�userIdr�rr1rAr�r�)rr
r�image_idr�r�rRrr	r	rr�s*






zImageAttribute.endElementr�rrrr#rrr	r	r	rr��s
r�c@r�)	�	CopyImageNcCs||_d|_dSr)�_parentr�r�r	r	rr#�s
zCopyImage.__init__cCrrr	r
r	r	rr�rzCopyImage.startElementcCs|dkr	||_dSdS)NrA)r�rr	r	rr�s
�zCopyImage.endElementrr�r	r	r	rr��s
r�N)�boto.ec2.ec2objectrr�boto.ec2.blockdevicemappingr�listrrr!�objectr�r�r	r	r	r�<module>s		^*

https://t.me/RX1948 - 2025