@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
276 lines • 9.76 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* The `scaleway.domain.Registration` resource allows you to purchase and manage domain registrations with Scaleway. Using this resource you can register one or more domains for a specified duration, configure auto-renewal and DNSSEC options, and set contact information. You can supply an owner contact either by providing an existing contact ID or by specifying the complete contact details. The resource automatically returns additional contact information (administrative and technical) as provided by the Scaleway API.
*
* Refer to the [Domains and DNS documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/) and the [API documentation](https://developers.scaleway.com/) for more details.
*
* ## Example Usage
*
* ### Purchase a Single Domain
*
* The following example purchases a domain with a one-year registration period and specifies the owner contact details. Administrative and technical contacts are returned by the API.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const test = new scaleway.domain.Registration("test", {
* domainNames: ["example.com"],
* durationInYears: 1,
* ownerContact: {
* legalForm: "individual",
* firstname: "John",
* lastname: "DOE",
* email: "john.doe@example.com",
* phoneNumber: "+1.23456789",
* addressLine1: "123 Main Street",
* city: "Paris",
* zip: "75001",
* country: "FR",
* vatIdentificationCode: "FR12345678901",
* companyIdentificationCode: "123456789",
* },
* });
* ```
*
* ### Update Domain Settings
*
* You can update the resource to enable auto-renewal and DNSSEC:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const test = new scaleway.domain.Registration("test", {
* domainNames: ["example.com"],
* durationInYears: 1,
* ownerContact: {
* legalForm: "individual",
* firstname: "John",
* lastname: "DOE",
* email: "john.doe@example.com",
* phoneNumber: "+1.23456789",
* addressLine1: "123 Main Street",
* city: "Paris",
* zip: "75001",
* country: "FR",
* vatIdentificationCode: "FR12345678901",
* companyIdentificationCode: "123456789",
* },
* autoRenew: true,
* dnssec: true,
* });
* ```
*
* ### Purchase Multiple Domains
*
* The following example registers several domains in one go:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const multi = new scaleway.domain.Registration("multi", {
* domainNames: [
* "domain1.com",
* "domain2.com",
* "domain3.com",
* ],
* durationInYears: 1,
* ownerContact: {
* legalForm: "individual",
* firstname: "John",
* lastname: "DOE",
* email: "john.doe@example.com",
* phoneNumber: "+1.23456789",
* addressLine1: "123 Main Street",
* city: "Paris",
* zip: "75001",
* country: "FR",
* vatIdentificationCode: "FR12345678901",
* companyIdentificationCode: "123456789",
* },
* });
* ```
*
* ## Contact Blocks
*
* Each contact block supports the following attributes:
*
* - `legalForm` (Required, String): Legal form of the contact.
* - `firstname` (Required, String): First name.
* - `lastname` (Required, String): Last name.
* - `companyName` (Optional, String): Company name.
* - `email` (Required, String): Primary email.
* - `phoneNumber` (Required, String): Primary phone number.
* - `addressLine1` (Required, String): Primary address.
* - `zip` (Required, String): Postal code.
* - `city` (Required, String): City.
* - `country` (Required, String): Country code (ISO format).
* - `vatIdentificationCode` (Required, String): VAT identification code.
* - `companyIdentificationCode` (Required, String): Company identification code.
*
* ## Import
*
* To import an existing domain registration, use:
*
* ```sh
* $ pulumi import scaleway:domain/registration:Registration test <project_id>/<task_id>
* ```
*
* You can use the scaleway.domain.Registration data source to look up the `taskId` and `projectId` by domain name.
*/
export declare class Registration extends pulumi.CustomResource {
/**
* Get an existing Registration 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?: RegistrationState, opts?: pulumi.CustomResourceOptions): Registration;
/**
* Returns true if the given object is an instance of Registration. 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 Registration;
/**
* : Administrative contact information.
*/
readonly administrativeContacts: pulumi.Output<outputs.domain.RegistrationAdministrativeContact[]>;
/**
* : Enables or disables auto-renewal.
*/
readonly autoRenew: pulumi.Output<boolean | undefined>;
/**
* : Enables or disables DNSSEC.
*/
readonly dnssec: pulumi.Output<boolean | undefined>;
/**
* : A list of domain names to be registered.
*/
readonly domainNames: pulumi.Output<string[]>;
/**
* DNSSEC DS record configuration.
*/
readonly dsRecords: pulumi.Output<outputs.domain.RegistrationDsRecord[]>;
/**
* : The registration period in years.
*/
readonly durationInYears: pulumi.Output<number | undefined>;
/**
* : Details of the owner contact.
*/
readonly ownerContact: pulumi.Output<outputs.domain.RegistrationOwnerContact>;
/**
* : The ID of an existing owner contact.
*/
readonly ownerContactId: pulumi.Output<string>;
/**
* : The Scaleway project ID.
*/
readonly projectId: pulumi.Output<string>;
/**
* ID of the task that created the domain.
*/
readonly taskId: pulumi.Output<string>;
/**
* : Technical contact information.
*/
readonly technicalContacts: pulumi.Output<outputs.domain.RegistrationTechnicalContact[]>;
/**
* Create a Registration 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: RegistrationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Registration resources.
*/
export interface RegistrationState {
/**
* : Administrative contact information.
*/
administrativeContacts?: pulumi.Input<pulumi.Input<inputs.domain.RegistrationAdministrativeContact>[] | undefined>;
/**
* : Enables or disables auto-renewal.
*/
autoRenew?: pulumi.Input<boolean | undefined>;
/**
* : Enables or disables DNSSEC.
*/
dnssec?: pulumi.Input<boolean | undefined>;
/**
* : A list of domain names to be registered.
*/
domainNames?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* DNSSEC DS record configuration.
*/
dsRecords?: pulumi.Input<pulumi.Input<inputs.domain.RegistrationDsRecord>[] | undefined>;
/**
* : The registration period in years.
*/
durationInYears?: pulumi.Input<number | undefined>;
/**
* : Details of the owner contact.
*/
ownerContact?: pulumi.Input<inputs.domain.RegistrationOwnerContact | undefined>;
/**
* : The ID of an existing owner contact.
*/
ownerContactId?: pulumi.Input<string | undefined>;
/**
* : The Scaleway project ID.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* ID of the task that created the domain.
*/
taskId?: pulumi.Input<string | undefined>;
/**
* : Technical contact information.
*/
technicalContacts?: pulumi.Input<pulumi.Input<inputs.domain.RegistrationTechnicalContact>[] | undefined>;
}
/**
* The set of arguments for constructing a Registration resource.
*/
export interface RegistrationArgs {
/**
* : Enables or disables auto-renewal.
*/
autoRenew?: pulumi.Input<boolean | undefined>;
/**
* : Enables or disables DNSSEC.
*/
dnssec?: pulumi.Input<boolean | undefined>;
/**
* : A list of domain names to be registered.
*/
domainNames: pulumi.Input<pulumi.Input<string>[]>;
/**
* : The registration period in years.
*/
durationInYears?: pulumi.Input<number | undefined>;
/**
* : Details of the owner contact.
*/
ownerContact?: pulumi.Input<inputs.domain.RegistrationOwnerContact | undefined>;
/**
* : The ID of an existing owner contact.
*/
ownerContactId?: pulumi.Input<string | undefined>;
/**
* : The Scaleway project ID.
*/
projectId?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=registration.d.ts.map