@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
260 lines • 9.84 kB
JavaScript
;
// *** 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.AppProfile = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(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}}
* $ pulumi import gcp:bigtable/appProfile:AppProfile default {{project}}/{{instance}}/{{app_profile_id}}
* $ 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 });
}
/** @internal */
static __pulumiType = 'gcp:bigtable/appProfile:AppProfile';
/**
* 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["deletionPolicy"] = state?.deletionPolicy;
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["deletionPolicy"] = args?.deletionPolicy;
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;
//# sourceMappingURL=appProfile.js.map