com.pulumi.gcp.bigquery.kotlin.AppProfile.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.bigquery.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.bigquery.kotlin.outputs.AppProfileSingleClusterRouting
import com.pulumi.gcp.bigquery.kotlin.outputs.AppProfileStandardIsolation
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.gcp.bigquery.kotlin.outputs.AppProfileSingleClusterRouting.Companion.toKotlin as appProfileSingleClusterRoutingToKotlin
import com.pulumi.gcp.bigquery.kotlin.outputs.AppProfileStandardIsolation.Companion.toKotlin as appProfileStandardIsolationToKotlin
/**
* Builder for [AppProfile].
*/
@PulumiTagMarker
public class AppProfileResourceBuilder internal constructor() {
public var name: String? = null
public var args: AppProfileArgs = AppProfileArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend AppProfileArgsBuilder.() -> Unit) {
val builder = AppProfileArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): AppProfile {
val builtJavaResource = com.pulumi.gcp.bigquery.AppProfile(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AppProfile(builtJavaResource)
}
}
/**
* 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,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* instance = gcp.bigtable.Instance("instance",
* name="bt-instance",
* clusters=[
* gcp.bigtable.InstanceClusterArgs(
* cluster_id="cluster-1",
* zone="us-central1-a",
* num_nodes=3,
* storage_type="HDD",
* ),
* gcp.bigtable.InstanceClusterArgs(
* cluster_id="cluster-2",
* zone="us-central1-b",
* num_nodes=3,
* storage_type="HDD",
* ),
* gcp.bigtable.InstanceClusterArgs(
* cluster_id="cluster-3",
* zone="us-central1-c",
* num_nodes=3,
* storage_type="HDD",
* ),
* ],
* deletion_protection=True)
* ap = gcp.bigquery.AppProfile("ap",
* instance=instance.name,
* app_profile_id="bt-profile",
* multi_cluster_routing_use_any=True,
* ignore_warnings=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var instance = new Gcp.BigTable.Instance("instance", new()
* {
* Name = "bt-instance",
* Clusters = new[]
* {
* new Gcp.BigTable.Inputs.InstanceClusterArgs
* {
* ClusterId = "cluster-1",
* Zone = "us-central1-a",
* NumNodes = 3,
* StorageType = "HDD",
* },
* new Gcp.BigTable.Inputs.InstanceClusterArgs
* {
* ClusterId = "cluster-2",
* Zone = "us-central1-b",
* NumNodes = 3,
* StorageType = "HDD",
* },
* new Gcp.BigTable.Inputs.InstanceClusterArgs
* {
* ClusterId = "cluster-3",
* Zone = "us-central1-c",
* NumNodes = 3,
* StorageType = "HDD",
* },
* },
* DeletionProtection = true,
* });
* var ap = new Gcp.BigQuery.AppProfile("ap", new()
* {
* Instance = instance.Name,
* AppProfileId = "bt-profile",
* MultiClusterRoutingUseAny = true,
* IgnoreWarnings = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigtable"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* instance, err := bigtable.NewInstance(ctx, "instance", &bigtable.InstanceArgs{
* Name: pulumi.String("bt-instance"),
* Clusters: bigtable.InstanceClusterArray{
* &bigtable.InstanceClusterArgs{
* ClusterId: pulumi.String("cluster-1"),
* Zone: pulumi.String("us-central1-a"),
* NumNodes: pulumi.Int(3),
* StorageType: pulumi.String("HDD"),
* },
* &bigtable.InstanceClusterArgs{
* ClusterId: pulumi.String("cluster-2"),
* Zone: pulumi.String("us-central1-b"),
* NumNodes: pulumi.Int(3),
* StorageType: pulumi.String("HDD"),
* },
* &bigtable.InstanceClusterArgs{
* ClusterId: pulumi.String("cluster-3"),
* Zone: pulumi.String("us-central1-c"),
* NumNodes: pulumi.Int(3),
* StorageType: pulumi.String("HDD"),
* },
* },
* DeletionProtection: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = bigquery.NewAppProfile(ctx, "ap", &bigquery.AppProfileArgs{
* Instance: instance.Name,
* AppProfileId: pulumi.String("bt-profile"),
* MultiClusterRoutingUseAny: pulumi.Bool(true),
* IgnoreWarnings: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.bigtable.Instance;
* import com.pulumi.gcp.bigtable.InstanceArgs;
* import com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs;
* import com.pulumi.gcp.bigquery.AppProfile;
* import com.pulumi.gcp.bigquery.AppProfileArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var instance = new Instance("instance", InstanceArgs.builder()
* .name("bt-instance")
* .clusters(
* InstanceClusterArgs.builder()
* .clusterId("cluster-1")
* .zone("us-central1-a")
* .numNodes(3)
* .storageType("HDD")
* .build(),
* InstanceClusterArgs.builder()
* .clusterId("cluster-2")
* .zone("us-central1-b")
* .numNodes(3)
* .storageType("HDD")
* .build(),
* InstanceClusterArgs.builder()
* .clusterId("cluster-3")
* .zone("us-central1-c")
* .numNodes(3)
* .storageType("HDD")
* .build())
* .deletionProtection("true")
* .build());
* var ap = new AppProfile("ap", AppProfileArgs.builder()
* .instance(instance.name())
* .appProfileId("bt-profile")
* .multiClusterRoutingUseAny(true)
* .ignoreWarnings(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* instance:
* type: gcp:bigtable:Instance
* properties:
* 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'
* ap:
* type: gcp:bigquery:AppProfile
* properties:
* 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,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* instance = gcp.bigtable.Instance("instance",
* name="bt-instance",
* clusters=[gcp.bigtable.InstanceClusterArgs(
* cluster_id="cluster-1",
* zone="us-central1-b",
* num_nodes=3,
* storage_type="HDD",
* )],
* deletion_protection=True)
* ap = gcp.bigquery.AppProfile("ap",
* instance=instance.name,
* app_profile_id="bt-profile",
* single_cluster_routing=gcp.bigquery.AppProfileSingleClusterRoutingArgs(
* cluster_id="cluster-1",
* allow_transactional_writes=True,
* ),
* ignore_warnings=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var instance = new Gcp.BigTable.Instance("instance", new()
* {
* Name = "bt-instance",
* Clusters = new[]
* {
* new Gcp.BigTable.Inputs.InstanceClusterArgs
* {
* ClusterId = "cluster-1",
* Zone = "us-central1-b",
* NumNodes = 3,
* StorageType = "HDD",
* },
* },
* DeletionProtection = true,
* });
* var ap = new Gcp.BigQuery.AppProfile("ap", new()
* {
* Instance = instance.Name,
* AppProfileId = "bt-profile",
* SingleClusterRouting = new Gcp.BigQuery.Inputs.AppProfileSingleClusterRoutingArgs
* {
* ClusterId = "cluster-1",
* AllowTransactionalWrites = true,
* },
* IgnoreWarnings = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigtable"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* instance, err := bigtable.NewInstance(ctx, "instance", &bigtable.InstanceArgs{
* Name: pulumi.String("bt-instance"),
* Clusters: bigtable.InstanceClusterArray{
* &bigtable.InstanceClusterArgs{
* ClusterId: pulumi.String("cluster-1"),
* Zone: pulumi.String("us-central1-b"),
* NumNodes: pulumi.Int(3),
* StorageType: pulumi.String("HDD"),
* },
* },
* DeletionProtection: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = bigquery.NewAppProfile(ctx, "ap", &bigquery.AppProfileArgs{
* Instance: instance.Name,
* AppProfileId: pulumi.String("bt-profile"),
* SingleClusterRouting: &bigquery.AppProfileSingleClusterRoutingArgs{
* ClusterId: pulumi.String("cluster-1"),
* AllowTransactionalWrites: pulumi.Bool(true),
* },
* IgnoreWarnings: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.bigtable.Instance;
* import com.pulumi.gcp.bigtable.InstanceArgs;
* import com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs;
* import com.pulumi.gcp.bigquery.AppProfile;
* import com.pulumi.gcp.bigquery.AppProfileArgs;
* import com.pulumi.gcp.bigquery.inputs.AppProfileSingleClusterRoutingArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var instance = new Instance("instance", InstanceArgs.builder()
* .name("bt-instance")
* .clusters(InstanceClusterArgs.builder()
* .clusterId("cluster-1")
* .zone("us-central1-b")
* .numNodes(3)
* .storageType("HDD")
* .build())
* .deletionProtection("true")
* .build());
* var ap = new AppProfile("ap", AppProfileArgs.builder()
* .instance(instance.name())
* .appProfileId("bt-profile")
* .singleClusterRouting(AppProfileSingleClusterRoutingArgs.builder()
* .clusterId("cluster-1")
* .allowTransactionalWrites(true)
* .build())
* .ignoreWarnings(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* instance:
* type: gcp:bigtable:Instance
* properties:
* name: bt-instance
* clusters:
* - clusterId: cluster-1
* zone: us-central1-b
* numNodes: 3
* storageType: HDD
* deletionProtection: 'true'
* ap:
* type: gcp:bigquery:AppProfile
* properties:
* 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,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* instance = gcp.bigtable.Instance("instance",
* name="bt-instance",
* clusters=[
* gcp.bigtable.InstanceClusterArgs(
* cluster_id="cluster-1",
* zone="us-central1-a",
* num_nodes=3,
* storage_type="HDD",
* ),
* gcp.bigtable.InstanceClusterArgs(
* cluster_id="cluster-2",
* zone="us-central1-b",
* num_nodes=3,
* storage_type="HDD",
* ),
* gcp.bigtable.InstanceClusterArgs(
* cluster_id="cluster-3",
* zone="us-central1-c",
* num_nodes=3,
* storage_type="HDD",
* ),
* ],
* deletion_protection=True)
* ap = gcp.bigquery.AppProfile("ap",
* instance=instance.name,
* app_profile_id="bt-profile",
* multi_cluster_routing_use_any=True,
* multi_cluster_routing_cluster_ids=[
* "cluster-1",
* "cluster-2",
* ],
* ignore_warnings=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var instance = new Gcp.BigTable.Instance("instance", new()
* {
* Name = "bt-instance",
* Clusters = new[]
* {
* new Gcp.BigTable.Inputs.InstanceClusterArgs
* {
* ClusterId = "cluster-1",
* Zone = "us-central1-a",
* NumNodes = 3,
* StorageType = "HDD",
* },
* new Gcp.BigTable.Inputs.InstanceClusterArgs
* {
* ClusterId = "cluster-2",
* Zone = "us-central1-b",
* NumNodes = 3,
* StorageType = "HDD",
* },
* new Gcp.BigTable.Inputs.InstanceClusterArgs
* {
* ClusterId = "cluster-3",
* Zone = "us-central1-c",
* NumNodes = 3,
* StorageType = "HDD",
* },
* },
* DeletionProtection = true,
* });
* var ap = new Gcp.BigQuery.AppProfile("ap", new()
* {
* Instance = instance.Name,
* AppProfileId = "bt-profile",
* MultiClusterRoutingUseAny = true,
* MultiClusterRoutingClusterIds = new[]
* {
* "cluster-1",
* "cluster-2",
* },
* IgnoreWarnings = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigtable"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* instance, err := bigtable.NewInstance(ctx, "instance", &bigtable.InstanceArgs{
* Name: pulumi.String("bt-instance"),
* Clusters: bigtable.InstanceClusterArray{
* &bigtable.InstanceClusterArgs{
* ClusterId: pulumi.String("cluster-1"),
* Zone: pulumi.String("us-central1-a"),
* NumNodes: pulumi.Int(3),
* StorageType: pulumi.String("HDD"),
* },
* &bigtable.InstanceClusterArgs{
* ClusterId: pulumi.String("cluster-2"),
* Zone: pulumi.String("us-central1-b"),
* NumNodes: pulumi.Int(3),
* StorageType: pulumi.String("HDD"),
* },
* &bigtable.InstanceClusterArgs{
* ClusterId: pulumi.String("cluster-3"),
* Zone: pulumi.String("us-central1-c"),
* NumNodes: pulumi.Int(3),
* StorageType: pulumi.String("HDD"),
* },
* },
* DeletionProtection: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = bigquery.NewAppProfile(ctx, "ap", &bigquery.AppProfileArgs{
* Instance: instance.Name,
* AppProfileId: pulumi.String("bt-profile"),
* MultiClusterRoutingUseAny: pulumi.Bool(true),
* MultiClusterRoutingClusterIds: pulumi.StringArray{
* pulumi.String("cluster-1"),
* pulumi.String("cluster-2"),
* },
* IgnoreWarnings: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.bigtable.Instance;
* import com.pulumi.gcp.bigtable.InstanceArgs;
* import com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs;
* import com.pulumi.gcp.bigquery.AppProfile;
* import com.pulumi.gcp.bigquery.AppProfileArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var instance = new Instance("instance", InstanceArgs.builder()
* .name("bt-instance")
* .clusters(
* InstanceClusterArgs.builder()
* .clusterId("cluster-1")
* .zone("us-central1-a")
* .numNodes(3)
* .storageType("HDD")
* .build(),
* InstanceClusterArgs.builder()
* .clusterId("cluster-2")
* .zone("us-central1-b")
* .numNodes(3)
* .storageType("HDD")
* .build(),
* InstanceClusterArgs.builder()
* .clusterId("cluster-3")
* .zone("us-central1-c")
* .numNodes(3)
* .storageType("HDD")
* .build())
* .deletionProtection("true")
* .build());
* var ap = new AppProfile("ap", AppProfileArgs.builder()
* .instance(instance.name())
* .appProfileId("bt-profile")
* .multiClusterRoutingUseAny(true)
* .multiClusterRoutingClusterIds(
* "cluster-1",
* "cluster-2")
* .ignoreWarnings(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* instance:
* type: gcp:bigtable:Instance
* properties:
* 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'
* ap:
* type: gcp:bigquery:AppProfile
* properties:
* 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,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* instance = gcp.bigtable.Instance("instance",
* name="bt-instance",
* clusters=[gcp.bigtable.InstanceClusterArgs(
* cluster_id="cluster-1",
* zone="us-central1-b",
* num_nodes=3,
* storage_type="HDD",
* )],
* deletion_protection=True)
* ap = gcp.bigquery.AppProfile("ap",
* instance=instance.name,
* app_profile_id="bt-profile",
* single_cluster_routing=gcp.bigquery.AppProfileSingleClusterRoutingArgs(
* cluster_id="cluster-1",
* allow_transactional_writes=True,
* ),
* standard_isolation=gcp.bigquery.AppProfileStandardIsolationArgs(
* priority="PRIORITY_LOW",
* ),
* ignore_warnings=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var instance = new Gcp.BigTable.Instance("instance", new()
* {
* Name = "bt-instance",
* Clusters = new[]
* {
* new Gcp.BigTable.Inputs.InstanceClusterArgs
* {
* ClusterId = "cluster-1",
* Zone = "us-central1-b",
* NumNodes = 3,
* StorageType = "HDD",
* },
* },
* DeletionProtection = true,
* });
* var ap = new Gcp.BigQuery.AppProfile("ap", new()
* {
* Instance = instance.Name,
* AppProfileId = "bt-profile",
* SingleClusterRouting = new Gcp.BigQuery.Inputs.AppProfileSingleClusterRoutingArgs
* {
* ClusterId = "cluster-1",
* AllowTransactionalWrites = true,
* },
* StandardIsolation = new Gcp.BigQuery.Inputs.AppProfileStandardIsolationArgs
* {
* Priority = "PRIORITY_LOW",
* },
* IgnoreWarnings = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigquery"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/bigtable"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* instance, err := bigtable.NewInstance(ctx, "instance", &bigtable.InstanceArgs{
* Name: pulumi.String("bt-instance"),
* Clusters: bigtable.InstanceClusterArray{
* &bigtable.InstanceClusterArgs{
* ClusterId: pulumi.String("cluster-1"),
* Zone: pulumi.String("us-central1-b"),
* NumNodes: pulumi.Int(3),
* StorageType: pulumi.String("HDD"),
* },
* },
* DeletionProtection: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* _, err = bigquery.NewAppProfile(ctx, "ap", &bigquery.AppProfileArgs{
* Instance: instance.Name,
* AppProfileId: pulumi.String("bt-profile"),
* SingleClusterRouting: &bigquery.AppProfileSingleClusterRoutingArgs{
* ClusterId: pulumi.String("cluster-1"),
* AllowTransactionalWrites: pulumi.Bool(true),
* },
* StandardIsolation: &bigquery.AppProfileStandardIsolationArgs{
* Priority: pulumi.String("PRIORITY_LOW"),
* },
* IgnoreWarnings: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.bigtable.Instance;
* import com.pulumi.gcp.bigtable.InstanceArgs;
* import com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs;
* import com.pulumi.gcp.bigquery.AppProfile;
* import com.pulumi.gcp.bigquery.AppProfileArgs;
* import com.pulumi.gcp.bigquery.inputs.AppProfileSingleClusterRoutingArgs;
* import com.pulumi.gcp.bigquery.inputs.AppProfileStandardIsolationArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var instance = new Instance("instance", InstanceArgs.builder()
* .name("bt-instance")
* .clusters(InstanceClusterArgs.builder()
* .clusterId("cluster-1")
* .zone("us-central1-b")
* .numNodes(3)
* .storageType("HDD")
* .build())
* .deletionProtection("true")
* .build());
* var ap = new AppProfile("ap", AppProfileArgs.builder()
* .instance(instance.name())
* .appProfileId("bt-profile")
* .singleClusterRouting(AppProfileSingleClusterRoutingArgs.builder()
* .clusterId("cluster-1")
* .allowTransactionalWrites(true)
* .build())
* .standardIsolation(AppProfileStandardIsolationArgs.builder()
* .priority("PRIORITY_LOW")
* .build())
* .ignoreWarnings(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* instance:
* type: gcp:bigtable:Instance
* properties:
* name: bt-instance
* clusters:
* - clusterId: cluster-1
* zone: us-central1-b
* numNodes: 3
* storageType: HDD
* deletionProtection: 'true'
* ap:
* type: gcp:bigquery:AppProfile
* properties:
* 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}}
* ```
*/
public class AppProfile internal constructor(
override val javaResource: com.pulumi.gcp.bigquery.AppProfile,
) : KotlinCustomResource(javaResource, AppProfileMapper) {
/**
* The unique name of the app profile in the form `[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
* - - -
*/
public val appProfileId: Output
get() = javaResource.appProfileId().applyValue({ args0 -> args0 })
/**
* Long form description of the use case for this app profile.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* If true, ignore safety checks when deleting/updating the app profile.
*/
public val ignoreWarnings: Output?
get() = javaResource.ignoreWarnings().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the instance to create the app profile within.
*/
public val instance: Output?
get() = javaResource.instance().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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.
*/
public val multiClusterRoutingClusterIds: Output>?
get() = javaResource.multiClusterRoutingClusterIds().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* 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.
*/
public val multiClusterRoutingUseAny: Output?
get() = javaResource.multiClusterRoutingUseAny().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The unique name of the requested app profile. Values are of the form `projects//instances//appProfiles/`.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* Use a single-cluster routing policy.
* Structure is documented below.
*/
public val singleClusterRouting: Output?
get() = javaResource.singleClusterRouting().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> appProfileSingleClusterRoutingToKotlin(args0) })
}).orElse(null)
})
/**
* The standard options used for isolating this app profile's traffic from other use cases.
* Structure is documented below.
*/
public val standardIsolation: Output
get() = javaResource.standardIsolation().applyValue({ args0 ->
args0.let({ args0 ->
appProfileStandardIsolationToKotlin(args0)
})
})
}
public object AppProfileMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.bigquery.AppProfile::class == javaResource::class
override fun map(javaResource: Resource): AppProfile = AppProfile(
javaResource as
com.pulumi.gcp.bigquery.AppProfile,
)
}
/**
* @see [AppProfile].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AppProfile].
*/
public suspend fun appProfile(name: String, block: suspend AppProfileResourceBuilder.() -> Unit): AppProfile {
val builder = AppProfileResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AppProfile].
* @param name The _unique_ name of the resulting resource.
*/
public fun appProfile(name: String): AppProfile {
val builder = AppProfileResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy