Class BucketWebsiteTarget
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.route53.targets.BucketWebsiteTarget
- All Implemented Interfaces:
IAliasRecordTarget,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:40:59.588Z")
@Stability(Stable)
public class BucketWebsiteTarget
extends software.amazon.jsii.JsiiObject
implements IAliasRecordTarget
Use a S3 as an alias record target.
Example:
import software.amazon.awscdk.services.s3.*;
String recordName = "www";
String domainName = "example.com";
Bucket bucketWebsite = Bucket.Builder.create(this, "BucketWebsite")
.bucketName(List.of(recordName, domainName).join(".")) // www.example.com
.publicReadAccess(true)
.websiteIndexDocument("index.html")
.build();
IHostedZone zone = HostedZone.fromLookup(this, "Zone", HostedZoneProviderProps.builder().domainName(domainName).build()); // example.com
// example.com
ARecord.Builder.create(this, "AliasRecord")
.zone(zone)
.recordName(recordName) // www
.target(RecordTarget.fromAlias(
new BucketWebsiteTarget(bucketWebsite, Map.of(
"evaluateTargetHealth", true))))
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.route53.IAliasRecordTarget
IAliasRecordTarget.Jsii$Default, IAliasRecordTarget.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionBucketWebsiteTarget(IBucket bucket) BucketWebsiteTarget(IBucket bucket, IAliasRecordTargetProps props) protectedBucketWebsiteTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedBucketWebsiteTarget(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind(IRecordSet record) Return hosted zone ID and DNS name, usable for Route53 alias targets.bind(IRecordSet record, IHostedZone _zone) Return hosted zone ID and DNS name, usable for Route53 alias targets.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
BucketWebsiteTarget
protected BucketWebsiteTarget(software.amazon.jsii.JsiiObjectRef objRef) -
BucketWebsiteTarget
protected BucketWebsiteTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
BucketWebsiteTarget
@Stability(Stable) public BucketWebsiteTarget(@NotNull IBucket bucket, @Nullable IAliasRecordTargetProps props) - Parameters:
bucket- This parameter is required.props-
-
BucketWebsiteTarget
- Parameters:
bucket- This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public AliasRecordTargetConfig bind(@NotNull IRecordSet record, @Nullable IHostedZone _zone) Return hosted zone ID and DNS name, usable for Route53 alias targets.- Specified by:
bindin interfaceIAliasRecordTarget- Parameters:
record- This parameter is required._zone-
-
bind
Return hosted zone ID and DNS name, usable for Route53 alias targets.- Specified by:
bindin interfaceIAliasRecordTarget- Parameters:
record- This parameter is required.
-