UNPKG

@pulumi/aws

Version:

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

120 lines 4.17 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.Contact = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS SSM Contact. * * > **NOTE:** A contact implicitly depends on a replication set. If you configured your replication set in Pulumi, we recommend you add it to the `dependsOn` argument for the Contact Resource. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ssmcontacts.Contact("example", { * alias: "alias", * type: "PERSONAL", * }, { * dependsOn: [exampleAwsSsmincidentsReplicationSet], * }); * ``` * * ### Usage With All Fields * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ssmcontacts.Contact("example", { * alias: "alias", * displayName: "displayName", * type: "ESCALATION", * tags: { * key: "value", * }, * }, { * dependsOn: [exampleAwsSsmincidentsReplicationSet], * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * - `arn` (String) Amazon Resource Name (ARN) of the contact. * * Using `pulumi import`, import SSM Contact using the `ARN`. For example: * * console * * % pulumi import aws_ssmcontacts_contact.example {ARNValue} */ class Contact extends pulumi.CustomResource { /** * Get an existing Contact 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 Contact(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Contact. 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'] === Contact.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["alias"] = state?.alias; resourceInputs["arn"] = state?.arn; resourceInputs["displayName"] = state?.displayName; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.alias === undefined && !opts.urn) { throw new Error("Missing required property 'alias'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["alias"] = args?.alias; resourceInputs["displayName"] = args?.displayName; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["type"] = args?.type; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Contact.__pulumiType, name, resourceInputs, opts); } } exports.Contact = Contact; /** @internal */ Contact.__pulumiType = 'aws:ssmcontacts/contact:Contact'; //# sourceMappingURL=contact.js.map