Class CloudFrontTarget
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.route53.targets.CloudFrontTarget
- All Implemented Interfaces:
IAliasRecordTarget,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.867Z")
@Stability(Stable)
public class CloudFrontTarget
extends software.amazon.jsii.JsiiObject
implements IAliasRecordTarget
Use a CloudFront Distribution as an alias record target.
Example:
import software.amazon.awscdk.services.cloudfront.*;
HostedZone myZone;
CloudFrontWebDistribution distribution;
AaaaRecord.Builder.create(this, "Alias")
.zone(myZone)
.target(RecordTarget.fromAlias(new CloudFrontTarget(distribution)))
.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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe hosted zone Id if using an alias record in Route53. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCloudFrontTarget(IDistribution distribution) protectedCloudFrontTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCloudFrontTarget(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.static StringgetHostedZoneId(IConstruct scope) Get the hosted zone id for the current scope.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
-
Field Details
-
CLOUDFRONT_ZONE_ID
The hosted zone Id if using an alias record in Route53.This value never changes.
-
-
Constructor Details
-
CloudFrontTarget
protected CloudFrontTarget(software.amazon.jsii.JsiiObjectRef objRef) -
CloudFrontTarget
protected CloudFrontTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CloudFrontTarget
- Parameters:
distribution- This parameter is required.
-
-
Method Details
-
getHostedZoneId
Get the hosted zone id for the current scope.- Parameters:
scope-- scope in which this resource is defined.
-
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.
-