Class PublicHostedZone
Create a Route53 public hosted zone.
Inherited Members
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.AWS.Route53.dll
Syntax (csharp)
public class PublicHostedZone : HostedZone, IPublicHostedZone, IHostedZone, IResource, IConstruct, IDependable
Syntax (vb)
Public Class PublicHostedZone
Inherits HostedZone
Implements IPublicHostedZone, IHostedZone, IResource, IConstruct, IDependable
Remarks
Resource: AWS::Route53::HostedZone
ExampleMetadata: infused
Examples
var zoneFromAttributes = PublicHostedZone.FromPublicHostedZoneAttributes(this, "MyZone", new PublicHostedZoneAttributes {
ZoneName = "example.com",
HostedZoneId = "ZOJJZC49E0EPZ"
});
// Does not know zoneName
var zoneFromId = PublicHostedZone.FromPublicHostedZoneId(this, "MyZone", "ZOJJZC49E0EPZ");
Synopsis
Constructors
PublicHostedZone(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
PublicHostedZone(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
PublicHostedZone(Construct, String, IPublicHostedZoneProps) |
Properties
CrossAccountZoneDelegationRole | Role for cross account zone delegation. |
Methods
AddDelegation(IPublicHostedZone, IZoneDelegationOptions) | Adds a delegation from this zone to a designated zone. |
AddVpc(IVpc) | Add another VPC to this private hosted zone. |
FromPublicHostedZoneAttributes(Construct, String, IPublicHostedZoneAttributes) | Imports a public hosted zone from another stack. |
FromPublicHostedZoneId(Construct, String, String) | Import a Route 53 public hosted zone defined either outside the CDK, or in a different CDK stack. |
Constructors
PublicHostedZone(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected PublicHostedZone(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
PublicHostedZone(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected PublicHostedZone(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
PublicHostedZone(Construct, String, IPublicHostedZoneProps)
public PublicHostedZone(Construct scope, string id, IPublicHostedZoneProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IPublicHostedZoneProps
Properties
CrossAccountZoneDelegationRole
Role for cross account zone delegation.
public virtual Role CrossAccountZoneDelegationRole { get; }
Property Value
Methods
AddDelegation(IPublicHostedZone, IZoneDelegationOptions)
Adds a delegation from this zone to a designated zone.
public virtual void AddDelegation(IPublicHostedZone delegate, IZoneDelegationOptions opts = null)
Parameters
- delegate IPublicHostedZone
the zone being delegated to.
- opts IZoneDelegationOptions
options for creating the DNS record, if any.
AddVpc(IVpc)
Add another VPC to this private hosted zone.
public override void AddVpc(IVpc vpc)
Parameters
- vpc IVpc
Overrides
FromPublicHostedZoneAttributes(Construct, String, IPublicHostedZoneAttributes)
Imports a public hosted zone from another stack.
public static IHostedZone FromPublicHostedZoneAttributes(Construct scope, string id, IPublicHostedZoneAttributes attrs)
Parameters
- scope Constructs.Construct
the parent Construct for this Construct.
- id System.String
the logical name of this Construct.
- attrs IPublicHostedZoneAttributes
the PublicHostedZoneAttributes (hosted zone ID and hosted zone name).
Returns
Remarks
Use when both hosted zone ID and hosted zone name are known.
FromPublicHostedZoneId(Construct, String, String)
Import a Route 53 public hosted zone defined either outside the CDK, or in a different CDK stack.
public static IPublicHostedZone FromPublicHostedZoneId(Construct scope, string id, string publicHostedZoneId)
Parameters
- scope Constructs.Construct
the parent Construct for this Construct.
- id System.String
the logical name of this Construct.
- publicHostedZoneId System.String
the ID of the public hosted zone to import.
Returns