Interface PublicHostedZoneProps

All Superinterfaces:
CommonHostedZoneProps, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
PublicHostedZoneProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-02T15:58:32.638Z") @Stability(Stable) public interface PublicHostedZoneProps extends software.amazon.jsii.JsiiSerializable, CommonHostedZoneProps
Construction properties for a PublicHostedZone.

Example:

 PublicHostedZone parentZone = PublicHostedZone.Builder.create(this, "HostedZone")
         .zoneName("someexample.com")
         .build();
 Role crossAccountRole = Role.Builder.create(this, "CrossAccountRole")
         // The role name must be predictable
         .roleName("MyDelegationRole")
         // The other account
         .assumedBy(new AccountPrincipal("12345678901"))
         // You can scope down this role policy to be least privileged.
         // If you want the other account to be able to manage specific records,
         // you can scope down by resource and/or normalized record names
         .inlinePolicies(Map.of(
                 "crossAccountPolicy", PolicyDocument.Builder.create()
                         .statements(List.of(
                             PolicyStatement.Builder.create()
                                     .sid("ListHostedZonesByName")
                                     .effect(Effect.ALLOW)
                                     .actions(List.of("route53:ListHostedZonesByName"))
                                     .resources(List.of("*"))
                                     .build(),
                             PolicyStatement.Builder.create()
                                     .sid("GetHostedZoneAndChangeResourceRecordSets")
                                     .effect(Effect.ALLOW)
                                     .actions(List.of("route53:GetHostedZone", "route53:ChangeResourceRecordSets"))
                                     // This example assumes the RecordSet subdomain.somexample.com
                                     // is contained in the HostedZone
                                     .resources(List.of("arn:aws:route53:::hostedzone/HZID00000000000000000"))
                                     .conditions(Map.of(
                                             "ForAllValues:StringLike", Map.of(
                                                     "route53:ChangeResourceRecordSetsNormalizedRecordNames", List.of("subdomain.someexample.com"))))
                                     .build()))
                         .build()))
         .build();
 parentZone.grantDelegation(crossAccountRole);
 
  • Method Details

    • getCaaAmazon

      @Stability(Stable) @Nullable default Boolean getCaaAmazon()
      Whether to create a CAA record to restrict certificate authorities allowed to issue certificates for this domain to Amazon only.

      Default: false

    • getCrossAccountZoneDelegationPrincipal

      @Stability(Deprecated) @Deprecated @Nullable default IPrincipal getCrossAccountZoneDelegationPrincipal()
      Deprecated.
      Create the Role yourself and call hostedZone.grantDelegation().
      (deprecated) A principal which is trusted to assume a role for zone delegation.

      If supplied, this will create a Role in the same account as the Hosted Zone, which can be assumed by the CrossAccountZoneDelegationRecord to create a delegation record to a zone in a different account.

      Be sure to indicate the account(s) that you trust to create delegation records, using either iam.AccountPrincipal or iam.OrganizationPrincipal.

      If you are planning to use iam.ServicePrincipals here, be sure to include region-specific service principals for every opt-in region you are going to be delegating to; or don't use this feature and create separate roles with appropriate permissions for every opt-in region instead.

      Default: - No delegation configuration

    • getCrossAccountZoneDelegationRoleName

      @Stability(Deprecated) @Deprecated @Nullable default String getCrossAccountZoneDelegationRoleName()
      Deprecated.
      Create the Role yourself and call hostedZone.grantDelegation().
      (deprecated) The name of the role created for cross account delegation.

      Default: - A role name is generated automatically

    • builder

      @Stability(Stable) static PublicHostedZoneProps.Builder builder()
      Returns:
      a PublicHostedZoneProps.Builder of PublicHostedZoneProps