"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.AppProfile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * App profile is a configuration object describing how Cloud Bigtable should treat traffic from a particular end user application.
 *
 * To get more information about AppProfile, see:
 *
 * * [API documentation](https://cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles)
 *
 * ## Example Usage
 *
 * ### Bigtable App Profile Anycluster
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const instance = new gcp.bigtable.Instance("instance", {
 *     name: "bt-instance",
 *     clusters: [
 *         {
 *             clusterId: "cluster-1",
 *             zone: "us-central1-a",
 *             numNodes: 3,
 *             storageType: "HDD",
 *         },
 *         {
 *             clusterId: "cluster-2",
 *             zone: "us-central1-b",
 *             numNodes: 3,
 *             storageType: "HDD",
 *         },
 *         {
 *             clusterId: "cluster-3",
 *             zone: "us-central1-c",
 *             numNodes: 3,
 *             storageType: "HDD",
 *         },
 *     ],
 *     deletionProtection: true,
 * });
 * const ap = new gcp.bigtable.AppProfile("ap", {
 *     instance: instance.name,
 *     appProfileId: "bt-profile",
 *     multiClusterRoutingUseAny: true,
 *     ignoreWarnings: true,
 * });
 * ```
 * ### Bigtable App Profile Singlecluster
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const instance = new gcp.bigtable.Instance("instance", {
 *     name: "bt-instance",
 *     clusters: [{
 *         clusterId: "cluster-1",
 *         zone: "us-central1-b",
 *         numNodes: 3,
 *         storageType: "HDD",
 *     }],
 *     deletionProtection: true,
 * });
 * const ap = new gcp.bigtable.AppProfile("ap", {
 *     instance: instance.name,
 *     appProfileId: "bt-profile",
 *     singleClusterRouting: {
 *         clusterId: "cluster-1",
 *         allowTransactionalWrites: true,
 *     },
 *     ignoreWarnings: true,
 * });
 * ```
 * ### Bigtable App Profile Multicluster
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const instance = new gcp.bigtable.Instance("instance", {
 *     name: "bt-instance",
 *     clusters: [
 *         {
 *             clusterId: "cluster-1",
 *             zone: "us-central1-a",
 *             numNodes: 3,
 *             storageType: "HDD",
 *         },
 *         {
 *             clusterId: "cluster-2",
 *             zone: "us-central1-b",
 *             numNodes: 3,
 *             storageType: "HDD",
 *         },
 *         {
 *             clusterId: "cluster-3",
 *             zone: "us-central1-c",
 *             numNodes: 3,
 *             storageType: "HDD",
 *         },
 *     ],
 *     deletionProtection: true,
 * });
 * const ap = new gcp.bigtable.AppProfile("ap", {
 *     instance: instance.name,
 *     appProfileId: "bt-profile",
 *     multiClusterRoutingUseAny: true,
 *     multiClusterRoutingClusterIds: [
 *         "cluster-1",
 *         "cluster-2",
 *     ],
 *     ignoreWarnings: true,
 * });
 * ```
 * ### Bigtable App Profile Priority
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const instance = new gcp.bigtable.Instance("instance", {
 *     name: "bt-instance",
 *     clusters: [{
 *         clusterId: "cluster-1",
 *         zone: "us-central1-b",
 *         numNodes: 3,
 *         storageType: "HDD",
 *     }],
 *     deletionProtection: true,
 * });
 * const ap = new gcp.bigtable.AppProfile("ap", {
 *     instance: instance.name,
 *     appProfileId: "bt-profile",
 *     singleClusterRouting: {
 *         clusterId: "cluster-1",
 *         allowTransactionalWrites: true,
 *     },
 *     standardIsolation: {
 *         priority: "PRIORITY_LOW",
 *     },
 *     ignoreWarnings: true,
 * });
 * ```
 *
 * ## Import
 *
 * AppProfile can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/instances/{{instance}}/appProfiles/{{app_profile_id}}`
 *
 * * `{{project}}/{{instance}}/{{app_profile_id}}`
 *
 * * `{{instance}}/{{app_profile_id}}`
 *
 * When using the `pulumi import` command, AppProfile can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:bigtable/appProfile:AppProfile default projects/{{project}}/instances/{{instance}}/appProfiles/{{app_profile_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:bigtable/appProfile:AppProfile default {{project}}/{{instance}}/{{app_profile_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:bigtable/appProfile:AppProfile default {{instance}}/{{app_profile_id}}
 * ```
 */
class AppProfile extends pulumi.CustomResource {
    /**
     * Get an existing AppProfile 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 AppProfile(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AppProfile.  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'] === AppProfile.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["appProfileId"] = state?.appProfileId;
            resourceInputs["dataBoostIsolationReadOnly"] = state?.dataBoostIsolationReadOnly;
            resourceInputs["description"] = state?.description;
            resourceInputs["ignoreWarnings"] = state?.ignoreWarnings;
            resourceInputs["instance"] = state?.instance;
            resourceInputs["multiClusterRoutingClusterIds"] = state?.multiClusterRoutingClusterIds;
            resourceInputs["multiClusterRoutingUseAny"] = state?.multiClusterRoutingUseAny;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["rowAffinity"] = state?.rowAffinity;
            resourceInputs["singleClusterRouting"] = state?.singleClusterRouting;
            resourceInputs["standardIsolation"] = state?.standardIsolation;
        }
        else {
            const args = argsOrState;
            if (args?.appProfileId === undefined && !opts.urn) {
                throw new Error("Missing required property 'appProfileId'");
            }
            resourceInputs["appProfileId"] = args?.appProfileId;
            resourceInputs["dataBoostIsolationReadOnly"] = args?.dataBoostIsolationReadOnly;
            resourceInputs["description"] = args?.description;
            resourceInputs["ignoreWarnings"] = args?.ignoreWarnings;
            resourceInputs["instance"] = args?.instance;
            resourceInputs["multiClusterRoutingClusterIds"] = args?.multiClusterRoutingClusterIds;
            resourceInputs["multiClusterRoutingUseAny"] = args?.multiClusterRoutingUseAny;
            resourceInputs["project"] = args?.project;
            resourceInputs["rowAffinity"] = args?.rowAffinity;
            resourceInputs["singleClusterRouting"] = args?.singleClusterRouting;
            resourceInputs["standardIsolation"] = args?.standardIsolation;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const aliasOpts = { aliases: [{ type: "gcp:bigquery/appProfile:AppProfile" }, { type: "gcp:bigquery/appProfile:AppProfile" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(AppProfile.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AppProfile = AppProfile;
/** @internal */
AppProfile.__pulumiType = 'gcp:bigtable/appProfile:AppProfile';
//# sourceMappingURL=appProfile.js.map