@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
129 lines • 5.1 kB
JavaScript
;
// *** 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.HoursOfOperation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Amazon Connect Hours of Operation resource. For more information see
* [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.connect.HoursOfOperation("test", {
* instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
* name: "Office Hours",
* description: "Monday office hours",
* timeZone: "EST",
* configs: [
* {
* day: "MONDAY",
* endTime: {
* hours: 23,
* minutes: 8,
* },
* startTime: {
* hours: 8,
* minutes: 0,
* },
* },
* {
* day: "TUESDAY",
* endTime: {
* hours: 21,
* minutes: 0,
* },
* startTime: {
* hours: 9,
* minutes: 0,
* },
* },
* ],
* tags: {
* Name: "Example Hours of Operation",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Amazon Connect Hours of Operations using the `instance_id` and `hours_of_operation_id` separated by a colon (`:`). For example:
*
* ```sh
* $ pulumi import aws:connect/hoursOfOperation:HoursOfOperation example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5
* ```
*/
class HoursOfOperation extends pulumi.CustomResource {
/**
* Get an existing HoursOfOperation 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 HoursOfOperation(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of HoursOfOperation. 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'] === HoursOfOperation.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["configs"] = state?.configs;
resourceInputs["description"] = state?.description;
resourceInputs["hoursOfOperationId"] = state?.hoursOfOperationId;
resourceInputs["instanceId"] = state?.instanceId;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["timeZone"] = state?.timeZone;
}
else {
const args = argsOrState;
if (args?.configs === undefined && !opts.urn) {
throw new Error("Missing required property 'configs'");
}
if (args?.instanceId === undefined && !opts.urn) {
throw new Error("Missing required property 'instanceId'");
}
if (args?.timeZone === undefined && !opts.urn) {
throw new Error("Missing required property 'timeZone'");
}
resourceInputs["configs"] = args?.configs;
resourceInputs["description"] = args?.description;
resourceInputs["instanceId"] = args?.instanceId;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeZone"] = args?.timeZone;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["hoursOfOperationId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(HoursOfOperation.__pulumiType, name, resourceInputs, opts);
}
}
exports.HoursOfOperation = HoursOfOperation;
/** @internal */
HoursOfOperation.__pulumiType = 'aws:connect/hoursOfOperation:HoursOfOperation';
//# sourceMappingURL=hoursOfOperation.js.map