UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

222 lines (221 loc) 6.86 kB
import * as pulumi from "@pulumi/pulumi"; /** * `aws.route53.Zone` provides details about a specific Route 53 Hosted Zone. * * This data source allows to find a Hosted Zone ID given Hosted Zone name and certain search criteria. * * ## Example Usage * * The following example shows how to get a Hosted Zone from its name and from this data how to create a Record Set. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const selected = aws.route53.getZone({ * name: "test.com.", * privateZone: true, * }); * const www = new aws.route53.Record("www", { * zoneId: selected.then(selected => selected.zoneId), * name: selected.then(selected => `www.${selected.name}`), * type: aws.route53.RecordType.A, * ttl: 300, * records: ["10.0.0.1"], * }); * ``` * * The following example shows how to get a Hosted Zone from a unique combination of its tags: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const selected = aws.route53.getZone({ * tags: { * scope: "local", * category: "api", * }, * }); * export const localApiZone = selected.then(selected => selected.zoneId); * ``` */ export declare function getZone(args?: GetZoneArgs, opts?: pulumi.InvokeOptions): Promise<GetZoneResult>; /** * A collection of arguments for invoking getZone. */ export interface GetZoneArgs { /** * Boolean to indicate whether to enable accelerated recovery for the hosted zone. */ enableAcceleratedRecovery?: boolean; /** * Hosted Zone name of the desired Hosted Zone. If blank, then accept any name, filtering on only `privateZone`, `vpcId` and `tags`. */ name?: string; /** * Filter to only private Hosted Zones. */ privateZone?: boolean; /** * A map of tags, each pair of which must exactly match a pair on the desired Hosted Zone. * * The arguments of this data source act as filters for querying the available Hosted Zone. * * - The given filter must match exactly one Hosted Zone. */ tags?: { [key: string]: string; }; /** * Filter to private Hosted Zones associated with the specified `vpcId`. */ vpcId?: string; /** * and `name` are mutually exclusive. * - If you use the `name` argument for a private Hosted Zone, you need to set the `privateZone` argument to `true`. */ zoneId?: string; } /** * A collection of values returned by getZone. */ export interface GetZoneResult { /** * ARN of the Hosted Zone. */ readonly arn: string; /** * Caller Reference of the Hosted Zone. */ readonly callerReference: string; /** * Comment field of the Hosted Zone. */ readonly comment: string; /** * Boolean to indicate whether to enable accelerated recovery for the hosted zone. */ readonly enableAcceleratedRecovery?: boolean; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The description provided by the service that created the Hosted Zone (e.g., `arn:aws:servicediscovery:us-east-1:1234567890:namespace/ns-xxxxxxxxxxxxxxxx`). */ readonly linkedServiceDescription: string; /** * The service that created the Hosted Zone (e.g., `servicediscovery.amazonaws.com`). */ readonly linkedServicePrincipal: string; /** * The Hosted Zone name. */ readonly name: string; /** * List of DNS name servers for the Hosted Zone. */ readonly nameServers: string[]; /** * The Route 53 name server that created the SOA record. */ readonly primaryNameServer: string; /** * Indicates whether this is a private hosted zone. */ readonly privateZone?: boolean; /** * The number of Record Set in the Hosted Zone. */ readonly resourceRecordSetCount: number; /** * A map of tags assigned to the Hosted Zone. */ readonly tags: { [key: string]: string; }; readonly vpcId?: string; /** * The Hosted Zone identifier. */ readonly zoneId: string; } /** * `aws.route53.Zone` provides details about a specific Route 53 Hosted Zone. * * This data source allows to find a Hosted Zone ID given Hosted Zone name and certain search criteria. * * ## Example Usage * * The following example shows how to get a Hosted Zone from its name and from this data how to create a Record Set. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const selected = aws.route53.getZone({ * name: "test.com.", * privateZone: true, * }); * const www = new aws.route53.Record("www", { * zoneId: selected.then(selected => selected.zoneId), * name: selected.then(selected => `www.${selected.name}`), * type: aws.route53.RecordType.A, * ttl: 300, * records: ["10.0.0.1"], * }); * ``` * * The following example shows how to get a Hosted Zone from a unique combination of its tags: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const selected = aws.route53.getZone({ * tags: { * scope: "local", * category: "api", * }, * }); * export const localApiZone = selected.then(selected => selected.zoneId); * ``` */ export declare function getZoneOutput(args?: GetZoneOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetZoneResult>; /** * A collection of arguments for invoking getZone. */ export interface GetZoneOutputArgs { /** * Boolean to indicate whether to enable accelerated recovery for the hosted zone. */ enableAcceleratedRecovery?: pulumi.Input<boolean>; /** * Hosted Zone name of the desired Hosted Zone. If blank, then accept any name, filtering on only `privateZone`, `vpcId` and `tags`. */ name?: pulumi.Input<string>; /** * Filter to only private Hosted Zones. */ privateZone?: pulumi.Input<boolean>; /** * A map of tags, each pair of which must exactly match a pair on the desired Hosted Zone. * * The arguments of this data source act as filters for querying the available Hosted Zone. * * - The given filter must match exactly one Hosted Zone. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Filter to private Hosted Zones associated with the specified `vpcId`. */ vpcId?: pulumi.Input<string>; /** * and `name` are mutually exclusive. * - If you use the `name` argument for a private Hosted Zone, you need to set the `privateZone` argument to `true`. */ zoneId?: pulumi.Input<string>; }