UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

241 lines • 8.98 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** 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.bigquery.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.bigquery.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.bigquery.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.bigquery.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:bigquery/appProfile:AppProfile default projects/{{project}}/instances/{{instance}}/appProfiles/{{app_profile_id}} * ``` * * ```sh * $ pulumi import gcp:bigquery/appProfile:AppProfile default {{project}}/{{instance}}/{{app_profile_id}} * ``` * * ```sh * $ pulumi import gcp:bigquery/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, Object.assign(Object.assign({}, 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 ? state.appProfileId : undefined; resourceInputs["dataBoostIsolationReadOnly"] = state ? state.dataBoostIsolationReadOnly : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["ignoreWarnings"] = state ? state.ignoreWarnings : undefined; resourceInputs["instance"] = state ? state.instance : undefined; resourceInputs["multiClusterRoutingClusterIds"] = state ? state.multiClusterRoutingClusterIds : undefined; resourceInputs["multiClusterRoutingUseAny"] = state ? state.multiClusterRoutingUseAny : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["rowAffinity"] = state ? state.rowAffinity : undefined; resourceInputs["singleClusterRouting"] = state ? state.singleClusterRouting : undefined; resourceInputs["standardIsolation"] = state ? state.standardIsolation : undefined; } else { const args = argsOrState; if ((!args || args.appProfileId === undefined) && !opts.urn) { throw new Error("Missing required property 'appProfileId'"); } resourceInputs["appProfileId"] = args ? args.appProfileId : undefined; resourceInputs["dataBoostIsolationReadOnly"] = args ? args.dataBoostIsolationReadOnly : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["ignoreWarnings"] = args ? args.ignoreWarnings : undefined; resourceInputs["instance"] = args ? args.instance : undefined; resourceInputs["multiClusterRoutingClusterIds"] = args ? args.multiClusterRoutingClusterIds : undefined; resourceInputs["multiClusterRoutingUseAny"] = args ? args.multiClusterRoutingUseAny : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["rowAffinity"] = args ? args.rowAffinity : undefined; resourceInputs["singleClusterRouting"] = args ? args.singleClusterRouting : undefined; resourceInputs["standardIsolation"] = args ? args.standardIsolation : undefined; resourceInputs["name"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AppProfile.__pulumiType, name, resourceInputs, opts); } } exports.AppProfile = AppProfile; /** @internal */ AppProfile.__pulumiType = 'gcp:bigquery/appProfile:AppProfile'; //# sourceMappingURL=appProfile.js.map