UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

106 lines 4.55 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.AlternativeContact = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages the specified alternate contact attached to an AWS Account. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const operations = new aws.account.AlternativeContact("operations", { * alternateContactType: "OPERATIONS", * name: "Example", * title: "Example", * emailAddress: "test@example.com", * phoneNumber: "+1234567890", * }); * ``` * * ## Import * * Import the Alternate Contact for another account using the `account_id` and `alternate_contact_type` separated by a forward slash (`/`): * * __Using `pulumi import` to import__ the Alternate Contact for the current or another account using the `alternate_contact_type`. For example: * * Import the Alternate Contact for the current account: * * ```sh * $ pulumi import aws:account/alternativeContact:AlternativeContact operations OPERATIONS * ``` * Import the Alternate Contact for another account using the `account_id` and `alternate_contact_type` separated by a forward slash (`/`): * * ```sh * $ pulumi import aws:account/alternativeContact:AlternativeContact operations 1234567890/OPERATIONS * ``` */ class AlternativeContact extends pulumi.CustomResource { /** * Get an existing AlternativeContact 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 AlternativeContact(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AlternativeContact. 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'] === AlternativeContact.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountId"] = state?.accountId; resourceInputs["alternateContactType"] = state?.alternateContactType; resourceInputs["emailAddress"] = state?.emailAddress; resourceInputs["name"] = state?.name; resourceInputs["phoneNumber"] = state?.phoneNumber; resourceInputs["title"] = state?.title; } else { const args = argsOrState; if (args?.alternateContactType === undefined && !opts.urn) { throw new Error("Missing required property 'alternateContactType'"); } if (args?.emailAddress === undefined && !opts.urn) { throw new Error("Missing required property 'emailAddress'"); } if (args?.phoneNumber === undefined && !opts.urn) { throw new Error("Missing required property 'phoneNumber'"); } if (args?.title === undefined && !opts.urn) { throw new Error("Missing required property 'title'"); } resourceInputs["accountId"] = args?.accountId; resourceInputs["alternateContactType"] = args?.alternateContactType; resourceInputs["emailAddress"] = args?.emailAddress; resourceInputs["name"] = args?.name; resourceInputs["phoneNumber"] = args?.phoneNumber; resourceInputs["title"] = args?.title; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AlternativeContact.__pulumiType, name, resourceInputs, opts); } } exports.AlternativeContact = AlternativeContact; /** @internal */ AlternativeContact.__pulumiType = 'aws:account/alternativeContact:AlternativeContact'; //# sourceMappingURL=alternativeContact.js.map