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/s3/__pycache__/ |
Upload File : |
o ckF[zE � @ s d dl Zd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dlm Z d dlZd dl mZmZmZmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ d d lmZ d dlmZmZ d dlmZ d d lm Z G dd� de!�Z"dS )� N)�md5)�BytesIO�six�urllib�encodebytes��BotoClientError)�StorageDataError)�PleaseRetryException)�Provider)�KeyFile)�User)� UserAgent)�compute_md5�compute_hash)�find_matching_headers)�merge_headers_by_namec @ sN e Zd ZdZdZdZej�ddd�Z e g d��Ze � ZeD ]Z e�e �dd �� qee g d ��B Zd�dd �Zdd� Zdd� Zedd� �Zdd� Zdd� Zeee�Zdd� Zdd� Zeee�Zdd� Zdd� Zeee�Zd d!� Zd"d#� Z eee �Z!d$d%� Z"d&d'� Z#d(d)� Z$d�d+d,�Z%d-d.� Z&d/d0� Z' 1 d�d2d3�Z(d�d4d5�Z) d�d7d8�Z*d*Z+d�d9d:�Z,d;d<� Z-e-Z.d�d>d?�Z/ @d�dAdB�Z0 * @d�dCdD�Z1dEdF� Z2dGdH� Z3d�dIdJ�Z4d�dKdL�Z5dMdN� Z6dOdP� Z7dQdR� Z8d�dSdT�Z9d�dUdV�Z:d�dWdX�Z;d�dYdZ�Z<d�d[d\�Z=d]d^� Z>d�d_d`�Z?d�dadb�Z@ *d�ddde�ZA f d�dgdh�ZB f d�didj�ZCd�dkdl�ZDd�dmdn�ZE @ d�dodp�ZF @ *d�dqdr�ZG @ * *d�dsdt�ZH @ * *d�dudv�ZI f d�dwdx�ZJ f d�dydz�ZKd�d{d|�ZL f * d�d}d~�ZM f * d�dd��ZN f * d�d�d��ZOd�d�d��ZP d�d�d��ZQd�d�� ZRd�d�d��ZS d�d�d��ZTd�d�d��ZUdS )��KeyaC Represents a key (object) in an S3 bucket. :ivar bucket: The parent :class:`boto.s3.bucket.Bucket`. :ivar name: The name of this Key object. :ivar metadata: A dictionary containing user metadata that you wish to store with the object or that has been retrieved from an existing object. :ivar cache_control: The value of the `Cache-Control` HTTP header. :ivar content_type: The value of the `Content-Type` HTTP header. :ivar content_encoding: The value of the `Content-Encoding` HTTP header. :ivar content_disposition: The value of the `Content-Disposition` HTTP header. :ivar content_language: The value of the `Content-Language` HTTP header. :ivar etag: The `etag` associated with this object. :ivar last_modified: The string timestamp representing the last time this object was modified in S3. :ivar owner: The ID of the owner of this object. :ivar storage_class: The storage class of the object. Currently, one of: STANDARD | REDUCED_REDUNDANCY | GLACIER :ivar md5: The MD5 hash of the contents of the object. :ivar size: The size, in bytes, of the object. :ivar version_id: The version ID of this object, if it is a versioned object. :ivar encrypted: Whether the object is encrypted while at rest on the server. zapplication/octet-streamz�<?xml version="1.0" encoding="UTF-8"?> <RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-03-01"> <Days>%s</Days> </RestoreRequest>�Boto�key_buffer_sizei )z cache-controlzcontent-dispositionzcontent-encodingzcontent-language�content-md5�content-typezx-robots-tag�expires�-�_)z last-modified�content-length�date�etagNc C s� || _ || _i | _d | _| j| _d | _d | _d | _d | _ d | _ d| _d | _d | _ d | _d | _d | _d | _d | _d | _d | _d| _d | _d | _d | _i | _d S )NF)�bucket�name�metadata� cache_control�DefaultContentType�content_type�content_encoding�content_disposition�content_language�filenamer � is_latest� last_modified�owner�_storage_class�path�resp�mode�size� version_id�source_version_id� delete_marker� encrypted�ongoing_restore�expiry_date�local_hashes)�selfr r � r8 �-/usr/lib/python3/dist-packages/boto/s3/key.py�__init__i s2 zKey.__init__c C s<