aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
31 lines (30 loc) • 1.48 kB
TypeScript
import { Construct } from 'constructs';
import { IHostedZone } from './hosted-zone-ref';
import * as iam from '../../aws-iam';
/**
* Validates a zone name is valid by Route53 specific naming rules,
* and that there is no trailing dot in the name.
*
* @param zoneName the zone name to be validated.
* @returns +zoneName+
* @throws ValidationError if the name is not valid.
*/
export declare function validateZoneName(zoneName: string): void;
/**
* Route53 requires the record names are specified as fully qualified names, but this
* forces lots of redundant work on the user (repeating the zone name over and over).
* This function allows the user to be lazier and offers a nicer experience, by
* qualifying relative names appropriately:
*
* @param providedName the user-specified name of the record.
* @param zoneName the fully-qualified name of the zone the record will be created in.
*
* @returns <ul>
* <li>If +providedName+ ends with a +.+, use it as-is</li>
* <li>If +providedName+ ends with or equals +zoneName+, append a trailing +.+</li>
* <li>Otherwise, append +.+, +zoneName+ and a trailing +.+</li>
* </ul>
*/
export declare function determineFullyQualifiedDomainName(providedName: string, hostedZone: IHostedZone): string;
export declare function makeHostedZoneArn(construct: Construct, hostedZoneId: string): string;
export declare function makeGrantDelegation(grantee: iam.IGrantable, hostedZoneArn: string): iam.Grant;