"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.Domain = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The AWS::Amplify::Domain resource allows you to connect a custom domain to your app.
 */
class Domain extends pulumi.CustomResource {
    /**
     * Get an existing Domain 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 Domain(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Domain.  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'] === Domain.__pulumiType;
    }
    /**
     * Create a Domain 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?.appId === undefined && !opts.urn) {
                throw new Error("Missing required property 'appId'");
            }
            if (args?.subDomainSettings === undefined && !opts.urn) {
                throw new Error("Missing required property 'subDomainSettings'");
            }
            resourceInputs["appId"] = args?.appId;
            resourceInputs["autoSubDomainCreationPatterns"] = args?.autoSubDomainCreationPatterns;
            resourceInputs["autoSubDomainIamRole"] = args?.autoSubDomainIamRole;
            resourceInputs["certificateSettings"] = args?.certificateSettings;
            resourceInputs["domainName"] = args?.domainName;
            resourceInputs["enableAutoSubDomain"] = args?.enableAutoSubDomain;
            resourceInputs["subDomainSettings"] = args?.subDomainSettings;
            resourceInputs["arn"] = undefined /*out*/;
            resourceInputs["certificate"] = undefined /*out*/;
            resourceInputs["certificateRecord"] = undefined /*out*/;
            resourceInputs["domainStatus"] = undefined /*out*/;
            resourceInputs["statusReason"] = undefined /*out*/;
            resourceInputs["updateStatus"] = undefined /*out*/;
        }
        else {
            resourceInputs["appId"] = undefined /*out*/;
            resourceInputs["arn"] = undefined /*out*/;
            resourceInputs["autoSubDomainCreationPatterns"] = undefined /*out*/;
            resourceInputs["autoSubDomainIamRole"] = undefined /*out*/;
            resourceInputs["certificate"] = undefined /*out*/;
            resourceInputs["certificateRecord"] = undefined /*out*/;
            resourceInputs["certificateSettings"] = undefined /*out*/;
            resourceInputs["domainName"] = undefined /*out*/;
            resourceInputs["domainStatus"] = undefined /*out*/;
            resourceInputs["enableAutoSubDomain"] = undefined /*out*/;
            resourceInputs["statusReason"] = undefined /*out*/;
            resourceInputs["subDomainSettings"] = undefined /*out*/;
            resourceInputs["updateStatus"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["appId", "domainName"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(Domain.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Domain = Domain;
/** @internal */
Domain.__pulumiType = 'aws-native:amplify:Domain';
//# sourceMappingURL=domain.js.map