@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
178 lines (177 loc) • 5.66 kB
TypeScript
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"],
* });
* ```
*/
export declare function getZone(args?: GetZoneArgs, opts?: pulumi.InvokeOptions): Promise<GetZoneResult>;
/**
* A collection of arguments for invoking getZone.
*/
export interface GetZoneArgs {
/**
* Hosted Zone name of the desired Hosted Zone.
*/
name?: string;
/**
* Used with `name` field to get a private Hosted Zone.
*/
privateZone?: boolean;
/**
* Used with `name` field. 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. You have to use `zoneId` or `name`, not both of them. The given filter must match exactly one
* Hosted Zone. If you use `name` field for private Hosted Zone, you need to add `privateZone` field to `true`.
*/
tags?: {
[key: string]: string;
};
/**
* Used with `name` field to get a private Hosted Zone associated with the vpcId (in this case, privateZone is not mandatory).
*/
vpcId?: string;
/**
* Hosted Zone id of the desired Hosted Zone.
*/
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;
/**
* 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"],
* });
* ```
*/
export declare function getZoneOutput(args?: GetZoneOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetZoneResult>;
/**
* A collection of arguments for invoking getZone.
*/
export interface GetZoneOutputArgs {
/**
* Hosted Zone name of the desired Hosted Zone.
*/
name?: pulumi.Input<string>;
/**
* Used with `name` field to get a private Hosted Zone.
*/
privateZone?: pulumi.Input<boolean>;
/**
* Used with `name` field. 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. You have to use `zoneId` or `name`, not both of them. The given filter must match exactly one
* Hosted Zone. If you use `name` field for private Hosted Zone, you need to add `privateZone` field to `true`.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Used with `name` field to get a private Hosted Zone associated with the vpcId (in this case, privateZone is not mandatory).
*/
vpcId?: pulumi.Input<string>;
/**
* Hosted Zone id of the desired Hosted Zone.
*/
zoneId?: pulumi.Input<string>;
}