UNPKG

@pulumi/aws

Version:

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

193 lines 6.61 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.ContactsRotation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ssm.ContactsRotation("example", { * contactIds: [exampleAwsSsmcontactsContact.arn], * name: "rotation", * recurrence: { * numberOfOnCalls: 1, * recurrenceMultiplier: 1, * dailySettings: [{ * hourOfDay: 9, * minuteOfHour: 0, * }], * }, * timeZoneId: "Australia/Sydney", * }, { * dependsOn: [exampleAwsSsmincidentsReplicationSet], * }); * ``` * * ### Usage with Weekly Settings and Shift Coverages Fields * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ssm.ContactsRotation("example", { * contactIds: [exampleAwsSsmcontactsContact.arn], * name: "rotation", * recurrence: { * numberOfOnCalls: 1, * recurrenceMultiplier: 1, * weeklySettings: [ * { * dayOfWeek: "WED", * handOffTime: { * hourOfDay: 4, * minuteOfHour: 25, * }, * }, * { * dayOfWeek: "FRI", * handOffTime: { * hourOfDay: 15, * minuteOfHour: 57, * }, * }, * ], * shiftCoverages: [{ * mapBlockKey: "MON", * coverageTimes: [{ * start: { * hourOfDay: 1, * minuteOfHour: 0, * }, * end: { * hourOfDay: 23, * minuteOfHour: 0, * }, * }], * }], * }, * startTime: "2023-07-20T02:21:49+00:00", * timeZoneId: "Australia/Sydney", * tags: { * key1: "tag1", * key2: "tag2", * }, * }, { * dependsOn: [exampleAwsSsmincidentsReplicationSet], * }); * ``` * * ### Usage with Monthly Settings Fields * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ssm.ContactsRotation("example", { * contactIds: [exampleAwsSsmcontactsContact.arn], * name: "rotation", * recurrence: { * numberOfOnCalls: 1, * recurrenceMultiplier: 1, * monthlySettings: [ * { * dayOfMonth: 20, * handOffTime: { * hourOfDay: 8, * minuteOfHour: 0, * }, * }, * { * dayOfMonth: 13, * handOffTime: { * hourOfDay: 12, * minuteOfHour: 34, * }, * }, * ], * }, * timeZoneId: "Australia/Sydney", * }, { * dependsOn: [exampleAwsSsmincidentsReplicationSet], * }); * ``` * * ## Import * * Using `pulumi import`, import CodeGuru Profiler Profiling Group using the `arn`. For example: * * ```sh * $ pulumi import aws:ssm/contactsRotation:ContactsRotation example arn:aws:ssm-contacts:us-east-1:012345678910:rotation/example * ``` */ class ContactsRotation extends pulumi.CustomResource { /** * Get an existing ContactsRotation 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 ContactsRotation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ContactsRotation. 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'] === ContactsRotation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["contactIds"] = state?.contactIds; resourceInputs["name"] = state?.name; resourceInputs["recurrence"] = state?.recurrence; resourceInputs["region"] = state?.region; resourceInputs["startTime"] = state?.startTime; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeZoneId"] = state?.timeZoneId; } else { const args = argsOrState; if (args?.contactIds === undefined && !opts.urn) { throw new Error("Missing required property 'contactIds'"); } if (args?.timeZoneId === undefined && !opts.urn) { throw new Error("Missing required property 'timeZoneId'"); } resourceInputs["contactIds"] = args?.contactIds; resourceInputs["name"] = args?.name; resourceInputs["recurrence"] = args?.recurrence; resourceInputs["region"] = args?.region; resourceInputs["startTime"] = args?.startTime; resourceInputs["tags"] = args?.tags; resourceInputs["timeZoneId"] = args?.timeZoneId; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ContactsRotation.__pulumiType, name, resourceInputs, opts); } } exports.ContactsRotation = ContactsRotation; /** @internal */ ContactsRotation.__pulumiType = 'aws:ssm/contactsRotation:ContactsRotation'; //# sourceMappingURL=contactsRotation.js.map