@pulumi/dnsimple
Version:
A Pulumi package for creating and managing dnsimple cloud resources.
257 lines (256 loc) • 10.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Provides a DNSimple registered domain resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dnsimple from "@pulumi/dnsimple";
*
* const aliceMain = new dnsimple.Contact("alice_main", {
* label: "Alice Appleseed",
* firstName: "Alice Main",
* lastName: "Appleseed",
* organizationName: "Contoso",
* jobTitle: "Manager",
* address1: "Level 1, 2 Main St",
* address2: "Marsfield",
* city: "San Francisco",
* stateProvince: "California",
* postalCode: "90210",
* country: "US",
* phone: "+1401239523",
* fax: "+1849491024",
* email: "apple@contoso.com",
* });
* const appleseedBio = new dnsimple.RegisteredDomain("appleseed_bio", {
* name: "appleseed.bio",
* contactId: aliceMain.id,
* autoRenewEnabled: true,
* transferLockEnabled: true,
* whoisPrivacyEnabled: true,
* dnssecEnabled: false,
* extendedAttributes: {
* bio_agree: "I Agree",
* },
* });
* ```
*
* ## Import
*
* DNSimple registered domains can be imported using their domain name and **optionally** with domain registration ID.
*
* **Importing registered domain example.com**
*
* bash
*
* ```sh
* $ pulumi import dnsimple:index/registeredDomain:RegisteredDomain resource_name example.com
* ```
*
* **Importing registered domain example.com with domain registration ID 1234**
*
* bash
*
* ```sh
* $ pulumi import dnsimple:index/registeredDomain:RegisteredDomain resource_name example.com_1234
* ```
*/
export declare class RegisteredDomain extends pulumi.CustomResource {
/**
* Get an existing RegisteredDomain resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RegisteredDomainState, opts?: pulumi.CustomResourceOptions): RegisteredDomain;
/**
* Returns true if the given object is an instance of RegisteredDomain. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is RegisteredDomain;
readonly accountId: pulumi.Output<number>;
/**
* Whether the domain should be set to auto-renew (default: `false`)
*/
readonly autoRenewEnabled: pulumi.Output<boolean>;
/**
* The ID of the contact to be used for the domain registration. The contact ID can be changed after the domain has been registered. The change will result in a new registrant change this may result in a [60-day lock](https://support.dnsimple.com/articles/icann-60-day-lock-registrant-change/).
*/
readonly contactId: pulumi.Output<number>;
/**
* Whether the domain should have DNSSEC enabled (default: `false`)
*/
readonly dnssecEnabled: pulumi.Output<boolean>;
/**
* The domain registration details. (see below for nested schema)
*
* <a id="nestedblock--timeouts"></a>
*/
readonly domainRegistration: pulumi.Output<outputs.RegisteredDomainDomainRegistration>;
readonly expiresAt: pulumi.Output<string>;
/**
* A map of extended attributes to be set for the domain registration. To see if there are any required extended attributes for any TLD use our [Lists the TLD Extended Attributes API](https://developer.dnsimple.com/v2/tlds/#getTldExtendedAttributes). The values provided in the `extendedAttributes` will also be sent when a registrant change is initiated as part of changing the `contactId`.
*/
readonly extendedAttributes: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The domain name to be registered
*/
readonly name: pulumi.Output<string>;
/**
* The premium price for the domain registration. This is only required if the domain is a premium domain. You can use our [Check domain API](https://developer.dnsimple.com/v2/registrar/#checkDomain) to check if a domain is premium. And [Retrieve domain prices API](https://developer.dnsimple.com/v2/registrar/#getDomainPrices) to retrieve the premium price for a domain.
*/
readonly premiumPrice: pulumi.Output<string | undefined>;
/**
* The registrant change details.
*/
readonly registrantChange: pulumi.Output<outputs.RegisteredDomainRegistrantChange>;
/**
* The state of the domain.
*/
readonly state: pulumi.Output<string>;
/**
* (see below for nested schema)
*
* # Attributes Reference
*/
readonly timeouts: pulumi.Output<outputs.RegisteredDomainTimeouts | undefined>;
/**
* Whether the domain transfer lock protection is enabled (default: `true`)
*/
readonly transferLockEnabled: pulumi.Output<boolean>;
/**
* The domain name in Unicode format.
*/
readonly unicodeName: pulumi.Output<string>;
/**
* Whether the domain should have WhoIs privacy enabled (default: `false`)
*/
readonly whoisPrivacyEnabled: pulumi.Output<boolean>;
/**
* Create a RegisteredDomain resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: RegisteredDomainArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RegisteredDomain resources.
*/
export interface RegisteredDomainState {
accountId?: pulumi.Input<number>;
/**
* Whether the domain should be set to auto-renew (default: `false`)
*/
autoRenewEnabled?: pulumi.Input<boolean>;
/**
* The ID of the contact to be used for the domain registration. The contact ID can be changed after the domain has been registered. The change will result in a new registrant change this may result in a [60-day lock](https://support.dnsimple.com/articles/icann-60-day-lock-registrant-change/).
*/
contactId?: pulumi.Input<number>;
/**
* Whether the domain should have DNSSEC enabled (default: `false`)
*/
dnssecEnabled?: pulumi.Input<boolean>;
/**
* The domain registration details. (see below for nested schema)
*
* <a id="nestedblock--timeouts"></a>
*/
domainRegistration?: pulumi.Input<inputs.RegisteredDomainDomainRegistration>;
expiresAt?: pulumi.Input<string>;
/**
* A map of extended attributes to be set for the domain registration. To see if there are any required extended attributes for any TLD use our [Lists the TLD Extended Attributes API](https://developer.dnsimple.com/v2/tlds/#getTldExtendedAttributes). The values provided in the `extendedAttributes` will also be sent when a registrant change is initiated as part of changing the `contactId`.
*/
extendedAttributes?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The domain name to be registered
*/
name?: pulumi.Input<string>;
/**
* The premium price for the domain registration. This is only required if the domain is a premium domain. You can use our [Check domain API](https://developer.dnsimple.com/v2/registrar/#checkDomain) to check if a domain is premium. And [Retrieve domain prices API](https://developer.dnsimple.com/v2/registrar/#getDomainPrices) to retrieve the premium price for a domain.
*/
premiumPrice?: pulumi.Input<string>;
/**
* The registrant change details.
*/
registrantChange?: pulumi.Input<inputs.RegisteredDomainRegistrantChange>;
/**
* The state of the domain.
*/
state?: pulumi.Input<string>;
/**
* (see below for nested schema)
*
* # Attributes Reference
*/
timeouts?: pulumi.Input<inputs.RegisteredDomainTimeouts>;
/**
* Whether the domain transfer lock protection is enabled (default: `true`)
*/
transferLockEnabled?: pulumi.Input<boolean>;
/**
* The domain name in Unicode format.
*/
unicodeName?: pulumi.Input<string>;
/**
* Whether the domain should have WhoIs privacy enabled (default: `false`)
*/
whoisPrivacyEnabled?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a RegisteredDomain resource.
*/
export interface RegisteredDomainArgs {
/**
* Whether the domain should be set to auto-renew (default: `false`)
*/
autoRenewEnabled?: pulumi.Input<boolean>;
/**
* The ID of the contact to be used for the domain registration. The contact ID can be changed after the domain has been registered. The change will result in a new registrant change this may result in a [60-day lock](https://support.dnsimple.com/articles/icann-60-day-lock-registrant-change/).
*/
contactId: pulumi.Input<number>;
/**
* Whether the domain should have DNSSEC enabled (default: `false`)
*/
dnssecEnabled?: pulumi.Input<boolean>;
/**
* A map of extended attributes to be set for the domain registration. To see if there are any required extended attributes for any TLD use our [Lists the TLD Extended Attributes API](https://developer.dnsimple.com/v2/tlds/#getTldExtendedAttributes). The values provided in the `extendedAttributes` will also be sent when a registrant change is initiated as part of changing the `contactId`.
*/
extendedAttributes?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The domain name to be registered
*/
name: pulumi.Input<string>;
/**
* The premium price for the domain registration. This is only required if the domain is a premium domain. You can use our [Check domain API](https://developer.dnsimple.com/v2/registrar/#checkDomain) to check if a domain is premium. And [Retrieve domain prices API](https://developer.dnsimple.com/v2/registrar/#getDomainPrices) to retrieve the premium price for a domain.
*/
premiumPrice?: pulumi.Input<string>;
/**
* (see below for nested schema)
*
* # Attributes Reference
*/
timeouts?: pulumi.Input<inputs.RegisteredDomainTimeouts>;
/**
* Whether the domain transfer lock protection is enabled (default: `true`)
*/
transferLockEnabled?: pulumi.Input<boolean>;
/**
* Whether the domain should have WhoIs privacy enabled (default: `false`)
*/
whoisPrivacyEnabled?: pulumi.Input<boolean>;
}