UNPKG

@pulumi/aws

Version:

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

175 lines 6.34 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.ResponsePlan = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage response plans in AWS Systems Manager Incident Manager. * * > NOTE: A response plan 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 ResponsePlan Resource. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ssmincidents.ResponsePlan("example", { * name: "name", * incidentTemplate: { * title: "title", * impact: 3, * }, * tags: { * key: "value", * }, * }, { * dependsOn: [exampleAwsSsmincidentsReplicationSet], * }); * ``` * * ### Usage With All Fields * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ssmincidents.ResponsePlan("example", { * name: "name", * incidentTemplate: { * title: "title", * impact: 3, * dedupeString: "dedupe", * incidentTags: { * key: "value", * }, * notificationTargets: [ * { * snsTopicArn: example1.arn, * }, * { * snsTopicArn: example2.arn, * }, * ], * summary: "summary", * }, * displayName: "display name", * chatChannels: [topic.arn], * engagements: ["arn:aws:ssm-contacts:us-east-2:111122223333:contact/test1"], * action: { * ssmAutomations: [{ * documentName: document1.name, * roleArn: role1.arn, * documentVersion: "version1", * targetAccount: "RESPONSE_PLAN_OWNER_ACCOUNT", * parameters: [ * { * name: "key", * values: [ * "value1", * "value2", * ], * }, * { * name: "foo", * values: ["bar"], * }, * ], * dynamicParameters: { * someKey: "INVOLVED_RESOURCES", * anotherKey: "INCIDENT_RECORD_ARN", * }, * }], * }, * integration: { * pagerduties: [{ * name: "pagerdutyIntergration", * serviceId: "example", * secretId: "example", * }], * }, * tags: { * key: "value", * }, * }, { * dependsOn: [exampleAwsSsmincidentsReplicationSet], * }); * ``` * * ## Import * * Using `pulumi import`, import an Incident Manager response plan using the response plan ARN. You can find the response plan ARN in the AWS Management Console. For example: * * ```sh * $ pulumi import aws:ssmincidents/responsePlan:ResponsePlan responsePlanName ARNValue * ``` */ class ResponsePlan extends pulumi.CustomResource { /** * Get an existing ResponsePlan 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 ResponsePlan(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ResponsePlan. 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'] === ResponsePlan.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["action"] = state?.action; resourceInputs["arn"] = state?.arn; resourceInputs["chatChannels"] = state?.chatChannels; resourceInputs["displayName"] = state?.displayName; resourceInputs["engagements"] = state?.engagements; resourceInputs["incidentTemplate"] = state?.incidentTemplate; resourceInputs["integration"] = state?.integration; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.incidentTemplate === undefined && !opts.urn) { throw new Error("Missing required property 'incidentTemplate'"); } resourceInputs["action"] = args?.action; resourceInputs["chatChannels"] = args?.chatChannels; resourceInputs["displayName"] = args?.displayName; resourceInputs["engagements"] = args?.engagements; resourceInputs["incidentTemplate"] = args?.incidentTemplate; resourceInputs["integration"] = args?.integration; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ResponsePlan.__pulumiType, name, resourceInputs, opts); } } exports.ResponsePlan = ResponsePlan; /** @internal */ ResponsePlan.__pulumiType = 'aws:ssmincidents/responsePlan:ResponsePlan'; //# sourceMappingURL=responsePlan.js.map