UNPKG

@lbrlabs/pulumi-scaleway

Version:

A Pulumi package for creating and managing scaleway cloud resources.

135 lines 6.11 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.TemDomain = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Creates and manages Scaleway Transactional Email Domains. * For more information see [the documentation](https://developers.scaleway.com/en/products/transactional_email/api/). * * ## Examples * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@lbrlabs/pulumi-scaleway"; * * const main = new scaleway.TemDomain("main", {acceptTos: true}); * ``` * * ### Add the required records to your DNS zone * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@lbrlabs/pulumi-scaleway"; * * const config = new pulumi.Config(); * const domainName = config.require("domainName"); * const main = new scaleway.TemDomain("main", {acceptTos: true}); * const spf = new scaleway.DomainRecord("spf", { * dnsZone: domainName, * type: "TXT", * data: pulumi.interpolate`v=spf1 ${main.spfConfig} -all`, * }); * const dkim = new scaleway.DomainRecord("dkim", { * dnsZone: domainName, * type: "TXT", * data: main.dkimConfig, * }); * const mx = new scaleway.DomainRecord("mx", { * dnsZone: domainName, * type: "MX", * data: ".", * }); * ``` * * ## Import * * Domains can be imported using the `{region}/{id}`, e.g. bash * * ```sh * $ pulumi import scaleway:index/temDomain:TemDomain main fr-par/11111111-1111-1111-1111-111111111111 * ``` */ class TemDomain extends pulumi.CustomResource { /** * Get an existing TemDomain 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, id, state, opts) { return new TemDomain(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of TemDomain. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === TemDomain.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["acceptTos"] = state ? state.acceptTos : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["dkimConfig"] = state ? state.dkimConfig : undefined; resourceInputs["lastError"] = state ? state.lastError : undefined; resourceInputs["lastValidAt"] = state ? state.lastValidAt : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["nextCheckAt"] = state ? state.nextCheckAt : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["revokedAt"] = state ? state.revokedAt : undefined; resourceInputs["smtpHost"] = state ? state.smtpHost : undefined; resourceInputs["smtpPort"] = state ? state.smtpPort : undefined; resourceInputs["smtpPortAlternative"] = state ? state.smtpPortAlternative : undefined; resourceInputs["smtpPortUnsecure"] = state ? state.smtpPortUnsecure : undefined; resourceInputs["smtpsPort"] = state ? state.smtpsPort : undefined; resourceInputs["smtpsPortAlternative"] = state ? state.smtpsPortAlternative : undefined; resourceInputs["spfConfig"] = state ? state.spfConfig : undefined; resourceInputs["status"] = state ? state.status : undefined; } else { const args = argsOrState; if ((!args || args.acceptTos === undefined) && !opts.urn) { throw new Error("Missing required property 'acceptTos'"); } resourceInputs["acceptTos"] = args ? args.acceptTos : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["dkimConfig"] = undefined /*out*/; resourceInputs["lastError"] = undefined /*out*/; resourceInputs["lastValidAt"] = undefined /*out*/; resourceInputs["nextCheckAt"] = undefined /*out*/; resourceInputs["revokedAt"] = undefined /*out*/; resourceInputs["smtpHost"] = undefined /*out*/; resourceInputs["smtpPort"] = undefined /*out*/; resourceInputs["smtpPortAlternative"] = undefined /*out*/; resourceInputs["smtpPortUnsecure"] = undefined /*out*/; resourceInputs["smtpsPort"] = undefined /*out*/; resourceInputs["smtpsPortAlternative"] = undefined /*out*/; resourceInputs["spfConfig"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(TemDomain.__pulumiType, name, resourceInputs, opts); } } exports.TemDomain = TemDomain; /** @internal */ TemDomain.__pulumiType = 'scaleway:index/temDomain:TemDomain'; //# sourceMappingURL=temDomain.js.map