31 lines
1.6 KiB
TypeScript
31 lines
1.6 KiB
TypeScript
import type { Construct } from 'constructs';
|
|
import type { GrantDelegationOptions, IHostedZone, INamedHostedZoneRef } 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, hostedZone: INamedHostedZoneRef, delegationOptions?: GrantDelegationOptions): iam.Grant;
|