interface VirtualHostedStyleUrlOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.S3.VirtualHostedStyleUrlOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awss3#VirtualHostedStyleUrlOptions |
Java | software.amazon.awscdk.services.s3.VirtualHostedStyleUrlOptions |
Python | aws_cdk.aws_s3.VirtualHostedStyleUrlOptions |
TypeScript (source) | aws-cdk-lib » aws_s3 » VirtualHostedStyleUrlOptions |
Options for creating Virtual-Hosted style URL.
Example
const bucket = new s3.Bucket(this, 'MyBucket');
bucket.urlForObject('objectname'); // Path-Style URL
bucket.virtualHostedUrlForObject('objectname'); // Virtual Hosted-Style URL
bucket.virtualHostedUrlForObject('objectname', { regional: false }); // Virtual Hosted-Style URL but non-regional
Properties
| Name | Type | Description |
|---|---|---|
| regional? | boolean | Specifies the URL includes the region. |
regional?
Type:
boolean
(optional, default: true)
Specifies the URL includes the region.

.NET
Go
Java
Python
TypeScript (