mirror of
https://github.com/rclone/rclone.git
synced 2025-08-09 13:55:15 +02:00
s3: add --s3-use-arn-region flag - fixes #8686
This commit is contained in:
@ -2428,6 +2428,11 @@ See [AWS Docs on Dualstack Endpoints](https://docs.aws.amazon.com/AmazonS3/lates
|
||||
See: [AWS S3 Transfer acceleration](https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration-examples.html)`,
|
||||
Default: false,
|
||||
Advanced: true,
|
||||
}, {
|
||||
Name: "use_arn_region",
|
||||
Help: `If true, enables arn region support for the service.`,
|
||||
Default: false,
|
||||
Advanced: true,
|
||||
}, {
|
||||
Name: "leave_parts_on_error",
|
||||
Provider: "AWS",
|
||||
@ -2975,6 +2980,7 @@ type Options struct {
|
||||
ForcePathStyle bool `config:"force_path_style"`
|
||||
V2Auth bool `config:"v2_auth"`
|
||||
UseAccelerateEndpoint bool `config:"use_accelerate_endpoint"`
|
||||
UseARNRegion bool `config:"use_arn_region"`
|
||||
LeavePartsOnError bool `config:"leave_parts_on_error"`
|
||||
ListChunk int32 `config:"list_chunk"`
|
||||
ListVersion int `config:"list_version"`
|
||||
@ -3339,6 +3345,7 @@ func s3Connection(ctx context.Context, opt *Options, client *http.Client) (s3Cli
|
||||
options = append(options, func(s3Opt *s3.Options) {
|
||||
s3Opt.UsePathStyle = opt.ForcePathStyle
|
||||
s3Opt.UseAccelerate = opt.UseAccelerateEndpoint
|
||||
s3Opt.UseARNRegion = opt.UseARNRegion
|
||||
// FIXME maybe this should be a tristate so can default to DualStackEndpointStateUnset?
|
||||
if opt.UseDualStack {
|
||||
s3Opt.EndpointOptions.UseDualStackEndpoint = aws.DualStackEndpointStateEnabled
|
||||
|
Reference in New Issue
Block a user