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 Client not Exposing HeadBucket #3178

Open
dscpinheiro opened this issue Feb 9, 2024 Discussed in #3175 · 0 comments
Open

S3 Client not Exposing HeadBucket #3178

dscpinheiro opened this issue Feb 9, 2024 Discussed in #3175 · 0 comments
Labels
bug This issue is a bug. p2 This is a standard priority issue queued s3

Comments

@dscpinheiro
Copy link
Contributor

Discussed in #3175

Originally posted by omamoo February 7, 2024
Hello all,

I'm writing a code that uploading content to S3 bucket that resides at different account, i.e. I have a cross account scenario of uploading content to S3.

While writing the code I used GetBucketLocation API call to determine the bucket location, however on cross account scenario the GetBucketLocation fails since I'm not the bucket owner, in addition, I saw on AWS documentation that their recommendation is to use HeadBucket API call, however the SDK does not expose this API call and defined this call as internal.

Here is a snapshot from the SDK code:

internal virtual Task<HeadBucketResponse> HeadBucketAsync(HeadBucketRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = HeadBucketRequestMarshaller.Instance;
            options.ResponseUnmarshaller = HeadBucketResponseUnmarshaller.Instance;

            return InvokeAsync<HeadBucketResponse>(request, options, cancellationToken);
        }

Can we make this public for use?

@dscpinheiro dscpinheiro added bug This issue is a bug. needs-review labels Feb 9, 2024
@bhoradc bhoradc added s3 p2 This is a standard priority issue queued and removed needs-review labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue queued s3
Projects
None yet
Development

No branches or pull requests

2 participants