Amazon Simple Storage Service

2017/11/29 - Amazon Simple Storage Service - 1 updated api methods

Changes  Update s3 client to latest version

RestoreObject (updated) Link ΒΆ
Changes (request, response)
Request
{'RestoreRequest': {'Description': 'string',
                    'OutputLocation': {'S3': {'AccessControlList': [{'Grantee': {'DisplayName': 'string',
                                                                                 'EmailAddress': 'string',
                                                                                 'ID': 'string',
                                                                                 'Type': 'CanonicalUser '
                                                                                         '| '
                                                                                         'AmazonCustomerByEmail '
                                                                                         '| '
                                                                                         'Group',
                                                                                 'URI': 'string'},
                                                                     'Permission': 'FULL_CONTROL '
                                                                                   '| '
                                                                                   'WRITE '
                                                                                   '| '
                                                                                   'WRITE_ACP '
                                                                                   '| '
                                                                                   'READ '
                                                                                   '| '
                                                                                   'READ_ACP'}],
                                              'BucketName': 'string',
                                              'CannedACL': 'private | '
                                                           'public-read | '
                                                           'public-read-write '
                                                           '| '
                                                           'authenticated-read '
                                                           '| aws-exec-read | '
                                                           'bucket-owner-read '
                                                           '| '
                                                           'bucket-owner-full-control',
                                              'Encryption': {'EncryptionType': 'AES256 '
                                                                               '| '
                                                                               'aws:kms',
                                                             'KMSContext': 'string',
                                                             'KMSKeyId': 'string'},
                                              'Prefix': 'string',
                                              'StorageClass': 'STANDARD | '
                                                              'REDUCED_REDUNDANCY '
                                                              '| STANDARD_IA',
                                              'Tagging': {'TagSet': [{'Key': 'string',
                                                                      'Value': 'string'}]},
                                              'UserMetadata': [{'Name': 'string',
                                                                'Value': 'string'}]}},
                    'SelectParameters': {'Expression': 'string',
                                         'ExpressionType': 'SQL',
                                         'InputSerialization': {'CSV': {'Comments': 'string',
                                                                        'FieldDelimiter': 'string',
                                                                        'FileHeaderInfo': 'USE '
                                                                                          '| '
                                                                                          'IGNORE '
                                                                                          '| '
                                                                                          'NONE',
                                                                        'QuoteCharacter': 'string',
                                                                        'QuoteEscapeCharacter': 'string',
                                                                        'RecordDelimiter': 'string'}},
                                         'OutputSerialization': {'CSV': {'FieldDelimiter': 'string',
                                                                         'QuoteCharacter': 'string',
                                                                         'QuoteEscapeCharacter': 'string',
                                                                         'QuoteFields': 'ALWAYS '
                                                                                        '| '
                                                                                        'ASNEEDED',
                                                                         'RecordDelimiter': 'string'}}},
                    'Tier': 'Standard | Bulk | Expedited',
                    'Type': 'SELECT'}}
Response
{'RestoreOutputPath': 'string'}

Restores an archived copy of an object back into Amazon S3

See also: AWS API Documentation

Request Syntax

client.restore_object(
    Bucket='string',
    Key='string',
    VersionId='string',
    RestoreRequest={
        'Days': 123,
        'GlacierJobParameters': {
            'Tier': 'Standard'|'Bulk'|'Expedited'
        },
        'Type': 'SELECT',
        'Tier': 'Standard'|'Bulk'|'Expedited',
        'Description': 'string',
        'SelectParameters': {
            'InputSerialization': {
                'CSV': {
                    'FileHeaderInfo': 'USE'|'IGNORE'|'NONE',
                    'Comments': 'string',
                    'QuoteEscapeCharacter': 'string',
                    'RecordDelimiter': 'string',
                    'FieldDelimiter': 'string',
                    'QuoteCharacter': 'string'
                }
            },
            'ExpressionType': 'SQL',
            'Expression': 'string',
            'OutputSerialization': {
                'CSV': {
                    'QuoteFields': 'ALWAYS'|'ASNEEDED',
                    'QuoteEscapeCharacter': 'string',
                    'RecordDelimiter': 'string',
                    'FieldDelimiter': 'string',
                    'QuoteCharacter': 'string'
                }
            }
        },
        'OutputLocation': {
            'S3': {
                'BucketName': 'string',
                'Prefix': 'string',
                'Encryption': {
                    'EncryptionType': 'AES256'|'aws:kms',
                    'KMSKeyId': 'string',
                    'KMSContext': 'string'
                },
                'CannedACL': 'private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control',
                'AccessControlList': [
                    {
                        'Grantee': {
                            'DisplayName': 'string',
                            'EmailAddress': 'string',
                            'ID': 'string',
                            'Type': 'CanonicalUser'|'AmazonCustomerByEmail'|'Group',
                            'URI': 'string'
                        },
                        'Permission': 'FULL_CONTROL'|'WRITE'|'WRITE_ACP'|'READ'|'READ_ACP'
                    },
                ],
                'Tagging': {
                    'TagSet': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
                'UserMetadata': [
                    {
                        'Name': 'string',
                        'Value': 'string'
                    },
                ],
                'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'
            }
        }
    },
    RequestPayer='requester'
)
type Bucket:

string

param Bucket:

[REQUIRED]

type Key:

string

param Key:

[REQUIRED]

type VersionId:

string

param VersionId:

type RestoreRequest:

dict

param RestoreRequest:

Container for restore job parameters.

  • Days (integer) -- Lifetime of the active copy in days. Do not use with restores that specify OutputLocation.

  • GlacierJobParameters (dict) -- Glacier related parameters pertaining to this job. Do not use with restores that specify OutputLocation.

    • Tier (string) -- [REQUIRED] Glacier retrieval tier at which the restore will be processed.

  • Type (string) -- Type of restore request.

  • Tier (string) -- Glacier retrieval tier at which the restore will be processed.

  • Description (string) -- The optional description for the job.

  • SelectParameters (dict) -- Describes the parameters for Select job types.

    • InputSerialization (dict) -- [REQUIRED] Describes the serialization format of the object.

      • CSV (dict) -- Describes the serialization of a CSV-encoded object.

        • FileHeaderInfo (string) -- Describes the first line of input. Valid values: None, Ignore, Use.

        • Comments (string) -- Single character used to indicate a row should be ignored when present at the start of a row.

        • QuoteEscapeCharacter (string) -- Single character used for escaping the quote character inside an already escaped value.

        • RecordDelimiter (string) -- Value used to separate individual records.

        • FieldDelimiter (string) -- Value used to separate individual fields in a record.

        • QuoteCharacter (string) -- Value used for escaping where the field delimiter is part of the value.

    • ExpressionType (string) -- [REQUIRED] The type of the provided expression (e.g., SQL).

    • Expression (string) -- [REQUIRED] The expression that is used to query the object.

    • OutputSerialization (dict) -- [REQUIRED] Describes how the results of the Select job are serialized.

      • CSV (dict) -- Describes the serialization of CSV-encoded Select results.

        • QuoteFields (string) -- Indicates whether or not all output fields should be quoted.

        • QuoteEscapeCharacter (string) -- Single character used for escaping the quote character inside an already escaped value.

        • RecordDelimiter (string) -- Value used to separate individual records.

        • FieldDelimiter (string) -- Value used to separate individual fields in a record.

        • QuoteCharacter (string) -- Value used for escaping where the field delimiter is part of the value.

  • OutputLocation (dict) -- Describes the location where the restore job's output is stored.

    • S3 (dict) -- Describes an S3 location that will receive the results of the restore request.

      • BucketName (string) -- [REQUIRED] The name of the bucket where the restore results will be placed.

      • Prefix (string) -- [REQUIRED] The prefix that is prepended to the restore results for this request.

      • Encryption (dict) -- Describes the server-side encryption that will be applied to the restore results.

        • EncryptionType (string) -- [REQUIRED] The server-side encryption algorithm used when storing job results in Amazon S3 (e.g., AES256, aws:kms).

        • KMSKeyId (string) -- If the encryption type is aws:kms, this optional value specifies the AWS KMS key ID to use for encryption of job results.

        • KMSContext (string) -- If the encryption type is aws:kms, this optional value can be used to specify the encryption context for the restore results.

      • CannedACL (string) -- The canned ACL to apply to the restore results.

      • AccessControlList (list) -- A list of grants that control access to the staged results.

        • (dict) --

          • Grantee (dict) --

            • DisplayName (string) -- Screen name of the grantee.

            • EmailAddress (string) -- Email address of the grantee.

            • ID (string) -- The canonical user ID of the grantee.

            • Type (string) -- [REQUIRED] Type of grantee

            • URI (string) -- URI of the grantee group.

          • Permission (string) -- Specifies the permission given to the grantee.

      • Tagging (dict) -- The tag-set that is applied to the restore results.

        • TagSet (list) -- [REQUIRED]

          • (dict) --

            • Key (string) -- [REQUIRED] Name of the tag.

            • Value (string) -- [REQUIRED] Value of the tag.

      • UserMetadata (list) -- A list of metadata to store with the restore results in S3.

        • (dict) -- A metadata key-value pair to store with an object.

          • Name (string) --

          • Value (string) --

      • StorageClass (string) -- The class of storage used to store the restore results.

type RequestPayer:

string

param RequestPayer:

Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html

rtype:

dict

returns:

Response Syntax

{
    'RequestCharged': 'requester',
    'RestoreOutputPath': 'string'
}

Response Structure

  • (dict) --

    • RequestCharged (string) -- If present, indicates that the requester was successfully charged for the request.

    • RestoreOutputPath (string) -- Indicates the path in the provided S3 output location where Select results will be restored to.