import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Creates a Google Cloud Bigtable authorized view inside a table. For more information see * [the official documentation](https://cloud.google.com/bigtable/) and * [API](https://cloud.google.com/bigtable/docs/go/reference). * * > **Note:** It is strongly recommended to set `lifecycle { preventDestroy = true }` * on authorized views in order to prevent accidental data loss. See * Terraform docs * for more information on lifecycle parameters. * * ## 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}} * $ pulumi import gcp:bigtable/authorizedView:AuthorizedView default {{project}}/{{instance_name}}/{{table_name}}/{{name}} * $ pulumi import gcp:bigtable/authorizedView:AuthorizedView default {{instance_name}}/{{table_name}}/{{name}} * ``` */ export declare 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: string, id: pulumi.Input, state?: AuthorizedViewState, opts?: pulumi.CustomResourceOptions): AuthorizedView; /** * 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: any): obj is AuthorizedView; /** * A field to make the table protected against data loss i.e. when set to PROTECTED, deleting the table, the column families in the table, and the instance containing the table would be prohibited. * If not provided, currently deletion protection will be set to UNPROTECTED as it is the API default value. Note this field configs the deletion protection provided by the API in the backend, and should not be confused with Terraform-side deletion protection. */ readonly deletionProtection: pulumi.Output; /** * The name of the Bigtable instance in which the authorized view belongs. */ readonly instanceName: pulumi.Output; /** * The name of the authorized view. Must be 1-50 characters and must only contain hyphens, underscores, periods, letters and numbers. */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. If it * is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * An AuthorizedView permitting access to an explicit subset of a Table. Structure is documented below. * * ----- */ readonly subsetView: pulumi.Output; /** * The name of the Bigtable table in which the authorized view belongs. */ readonly tableName: pulumi.Output; /** * Create a AuthorizedView resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AuthorizedViewArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AuthorizedView resources. */ export interface AuthorizedViewState { /** * A field to make the table protected against data loss i.e. when set to PROTECTED, deleting the table, the column families in the table, and the instance containing the table would be prohibited. * If not provided, currently deletion protection will be set to UNPROTECTED as it is the API default value. Note this field configs the deletion protection provided by the API in the backend, and should not be confused with Terraform-side deletion protection. */ deletionProtection?: pulumi.Input; /** * The name of the Bigtable instance in which the authorized view belongs. */ instanceName?: pulumi.Input; /** * The name of the authorized view. Must be 1-50 characters and must only contain hyphens, underscores, periods, letters and numbers. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. If it * is not provided, the provider project is used. */ project?: pulumi.Input; /** * An AuthorizedView permitting access to an explicit subset of a Table. Structure is documented below. * * ----- */ subsetView?: pulumi.Input; /** * The name of the Bigtable table in which the authorized view belongs. */ tableName?: pulumi.Input; } /** * The set of arguments for constructing a AuthorizedView resource. */ export interface AuthorizedViewArgs { /** * A field to make the table protected against data loss i.e. when set to PROTECTED, deleting the table, the column families in the table, and the instance containing the table would be prohibited. * If not provided, currently deletion protection will be set to UNPROTECTED as it is the API default value. Note this field configs the deletion protection provided by the API in the backend, and should not be confused with Terraform-side deletion protection. */ deletionProtection?: pulumi.Input; /** * The name of the Bigtable instance in which the authorized view belongs. */ instanceName: pulumi.Input; /** * The name of the authorized view. Must be 1-50 characters and must only contain hyphens, underscores, periods, letters and numbers. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. If it * is not provided, the provider project is used. */ project?: pulumi.Input; /** * An AuthorizedView permitting access to an explicit subset of a Table. Structure is documented below. * * ----- */ subsetView?: pulumi.Input; /** * The name of the Bigtable table in which the authorized view belongs. */ tableName: pulumi.Input; }