UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

99 lines 4.19 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.BlockedList = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Creates and manages blocklisted email addresses for a Scaleway Transactional Email Domain. * For more information refer to the [API documentation](https://www.scaleway.com/en/developers/api/transactional-email/#post-transactional-email-v1alpha1-regions-region-blocklists). * * ## Example Usage * * ### Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const test = new scaleway.tem.BlockedList("test", { * domainId: "fr-par/12345678-1234-1234-1234-123456789abc", * email: "spam@example.com", * type: "mailbox_full", * reason: "Spam detected", * region: "fr-par", * }); * ``` * * ## Import * * Blocklists can be imported using the `{region}/{id}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:tem/blockedList:BlockedList test fr-par/11111111-1111-1111-1111-111111111111 * ``` */ class BlockedList extends pulumi.CustomResource { /** * Get an existing BlockedList 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 BlockedList(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BlockedList. 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'] === BlockedList.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["domainId"] = state ? state.domainId : undefined; resourceInputs["email"] = state ? state.email : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["reason"] = state ? state.reason : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.domainId === undefined) && !opts.urn) { throw new Error("Missing required property 'domainId'"); } if ((!args || args.email === undefined) && !opts.urn) { throw new Error("Missing required property 'email'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["domainId"] = args ? args.domainId : undefined; resourceInputs["email"] = args ? args.email : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["reason"] = args ? args.reason : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["type"] = args ? args.type : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BlockedList.__pulumiType, name, resourceInputs, opts); } } exports.BlockedList = BlockedList; /** @internal */ BlockedList.__pulumiType = 'scaleway:tem/blockedList:BlockedList'; //# sourceMappingURL=blockedList.js.map