File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
modules/AWSPowerShell/Cmdlets/S3/Extensions Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,19 @@ public abstract partial class AmazonS3ClientCmdlet
42
42
/// </summary>
43
43
[ Parameter ( ValueFromPipelineByPropertyName = true ) ]
44
44
public SwitchParameter UseDualstackEndpoint { get ; set ; }
45
-
45
+
46
+ #endregion
47
+
48
+ #region Parameter ForcePathStyleAddressing
49
+ /// <summary>
50
+ /// S3 requests can be performed using one of two URI styles: Virtual or Path.
51
+ /// When using Virtual style, the bucket is included as part of the hostname.
52
+ /// When using Path style the bucket is included as part of the URI path.
53
+ /// The default value is $true when the EndpointUrl parameter is specified, $false otherwise.
54
+ /// </summary>
55
+ [ Parameter ( ValueFromPipelineByPropertyName = true ) ]
56
+ public bool ? ForcePathStyleAddressing { get ; set ; }
57
+
46
58
#endregion
47
59
48
60
protected override void CustomizeClientConfig ( ClientConfig config )
@@ -63,8 +75,7 @@ protected override void CustomizeClientConfig(ClientConfig config)
63
75
64
76
// github issue #670 request - like the aws cli, if a specific endpoint is
65
77
// given then switch to path style addressing
66
- if ( ParameterWasBound ( nameof ( EndpointUrl ) ) )
67
- s3Config . ForcePathStyle = true ;
78
+ s3Config . ForcePathStyle = ForcePathStyleAddressing ?? ParameterWasBound ( nameof ( EndpointUrl ) ) ;
68
79
}
69
80
}
70
81
}
You can’t perform that action at this time.
0 commit comments