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
4242 /// </summary>
4343 [ Parameter ( ValueFromPipelineByPropertyName = true ) ]
4444 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+
4658 #endregion
4759
4860 protected override void CustomizeClientConfig ( ClientConfig config )
@@ -63,8 +75,7 @@ protected override void CustomizeClientConfig(ClientConfig config)
6375
6476 // github issue #670 request - like the aws cli, if a specific endpoint is
6577 // given then switch to path style addressing
66- if ( ParameterWasBound ( nameof ( EndpointUrl ) ) )
67- s3Config . ForcePathStyle = true ;
78+ s3Config . ForcePathStyle = ForcePathStyleAddressing ?? ParameterWasBound ( nameof ( EndpointUrl ) ) ;
6879 }
6980 }
7081}
You can’t perform that action at this time.
0 commit comments