@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
90 lines (89 loc) • 2.56 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Get information on a domain. This data source provides the name, TTL, and zone
* file as configured on your DigitalOcean account. This is useful if the domain
* name in question is not managed by this provider or you need to utilize TTL or zone
* file data.
*
* An error is triggered if the provided domain name is not managed with your
* DigitalOcean account.
*
* ## Example Usage
*
* Get the zone file for a domain:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const example = digitalocean.getDomain({
* name: "example.com",
* });
* export const domainOutput = example.then(example => example.zoneFile);
* ```
*/
export declare function getDomain(args: GetDomainArgs, opts?: pulumi.InvokeOptions): Promise<GetDomainResult>;
/**
* A collection of arguments for invoking getDomain.
*/
export interface GetDomainArgs {
/**
* The name of the domain.
*/
name: string;
}
/**
* A collection of values returned by getDomain.
*/
export interface GetDomainResult {
/**
* The uniform resource name of the domain
*/
readonly domainUrn: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly name: string;
/**
* The TTL of the domain.
*/
readonly ttl: number;
/**
* The zone file of the domain.
*/
readonly zoneFile: string;
}
/**
* Get information on a domain. This data source provides the name, TTL, and zone
* file as configured on your DigitalOcean account. This is useful if the domain
* name in question is not managed by this provider or you need to utilize TTL or zone
* file data.
*
* An error is triggered if the provided domain name is not managed with your
* DigitalOcean account.
*
* ## Example Usage
*
* Get the zone file for a domain:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const example = digitalocean.getDomain({
* name: "example.com",
* });
* export const domainOutput = example.then(example => example.zoneFile);
* ```
*/
export declare function getDomainOutput(args: GetDomainOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDomainResult>;
/**
* A collection of arguments for invoking getDomain.
*/
export interface GetDomainOutputArgs {
/**
* The name of the domain.
*/
name: pulumi.Input<string>;
}