Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3: Let's support more arguments other than Days for restore_object request #7467

Closed
tsugumi-sys opened this issue Mar 14, 2024 · 1 comment

Comments

@tsugumi-sys
Copy link
Contributor

moto currently support only Days argument for restore_object request.
Let's add more arguments :)

response = 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',
                    'AllowQuotedRecordDelimiter': True|False
                },
                'CompressionType': 'NONE'|'GZIP'|'BZIP2',
                'JSON': {
                    'Type': 'DOCUMENT'|'LINES'
                },
                'Parquet': {}

            },
            'ExpressionType': 'SQL',
            'Expression': 'string',
            'OutputSerialization': {
                'CSV': {
                    'QuoteFields': 'ALWAYS'|'ASNEEDED',
                    'QuoteEscapeCharacter': 'string',
                    'RecordDelimiter': 'string',
                    'FieldDelimiter': 'string',
                    'QuoteCharacter': 'string'
                },
                'JSON': {
                    'RecordDelimiter': 'string'
                }
            }
        },
        'OutputLocation': {
            'S3': {
                'BucketName': 'string',
                'Prefix': 'string',
                'Encryption': {
                    'EncryptionType': 'AES256'|'aws:kms'|'aws:kms:dsse',
                    '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'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER'|'DEEP_ARCHIVE'|'OUTPOSTS'|'GLACIER_IR'|'SNOW'|'EXPRESS_ONEZONE'
            }
        }
    },
    RequestPayer='requester',
    ChecksumAlgorithm='CRC32'|'CRC32C'|'SHA1'|'SHA256',
    ExpectedBucketOwner='string'
)

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/restore_object.html

@bblommers
Copy link
Collaborator

With TYPE=SELECT broken (see linked PR), I don't think there are any other arguments worth adding? I'll close this, but happy to reconsider if I've missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants