UNPKG

1.34 kBTypeScriptView Raw
1import { IHostedZone } from './hosted-zone-ref';
2import { Construct } from '@aws-cdk/core';
3/**
4 * Validates a zone name is valid by Route53 specifc naming rules,
5 * and that there is no trailing dot in the name.
6 *
7 * @param zoneName the zone name to be validated.
8 * @returns +zoneName+
9 * @throws ValidationError if the name is not valid.
10 */
11export declare function validateZoneName(zoneName: string): void;
12/**
13 * Route53 requires the record names are specified as fully qualified names, but this
14 * forces lots of redundant work on the user (repeating the zone name over and over).
15 * This function allows the user to be lazier and offers a nicer experience, by
16 * qualifying relative names appropriately:
17 *
18 * @param providedName the user-specified name of the record.
19 * @param zoneName the fully-qualified name of the zone the record will be created in.
20 *
21 * @returns <ul>
22 * <li>If +providedName+ ends with a +.+, use it as-is</li>
23 * <li>If +providedName+ ends with or equals +zoneName+, append a trailing +.+</li>
24 * <li>Otherwise, append +.+, +zoneName+ and a trailing +.+</li>
25 * </ul>
26 */
27export declare function determineFullyQualifiedDomainName(providedName: string, hostedZone: IHostedZone): string;
28export declare function makeHostedZoneArn(construct: Construct, hostedZoneId: string): string;