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

Is it possible to get x-amz-version-id? #1322

Open
viktorix opened this issue Apr 10, 2023 · 1 comment
Open

Is it possible to get x-amz-version-id? #1322

viktorix opened this issue Apr 10, 2023 · 1 comment

Comments

@viktorix
Copy link

I've tried a few commands (v2.3.0), but not finding a way to get x-amz-version-id. I was able to find it when adding -d to the info command, and it's in the response header:

DEBUG: Response:
{'data': b'',
 'headers': {'accept-ranges': 'bytes',
             'cache-control': 'max-age=0, no-cache, no-store',
             'content-length': '10300',
             'content-type': 'application/octet-stream',
             'date': 'Mon, 10 Apr 2023 16:00:28 GMT',
             'etag': '"9a70b1e1bee36b2d399c6e3b01488368"',
             'last-modified': 'Mon, 10 Apr 2023 15:50:42 GMT',
             'x-amz-id-2': 'aNxVlcWVONug42jOgN604f2XPNMhiS2WW',
             'x-amz-meta-s3cmd-attrs': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
             'x-amz-meta-s3tools-gpgenc': 'gpg',
             'x-amz-request-id': '959a6c5ff2c03db3',
             'x-amz-version-id': '4_z773e5ee688e377f87e640b1e'},
 'reason': '',
 's3cmd-attrs': {'atime': '1681141794',
                 'ctime': '1681141794',
                 'gid': '0',
                 'gname': 'root',
                 'md5': 'f1c9645dbc14efddc7d8a322685f26ebvd',
                 'mode': '33188',
                 'mtime': '1681141794',
                 'uid': '0',
                 'uname': 'root'},
 'status': 200}

I've seen that versioning is supported for buckets. Is there a way to work with version IDs? Thanks.

@viktorix
Copy link
Author

After digging around more, it appears that s3cmd limits headers to x-amz-meta-:

https://github.com/s3tools/s3cmd/blob/master/s3cmd#L1143-L1151

I think it would be helpful to extend this to x-amz- headers, so they can be accessed as needed.

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

No branches or pull requests

1 participant