@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
388 lines (387 loc) • 15.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* 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}}
* ```
*/
export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: AppProfileState, opts?: pulumi.CustomResourceOptions): 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: any): obj is AppProfile;
/**
* The unique name of the app profile in the form `[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
*
*
* - - -
*/
readonly appProfileId: pulumi.Output<string>;
/**
* Specifies that this app profile is intended for read-only usage via the Data Boost feature.
* Structure is documented below.
*/
readonly dataBoostIsolationReadOnly: pulumi.Output<outputs.bigquery.AppProfileDataBoostIsolationReadOnly | undefined>;
/**
* Long form description of the use case for this app profile.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* If true, ignore safety checks when deleting/updating the app profile.
*/
readonly ignoreWarnings: pulumi.Output<boolean | undefined>;
/**
* The name of the instance to create the app profile within.
*/
readonly instance: pulumi.Output<string | undefined>;
/**
* The set of clusters to route to. The order is ignored; clusters will be tried in order of distance. If left empty, all
* clusters are eligible.
*/
readonly multiClusterRoutingClusterIds: pulumi.Output<string[] | undefined>;
/**
* If true, read/write requests are routed to the nearest cluster in the instance, and will fail over to the nearest cluster that is available
* in the event of transient errors or delays. Clusters in a region are considered equidistant. Choosing this option sacrifices read-your-writes
* consistency to improve availability.
*/
readonly multiClusterRoutingUseAny: pulumi.Output<boolean | undefined>;
/**
* The unique name of the requested app profile. Values are of the form `projects/<project>/instances/<instance>/appProfiles/<appProfileId>`.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* Must be used with multi-cluster routing. If true, then this app profile will use row affinity sticky routing. With row
* affinity, Bigtable will route single row key requests based on the row key, rather than randomly. Instead, each row key
* will be assigned to a cluster by Cloud Bigtable, and will stick to that cluster. Choosing this option improves
* read-your-writes consistency for most requests under most circumstances, without sacrificing availability. Consistency
* is not guaranteed, as requests may still fail over between clusters in the event of errors or latency.
*/
readonly rowAffinity: pulumi.Output<boolean | undefined>;
/**
* Use a single-cluster routing policy.
* Structure is documented below.
*/
readonly singleClusterRouting: pulumi.Output<outputs.bigquery.AppProfileSingleClusterRouting | undefined>;
/**
* The standard options used for isolating this app profile's traffic from other use cases.
* Structure is documented below.
*/
readonly standardIsolation: pulumi.Output<outputs.bigquery.AppProfileStandardIsolation>;
/**
* Create a AppProfile 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: AppProfileArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AppProfile resources.
*/
export interface AppProfileState {
/**
* The unique name of the app profile in the form `[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
*
*
* - - -
*/
appProfileId?: pulumi.Input<string>;
/**
* Specifies that this app profile is intended for read-only usage via the Data Boost feature.
* Structure is documented below.
*/
dataBoostIsolationReadOnly?: pulumi.Input<inputs.bigquery.AppProfileDataBoostIsolationReadOnly>;
/**
* Long form description of the use case for this app profile.
*/
description?: pulumi.Input<string>;
/**
* If true, ignore safety checks when deleting/updating the app profile.
*/
ignoreWarnings?: pulumi.Input<boolean>;
/**
* The name of the instance to create the app profile within.
*/
instance?: pulumi.Input<string>;
/**
* The set of clusters to route to. The order is ignored; clusters will be tried in order of distance. If left empty, all
* clusters are eligible.
*/
multiClusterRoutingClusterIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* If true, read/write requests are routed to the nearest cluster in the instance, and will fail over to the nearest cluster that is available
* in the event of transient errors or delays. Clusters in a region are considered equidistant. Choosing this option sacrifices read-your-writes
* consistency to improve availability.
*/
multiClusterRoutingUseAny?: pulumi.Input<boolean>;
/**
* The unique name of the requested app profile. Values are of the form `projects/<project>/instances/<instance>/appProfiles/<appProfileId>`.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Must be used with multi-cluster routing. If true, then this app profile will use row affinity sticky routing. With row
* affinity, Bigtable will route single row key requests based on the row key, rather than randomly. Instead, each row key
* will be assigned to a cluster by Cloud Bigtable, and will stick to that cluster. Choosing this option improves
* read-your-writes consistency for most requests under most circumstances, without sacrificing availability. Consistency
* is not guaranteed, as requests may still fail over between clusters in the event of errors or latency.
*/
rowAffinity?: pulumi.Input<boolean>;
/**
* Use a single-cluster routing policy.
* Structure is documented below.
*/
singleClusterRouting?: pulumi.Input<inputs.bigquery.AppProfileSingleClusterRouting>;
/**
* The standard options used for isolating this app profile's traffic from other use cases.
* Structure is documented below.
*/
standardIsolation?: pulumi.Input<inputs.bigquery.AppProfileStandardIsolation>;
}
/**
* The set of arguments for constructing a AppProfile resource.
*/
export interface AppProfileArgs {
/**
* The unique name of the app profile in the form `[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
*
*
* - - -
*/
appProfileId: pulumi.Input<string>;
/**
* Specifies that this app profile is intended for read-only usage via the Data Boost feature.
* Structure is documented below.
*/
dataBoostIsolationReadOnly?: pulumi.Input<inputs.bigquery.AppProfileDataBoostIsolationReadOnly>;
/**
* Long form description of the use case for this app profile.
*/
description?: pulumi.Input<string>;
/**
* If true, ignore safety checks when deleting/updating the app profile.
*/
ignoreWarnings?: pulumi.Input<boolean>;
/**
* The name of the instance to create the app profile within.
*/
instance?: pulumi.Input<string>;
/**
* The set of clusters to route to. The order is ignored; clusters will be tried in order of distance. If left empty, all
* clusters are eligible.
*/
multiClusterRoutingClusterIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* If true, read/write requests are routed to the nearest cluster in the instance, and will fail over to the nearest cluster that is available
* in the event of transient errors or delays. Clusters in a region are considered equidistant. Choosing this option sacrifices read-your-writes
* consistency to improve availability.
*/
multiClusterRoutingUseAny?: pulumi.Input<boolean>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
/**
* Must be used with multi-cluster routing. If true, then this app profile will use row affinity sticky routing. With row
* affinity, Bigtable will route single row key requests based on the row key, rather than randomly. Instead, each row key
* will be assigned to a cluster by Cloud Bigtable, and will stick to that cluster. Choosing this option improves
* read-your-writes consistency for most requests under most circumstances, without sacrificing availability. Consistency
* is not guaranteed, as requests may still fail over between clusters in the event of errors or latency.
*/
rowAffinity?: pulumi.Input<boolean>;
/**
* Use a single-cluster routing policy.
* Structure is documented below.
*/
singleClusterRouting?: pulumi.Input<inputs.bigquery.AppProfileSingleClusterRouting>;
/**
* The standard options used for isolating this app profile's traffic from other use cases.
* Structure is documented below.
*/
standardIsolation?: pulumi.Input<inputs.bigquery.AppProfileStandardIsolation>;
}