"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.SlackChannelConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An AWS Support App resource that creates, updates, lists and deletes Slack channel configurations.
 *
 * ## Example Usage
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const awsSupportSlackAppCFNRole = new aws_native.iam.Role("awsSupportSlackAppCFNRole", {
 *     assumeRolePolicyDocument: {
 *         version: "2012-10-17",
 *         statement: [{
 *             effect: "Allow",
 *             principal: {
 *                 service: ["supportapp.amazonaws.com"],
 *             },
 *             action: ["sts:AssumeRole"],
 *         }],
 *     },
 *     managedPolicyArns: ["arn:aws:iam::aws:policy/AWSSupportAppFullAccess"],
 * });
 * const slackChannelConfiguration = new aws_native.supportapp.SlackChannelConfiguration("slackChannelConfiguration", {
 *     teamId: "T012ABCDEFG",
 *     channelId: "C01234A5BCD",
 *     channelName: "cloudformationtemplatechannel",
 *     notifyOnCreateOrReopenCase: true,
 *     notifyOnAddCorrespondenceToCase: false,
 *     notifyOnResolveCase: true,
 *     notifyOnCaseSeverity: aws_native.supportapp.SlackChannelConfigurationNotifyOnCaseSeverity.High,
 *     channelRoleArn: awsSupportSlackAppCFNRole.arn,
 * });
 *
 * ```
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const awsSupportSlackAppCFNRole = new aws_native.iam.Role("awsSupportSlackAppCFNRole", {
 *     assumeRolePolicyDocument: {
 *         version: "2012-10-17",
 *         statement: [{
 *             effect: "Allow",
 *             principal: {
 *                 service: ["supportapp.amazonaws.com"],
 *             },
 *             action: ["sts:AssumeRole"],
 *         }],
 *     },
 *     managedPolicyArns: ["arn:aws:iam::aws:policy/AWSSupportAppFullAccess"],
 * });
 * const slackChannelConfiguration = new aws_native.supportapp.SlackChannelConfiguration("slackChannelConfiguration", {
 *     teamId: "T012ABCDEFG",
 *     channelId: "C01234A5BCD",
 *     channelName: "cfntemplatechannel",
 *     notifyOnCreateOrReopenCase: true,
 *     notifyOnAddCorrespondenceToCase: false,
 *     notifyOnResolveCase: true,
 *     notifyOnCaseSeverity: aws_native.supportapp.SlackChannelConfigurationNotifyOnCaseSeverity.High,
 *     channelRoleArn: awsSupportSlackAppCFNRole.arn,
 * });
 *
 * ```
 */
class SlackChannelConfiguration extends pulumi.CustomResource {
    /**
     * Get an existing SlackChannelConfiguration 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 opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new SlackChannelConfiguration(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of SlackChannelConfiguration.  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'] === SlackChannelConfiguration.__pulumiType;
    }
    /**
     * Create a SlackChannelConfiguration resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if (args?.channelId === undefined && !opts.urn) {
                throw new Error("Missing required property 'channelId'");
            }
            if (args?.channelRoleArn === undefined && !opts.urn) {
                throw new Error("Missing required property 'channelRoleArn'");
            }
            if (args?.notifyOnCaseSeverity === undefined && !opts.urn) {
                throw new Error("Missing required property 'notifyOnCaseSeverity'");
            }
            if (args?.teamId === undefined && !opts.urn) {
                throw new Error("Missing required property 'teamId'");
            }
            resourceInputs["channelId"] = args?.channelId;
            resourceInputs["channelName"] = args?.channelName;
            resourceInputs["channelRoleArn"] = args?.channelRoleArn;
            resourceInputs["notifyOnAddCorrespondenceToCase"] = args?.notifyOnAddCorrespondenceToCase;
            resourceInputs["notifyOnCaseSeverity"] = args?.notifyOnCaseSeverity;
            resourceInputs["notifyOnCreateOrReopenCase"] = args?.notifyOnCreateOrReopenCase;
            resourceInputs["notifyOnResolveCase"] = args?.notifyOnResolveCase;
            resourceInputs["teamId"] = args?.teamId;
        }
        else {
            resourceInputs["channelId"] = undefined /*out*/;
            resourceInputs["channelName"] = undefined /*out*/;
            resourceInputs["channelRoleArn"] = undefined /*out*/;
            resourceInputs["notifyOnAddCorrespondenceToCase"] = undefined /*out*/;
            resourceInputs["notifyOnCaseSeverity"] = undefined /*out*/;
            resourceInputs["notifyOnCreateOrReopenCase"] = undefined /*out*/;
            resourceInputs["notifyOnResolveCase"] = undefined /*out*/;
            resourceInputs["teamId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["channelId", "teamId"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(SlackChannelConfiguration.__pulumiType, name, resourceInputs, opts);
    }
}
exports.SlackChannelConfiguration = SlackChannelConfiguration;
/** @internal */
SlackChannelConfiguration.__pulumiType = 'aws-native:supportapp:SlackChannelConfiguration';
//# sourceMappingURL=slackChannelConfiguration.js.map