"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpringCloudCustomDomain = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages an Azure Spring Cloud Custom Domain.
 *
 * !> **Note:** Azure Spring Apps is now deprecated and will be retired on 2028-05-31 - as such the `azure.appplatform.SpringCloudCustomDomain` resource is deprecated and will be removed in a future major version of the AzureRM Provider. See https://aka.ms/asaretirement for more information.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * import * as std from "@pulumi/std";
 *
 * const exampleResourceGroup = new azure.core.ResourceGroup("example", {
 *     name: "rg-example",
 *     location: "West Europe",
 * });
 * const example = azure.dns.getZoneOutput({
 *     name: "mydomain.com",
 *     resourceGroupName: exampleResourceGroup.name,
 * });
 * const exampleSpringCloudService = new azure.appplatform.SpringCloudService("example", {
 *     name: "example-springcloud",
 *     resourceGroupName: exampleResourceGroup.name,
 *     location: exampleResourceGroup.location,
 * });
 * const exampleSpringCloudApp = new azure.appplatform.SpringCloudApp("example", {
 *     name: "example-springcloudapp",
 *     resourceGroupName: exampleResourceGroup.name,
 *     serviceName: exampleSpringCloudService.name,
 * });
 * const exampleCNameRecord = new azure.dns.CNameRecord("example", {
 *     name: "record1",
 *     zoneName: example.apply(example => example.name),
 *     resourceGroupName: example.apply(example => example.resourceGroupName),
 *     ttl: 300,
 *     record: exampleSpringCloudApp.fqdn,
 * });
 * const exampleSpringCloudCustomDomain = new azure.appplatform.SpringCloudCustomDomain("example", {
 *     name: std.joinOutput({
 *         separator: ".",
 *         input: [
 *             exampleCNameRecord.name,
 *             exampleCNameRecord.zoneName,
 *         ],
 *     }).apply(invoke => invoke.result),
 *     springCloudAppId: exampleSpringCloudApp.id,
 * });
 * ```
 *
 * ## Import
 *
 * Spring Cloud Custom Domain can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:appplatform/springCloudCustomDomain:SpringCloudCustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.AppPlatform/spring/spring1/apps/app1/domains/domain.com
 * ```
 */
class SpringCloudCustomDomain extends pulumi.CustomResource {
    /**
     * Get an existing SpringCloudCustomDomain 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 SpringCloudCustomDomain(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:appplatform/springCloudCustomDomain:SpringCloudCustomDomain';
    /**
     * Returns true if the given object is an instance of SpringCloudCustomDomain.  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'] === SpringCloudCustomDomain.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["certificateName"] = state?.certificateName;
            resourceInputs["name"] = state?.name;
            resourceInputs["springCloudAppId"] = state?.springCloudAppId;
            resourceInputs["thumbprint"] = state?.thumbprint;
        }
        else {
            const args = argsOrState;
            if (args?.springCloudAppId === undefined && !opts.urn) {
                throw new Error("Missing required property 'springCloudAppId'");
            }
            resourceInputs["certificateName"] = args?.certificateName;
            resourceInputs["name"] = args?.name;
            resourceInputs["springCloudAppId"] = args?.springCloudAppId;
            resourceInputs["thumbprint"] = args?.thumbprint;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(SpringCloudCustomDomain.__pulumiType, name, resourceInputs, opts);
    }
}
exports.SpringCloudCustomDomain = SpringCloudCustomDomain;
//# sourceMappingURL=springCloudCustomDomain.js.map