"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.Standard = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Logic App (Standard / Single Tenant)
 *
 * ## Example Usage
 *
 * ### With App Service Plan)
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplestorageaccount",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleServicePlan = new azure.appservice.ServicePlan("example", {
 *     name: "example-service-plan",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     osType: "Windows",
 *     skuName: "WS1",
 * });
 * const exampleStandard = new azure.logicapps.Standard("example", {
 *     name: "example-logic-app",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     appServicePlanId: exampleAzurermAppServicePlan.id,
 *     storageAccountName: exampleAccount.name,
 *     storageAccountAccessKey: exampleAccount.primaryAccessKey,
 *     appSettings: {
 *         FUNCTIONS_WORKER_RUNTIME: "node",
 *         WEBSITE_NODE_DEFAULT_VERSION: "~18",
 *     },
 * });
 * ```
 *
 * ### For Container Mode)
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplestorageaccount",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const examplePlan = new azure.appservice.Plan("example", {
 *     name: "example-service-plan",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     kind: "Linux",
 *     reserved: true,
 *     sku: {
 *         tier: "WorkflowStandard",
 *         size: "WS1",
 *     },
 * });
 * const exampleStandard = new azure.logicapps.Standard("example", {
 *     name: "example-logic-app",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     appServicePlanId: examplePlan.id,
 *     storageAccountName: exampleAccount.name,
 *     storageAccountAccessKey: exampleAccount.primaryAccessKey,
 *     siteConfig: {
 *         linuxFxVersion: "DOCKER|mcr.microsoft.com/azure-functions/dotnet:3.0-appservice",
 *     },
 *     appSettings: {
 *         DOCKER_REGISTRY_SERVER_URL: "https://<server-name>.azurecr.io",
 *         DOCKER_REGISTRY_SERVER_USERNAME: "username",
 *         DOCKER_REGISTRY_SERVER_PASSWORD: "password",
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Web` - 2023-12-01, 2023-01-01
 *
 * ## Import
 *
 * Logic Apps can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:logicapps/standard:Standard logicapp1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/sites/logicapp1
 * ```
 */
class Standard extends pulumi.CustomResource {
    /**
     * Get an existing Standard 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 Standard(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:logicapps/standard:Standard';
    /**
     * Returns true if the given object is an instance of Standard.  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'] === Standard.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["appServicePlanId"] = state?.appServicePlanId;
            resourceInputs["appSettings"] = state?.appSettings;
            resourceInputs["bundleVersion"] = state?.bundleVersion;
            resourceInputs["clientAffinityEnabled"] = state?.clientAffinityEnabled;
            resourceInputs["clientCertificateMode"] = state?.clientCertificateMode;
            resourceInputs["connectionStrings"] = state?.connectionStrings;
            resourceInputs["customDomainVerificationId"] = state?.customDomainVerificationId;
            resourceInputs["defaultHostname"] = state?.defaultHostname;
            resourceInputs["enabled"] = state?.enabled;
            resourceInputs["ftpPublishBasicAuthenticationEnabled"] = state?.ftpPublishBasicAuthenticationEnabled;
            resourceInputs["httpsOnly"] = state?.httpsOnly;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["kind"] = state?.kind;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["outboundIpAddresses"] = state?.outboundIpAddresses;
            resourceInputs["possibleOutboundIpAddresses"] = state?.possibleOutboundIpAddresses;
            resourceInputs["publicNetworkAccess"] = state?.publicNetworkAccess;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["scmPublishBasicAuthenticationEnabled"] = state?.scmPublishBasicAuthenticationEnabled;
            resourceInputs["siteConfig"] = state?.siteConfig;
            resourceInputs["siteCredentials"] = state?.siteCredentials;
            resourceInputs["storageAccountAccessKey"] = state?.storageAccountAccessKey;
            resourceInputs["storageAccountName"] = state?.storageAccountName;
            resourceInputs["storageAccountShareName"] = state?.storageAccountShareName;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["useExtensionBundle"] = state?.useExtensionBundle;
            resourceInputs["version"] = state?.version;
            resourceInputs["virtualNetworkSubnetId"] = state?.virtualNetworkSubnetId;
            resourceInputs["vnetContentShareEnabled"] = state?.vnetContentShareEnabled;
        }
        else {
            const args = argsOrState;
            if (args?.appServicePlanId === undefined && !opts.urn) {
                throw new Error("Missing required property 'appServicePlanId'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.storageAccountAccessKey === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageAccountAccessKey'");
            }
            if (args?.storageAccountName === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageAccountName'");
            }
            resourceInputs["appServicePlanId"] = args?.appServicePlanId;
            resourceInputs["appSettings"] = args?.appSettings;
            resourceInputs["bundleVersion"] = args?.bundleVersion;
            resourceInputs["clientAffinityEnabled"] = args?.clientAffinityEnabled;
            resourceInputs["clientCertificateMode"] = args?.clientCertificateMode;
            resourceInputs["connectionStrings"] = args?.connectionStrings;
            resourceInputs["enabled"] = args?.enabled;
            resourceInputs["ftpPublishBasicAuthenticationEnabled"] = args?.ftpPublishBasicAuthenticationEnabled;
            resourceInputs["httpsOnly"] = args?.httpsOnly;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["publicNetworkAccess"] = args?.publicNetworkAccess;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["scmPublishBasicAuthenticationEnabled"] = args?.scmPublishBasicAuthenticationEnabled;
            resourceInputs["siteConfig"] = args?.siteConfig;
            resourceInputs["storageAccountAccessKey"] = args?.storageAccountAccessKey ? pulumi.secret(args.storageAccountAccessKey) : undefined;
            resourceInputs["storageAccountName"] = args?.storageAccountName;
            resourceInputs["storageAccountShareName"] = args?.storageAccountShareName;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["useExtensionBundle"] = args?.useExtensionBundle;
            resourceInputs["version"] = args?.version;
            resourceInputs["virtualNetworkSubnetId"] = args?.virtualNetworkSubnetId;
            resourceInputs["vnetContentShareEnabled"] = args?.vnetContentShareEnabled;
            resourceInputs["customDomainVerificationId"] = undefined /*out*/;
            resourceInputs["defaultHostname"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["outboundIpAddresses"] = undefined /*out*/;
            resourceInputs["possibleOutboundIpAddresses"] = undefined /*out*/;
            resourceInputs["siteCredentials"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["storageAccountAccessKey"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Standard.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Standard = Standard;
//# sourceMappingURL=standard.js.map