"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.AppFlexConsumption = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Function App Running on a Flex Consumption Plan.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplelinuxfunctionappsa",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleContainer = new azure.storage.Container("example", {
 *     name: "example-flexcontainer",
 *     storageAccountId: exampleAccount.id,
 *     containerAccessType: "private",
 * });
 * const exampleServicePlan = new azure.appservice.ServicePlan("example", {
 *     name: "example-app-service-plan",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     skuName: "FC1",
 *     osType: "Linux",
 * });
 * const exampleAppFlexConsumption = new azure.appservice.AppFlexConsumption("example", {
 *     name: "example-linux-function-app",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     servicePlanId: exampleServicePlan.id,
 *     storageContainerType: "blobContainer",
 *     storageContainerEndpoint: pulumi.interpolate`${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}`,
 *     storageAuthenticationType: "StorageAccountConnectionString",
 *     storageAccessKey: exampleAccount.primaryAccessKey,
 *     runtimeName: "node",
 *     runtimeVersion: "20",
 *     maximumInstanceCount: 50,
 *     instanceMemoryInMb: 2048,
 *     siteConfig: {},
 * });
 * ```
 *
 * ## 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
 *
 * The Function Apps can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:appservice/appFlexConsumption:AppFlexConsumption example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1
 * ```
 */
class AppFlexConsumption extends pulumi.CustomResource {
    /**
     * Get an existing AppFlexConsumption 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 AppFlexConsumption(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:appservice/appFlexConsumption:AppFlexConsumption';
    /**
     * Returns true if the given object is an instance of AppFlexConsumption.  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'] === AppFlexConsumption.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["alwaysReadies"] = state?.alwaysReadies;
            resourceInputs["appSettings"] = state?.appSettings;
            resourceInputs["authSettings"] = state?.authSettings;
            resourceInputs["authSettingsV2"] = state?.authSettingsV2;
            resourceInputs["clientCertificateEnabled"] = state?.clientCertificateEnabled;
            resourceInputs["clientCertificateExclusionPaths"] = state?.clientCertificateExclusionPaths;
            resourceInputs["clientCertificateMode"] = state?.clientCertificateMode;
            resourceInputs["connectionStrings"] = state?.connectionStrings;
            resourceInputs["customDomainVerificationId"] = state?.customDomainVerificationId;
            resourceInputs["defaultHostname"] = state?.defaultHostname;
            resourceInputs["enabled"] = state?.enabled;
            resourceInputs["hostingEnvironmentId"] = state?.hostingEnvironmentId;
            resourceInputs["httpConcurrency"] = state?.httpConcurrency;
            resourceInputs["httpsOnly"] = state?.httpsOnly;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["instanceMemoryInMb"] = state?.instanceMemoryInMb;
            resourceInputs["kind"] = state?.kind;
            resourceInputs["location"] = state?.location;
            resourceInputs["maximumInstanceCount"] = state?.maximumInstanceCount;
            resourceInputs["name"] = state?.name;
            resourceInputs["outboundIpAddressLists"] = state?.outboundIpAddressLists;
            resourceInputs["outboundIpAddresses"] = state?.outboundIpAddresses;
            resourceInputs["possibleOutboundIpAddressLists"] = state?.possibleOutboundIpAddressLists;
            resourceInputs["possibleOutboundIpAddresses"] = state?.possibleOutboundIpAddresses;
            resourceInputs["publicNetworkAccessEnabled"] = state?.publicNetworkAccessEnabled;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["runtimeName"] = state?.runtimeName;
            resourceInputs["runtimeVersion"] = state?.runtimeVersion;
            resourceInputs["servicePlanId"] = state?.servicePlanId;
            resourceInputs["siteConfig"] = state?.siteConfig;
            resourceInputs["siteCredentials"] = state?.siteCredentials;
            resourceInputs["stickySettings"] = state?.stickySettings;
            resourceInputs["storageAccessKey"] = state?.storageAccessKey;
            resourceInputs["storageAuthenticationType"] = state?.storageAuthenticationType;
            resourceInputs["storageContainerEndpoint"] = state?.storageContainerEndpoint;
            resourceInputs["storageContainerType"] = state?.storageContainerType;
            resourceInputs["storageUserAssignedIdentityId"] = state?.storageUserAssignedIdentityId;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["virtualNetworkSubnetId"] = state?.virtualNetworkSubnetId;
            resourceInputs["webdeployPublishBasicAuthenticationEnabled"] = state?.webdeployPublishBasicAuthenticationEnabled;
            resourceInputs["zipDeployFile"] = state?.zipDeployFile;
        }
        else {
            const args = argsOrState;
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.runtimeName === undefined && !opts.urn) {
                throw new Error("Missing required property 'runtimeName'");
            }
            if (args?.runtimeVersion === undefined && !opts.urn) {
                throw new Error("Missing required property 'runtimeVersion'");
            }
            if (args?.servicePlanId === undefined && !opts.urn) {
                throw new Error("Missing required property 'servicePlanId'");
            }
            if (args?.siteConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'siteConfig'");
            }
            if (args?.storageAuthenticationType === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageAuthenticationType'");
            }
            if (args?.storageContainerEndpoint === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageContainerEndpoint'");
            }
            if (args?.storageContainerType === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageContainerType'");
            }
            resourceInputs["alwaysReadies"] = args?.alwaysReadies;
            resourceInputs["appSettings"] = args?.appSettings;
            resourceInputs["authSettings"] = args?.authSettings;
            resourceInputs["authSettingsV2"] = args?.authSettingsV2;
            resourceInputs["clientCertificateEnabled"] = args?.clientCertificateEnabled;
            resourceInputs["clientCertificateExclusionPaths"] = args?.clientCertificateExclusionPaths;
            resourceInputs["clientCertificateMode"] = args?.clientCertificateMode;
            resourceInputs["connectionStrings"] = args?.connectionStrings;
            resourceInputs["enabled"] = args?.enabled;
            resourceInputs["httpConcurrency"] = args?.httpConcurrency;
            resourceInputs["httpsOnly"] = args?.httpsOnly;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["instanceMemoryInMb"] = args?.instanceMemoryInMb;
            resourceInputs["location"] = args?.location;
            resourceInputs["maximumInstanceCount"] = args?.maximumInstanceCount;
            resourceInputs["name"] = args?.name;
            resourceInputs["publicNetworkAccessEnabled"] = args?.publicNetworkAccessEnabled;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["runtimeName"] = args?.runtimeName;
            resourceInputs["runtimeVersion"] = args?.runtimeVersion;
            resourceInputs["servicePlanId"] = args?.servicePlanId;
            resourceInputs["siteConfig"] = args?.siteConfig;
            resourceInputs["stickySettings"] = args?.stickySettings;
            resourceInputs["storageAccessKey"] = args?.storageAccessKey;
            resourceInputs["storageAuthenticationType"] = args?.storageAuthenticationType;
            resourceInputs["storageContainerEndpoint"] = args?.storageContainerEndpoint;
            resourceInputs["storageContainerType"] = args?.storageContainerType;
            resourceInputs["storageUserAssignedIdentityId"] = args?.storageUserAssignedIdentityId;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["virtualNetworkSubnetId"] = args?.virtualNetworkSubnetId;
            resourceInputs["webdeployPublishBasicAuthenticationEnabled"] = args?.webdeployPublishBasicAuthenticationEnabled;
            resourceInputs["zipDeployFile"] = args?.zipDeployFile;
            resourceInputs["customDomainVerificationId"] = undefined /*out*/;
            resourceInputs["defaultHostname"] = undefined /*out*/;
            resourceInputs["hostingEnvironmentId"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["outboundIpAddressLists"] = undefined /*out*/;
            resourceInputs["outboundIpAddresses"] = undefined /*out*/;
            resourceInputs["possibleOutboundIpAddressLists"] = undefined /*out*/;
            resourceInputs["possibleOutboundIpAddresses"] = undefined /*out*/;
            resourceInputs["siteCredentials"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["customDomainVerificationId", "siteCredentials"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(AppFlexConsumption.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AppFlexConsumption = AppFlexConsumption;
//# sourceMappingURL=appFlexConsumption.js.map