UNPKG

@pulumi/gcp

Version:

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

153 lines 5.68 kB
"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.AuthorizedView = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * * const instance = new gcp.bigtable.Instance("instance", { * name: "tf-instance", * clusters: [{ * clusterId: "tf-instance-cluster", * zone: "us-central1-b", * numNodes: 3, * storageType: "HDD", * }], * }); * const table = new gcp.bigtable.Table("table", { * name: "tf-table", * instanceName: instance.name, * splitKeys: [ * "a", * "b", * "c", * ], * columnFamilies: [ * { * family: "family-first", * }, * { * family: "family-second", * }, * ], * changeStreamRetention: "24h0m0s", * }); * const authorizedView = new gcp.bigtable.AuthorizedView("authorized_view", { * name: "tf-authorized-view", * instanceName: instance.name, * tableName: table.name, * subsetView: { * rowPrefixes: [std.base64encode({ * input: "prefix#", * }).then(invoke => invoke.result)], * familySubsets: [ * { * familyName: "family-first", * qualifiers: [ * std.base64encode({ * input: "qualifier", * }).then(invoke => invoke.result), * std.base64encode({ * input: "qualifier-second", * }).then(invoke => invoke.result), * ], * }, * { * familyName: "family-second", * qualifierPrefixes: [""], * }, * ], * }, * }); * ``` * * ## Import * * Bigtable Authorized Views can be imported using any of these accepted formats: * * * `projects/{{project}}/instances/{{instance_name}}/tables/{{table_name}}/authorizedViews/{{name}}` * * * `{{project}}/{{instance_name}}/{{table_name}}/{{name}}` * * * `{{instance_name}}/{{table_name}}/{{name}}` * * When using the `pulumi import` command, Bigtable Authorized Views can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:bigtable/authorizedView:AuthorizedView default projects/{{project}}/instances/{{instance_name}}/tables/{{table_name}}/authorizedViews/{{name}} * ``` * * ```sh * $ pulumi import gcp:bigtable/authorizedView:AuthorizedView default {{project}}/{{instance_name}}/{{table_name}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:bigtable/authorizedView:AuthorizedView default {{instance_name}}/{{table_name}}/{{name}} * ``` */ class AuthorizedView extends pulumi.CustomResource { /** * Get an existing AuthorizedView 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 AuthorizedView(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of AuthorizedView. 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'] === AuthorizedView.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["deletionProtection"] = state?.deletionProtection; resourceInputs["instanceName"] = state?.instanceName; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["subsetView"] = state?.subsetView; resourceInputs["tableName"] = state?.tableName; } else { const args = argsOrState; if (args?.instanceName === undefined && !opts.urn) { throw new Error("Missing required property 'instanceName'"); } if (args?.tableName === undefined && !opts.urn) { throw new Error("Missing required property 'tableName'"); } resourceInputs["deletionProtection"] = args?.deletionProtection; resourceInputs["instanceName"] = args?.instanceName; resourceInputs["name"] = args?.name; resourceInputs["project"] = args?.project; resourceInputs["subsetView"] = args?.subsetView; resourceInputs["tableName"] = args?.tableName; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AuthorizedView.__pulumiType, name, resourceInputs, opts); } } exports.AuthorizedView = AuthorizedView; /** @internal */ AuthorizedView.__pulumiType = 'gcp:bigtable/authorizedView:AuthorizedView'; //# sourceMappingURL=authorizedView.js.map