Class CloudFrontTarget
Use a CloudFront Distribution as an alias record target.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Route53.Targets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CloudFrontTarget : DeputyBase, IAliasRecordTarget
Syntax (vb)
Public Class CloudFrontTarget
Inherits DeputyBase
Implements IAliasRecordTarget
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudFront;
HostedZone myZone;
CloudFrontWebDistribution distribution;
new AaaaRecord(this, "Alias", new AaaaRecordProps {
Zone = myZone,
Target = RecordTarget.FromAlias(new CloudFrontTarget(distribution))
});
Synopsis
Constructors
CloudFrontTarget(IDistribution) | |
CloudFrontTarget(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CloudFrontTarget(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
CLOUDFRONT_ZONE_ID | The hosted zone Id if using an alias record in Route53. |
Methods
Bind(IRecordSet, IHostedZone) | Return hosted zone ID and DNS name, usable for Route53 alias targets. |
GetHostedZoneId(IConstruct) | Get the hosted zone id for the current scope. |
Constructors
CloudFrontTarget(IDistribution)
CloudFrontTarget(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CloudFrontTarget(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CloudFrontTarget(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CloudFrontTarget(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
CLOUDFRONT_ZONE_ID
The hosted zone Id if using an alias record in Route53.
public static string CLOUDFRONT_ZONE_ID { get; }
Property Value
System.String
Remarks
This value never changes.
Methods
Bind(IRecordSet, IHostedZone)
Return hosted zone ID and DNS name, usable for Route53 alias targets.
public virtual IAliasRecordTargetConfig Bind(IRecordSet record, IHostedZone zone = null)
Parameters
- record IRecordSet
- zone IHostedZone
Returns
GetHostedZoneId(IConstruct)
Get the hosted zone id for the current scope.
public static string GetHostedZoneId(IConstruct scope)
Parameters
- scope Constructs.IConstruct
- scope in which this resource is defined.
Returns
System.String