@pulumi/dnsimple
Version:
A Pulumi package for creating and managing dnsimple cloud resources.
156 lines (155 loc) • 4.57 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a DNSimple zone resource.
*
* > Currently the resource creation acts as an import, so the zone must already exist in DNSimple. The only attribute that will be modified during resource creation is the `active` state of the zone. This is because our API does not allow for the creation of zones. Creation of zones happens through the purchase or creation of domains. We expect this behavior to change in the future.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dnsimple from "@pulumi/dnsimple";
*
* // Create a zone
* const foobar = new dnsimple.Zone("foobar", {name: dnsimple.zone});
* ```
*
* ## Import
*
* DNSimple zones can be imported using their numeric record ID or the zone name.
*
* bash
*
* ```sh
* $ pulumi import dnsimple:index/zone:Zone resource_name foo.com
* ```
*
* The zone ID can be found within [DNSimple Zones API](https://developer.dnsimple.com/v2/zones/#getZone). Check out [Authentication](https://developer.dnsimple.com/v2/#authentication) in API Overview for available options.
*
* bash
*
* curl -H 'Authorization: Bearer <ACCESS_TOKEN>' https://api.dnsimple.com/v2/1234/zones/example.com | jq
*
* {
*
* "data": {
*
* "id": 1,
*
* "account_id": 1234,
*
* "name": "example.com",
*
* "reverse": false,
*
* "secondary": false,
*
* "last_transferred_at": null,
*
* "active": true,
*
* "created_at": "2023-04-18T04:58:01Z",
*
* "updated_at": "2024-01-16T15:53:18Z"
*
* }
*
* }
*/
export declare class Zone extends pulumi.CustomResource {
/**
* Get an existing Zone 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?: ZoneState, opts?: pulumi.CustomResourceOptions): Zone;
/**
* Returns true if the given object is an instance of Zone. 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 Zone;
/**
* The account ID for the zone.
*/
readonly accountId: pulumi.Output<number>;
/**
* Whether the zone is active.
*/
readonly active: pulumi.Output<boolean>;
/**
* The last time the zone was transferred only applicable for **secondary** zones.
*/
readonly lastTransferredAt: pulumi.Output<string>;
/**
* The zone name
*
* # Attributes Reference
*/
readonly name: pulumi.Output<string>;
/**
* Whether the zone is a reverse zone.
*/
readonly reverse: pulumi.Output<boolean>;
/**
* Whether the zone is a secondary zone.
*/
readonly secondary: pulumi.Output<boolean>;
/**
* Create a Zone 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: ZoneArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Zone resources.
*/
export interface ZoneState {
/**
* The account ID for the zone.
*/
accountId?: pulumi.Input<number>;
/**
* Whether the zone is active.
*/
active?: pulumi.Input<boolean>;
/**
* The last time the zone was transferred only applicable for **secondary** zones.
*/
lastTransferredAt?: pulumi.Input<string>;
/**
* The zone name
*
* # Attributes Reference
*/
name?: pulumi.Input<string>;
/**
* Whether the zone is a reverse zone.
*/
reverse?: pulumi.Input<boolean>;
/**
* Whether the zone is a secondary zone.
*/
secondary?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a Zone resource.
*/
export interface ZoneArgs {
/**
* Whether the zone is active.
*/
active?: pulumi.Input<boolean>;
/**
* The zone name
*
* # Attributes Reference
*/
name: pulumi.Input<string>;
}