## Resource: AppProfile

A configuration object describing how Cloud Bigtable should treat traffic from a particular end user application.

| JSON representation |
|---|
| ``` { "name": string, "etag": string, "description": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "multiClusterRoutingUseAny": { object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#MultiClusterRoutingUseAny`) }, "singleClusterRouting": { object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#SingleClusterRouting`) } // End of mutually exclusive fields. // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "priority": enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#Priority`), "standardIsolation": { object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#StandardIsolation`) }, "dataBoostIsolationReadOnly": { object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#DataBoostIsolationReadOnly`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `name` | `string` The unique name of the app profile, up to 50 characters long. Values are of the form `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. |
| `etag` | `string` Strongly validated etag for optimistic concurrency control. Preserve the value returned from `appProfiles.get` when calling `appProfiles.patch` to fail the request if there has been a modification in the meantime. The `updateMask` of the request need not include `etag` for this protection to apply. See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more details. |
| `description` | `string` Long form description of the use case for this AppProfile. |
| The routing policy for all read/write requests that use this app profile. A value must be explicitly set. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `multiClusterRoutingUseAny` | ``object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#MultiClusterRoutingUseAny`)`` Use a multi-cluster routing policy. |
| `singleClusterRouting` | ``object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#SingleClusterRouting`)`` Use a single-cluster routing policy. |
| End of mutually exclusive fields. ||
| Options for isolating this app profile's traffic from other use cases. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `priority (deprecated)` | ``enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#Priority`)`` > [!WARNING] > This item is deprecated! This field has been deprecated in favor of `standardIsolation.priority`. If you set this field, `standardIsolation.priority` will be set instead. The priority of requests sent using this app profile. |
| `standardIsolation` | ``object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#StandardIsolation`)`` The standard options used for isolating this app profile's traffic from other use cases. |
| `dataBoostIsolationReadOnly` | ``object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#DataBoostIsolationReadOnly`)`` Specifies that this app profile is intended for read-only usage via the Data Boost feature. |
| End of mutually exclusive fields. ||

## MultiClusterRoutingUseAny

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.

| JSON representation |
|---|
| ``` { "clusterIds": [ string ], // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "rowAffinity": { object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#RowAffinity`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `clusterIds[]` | `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. |
| Possible algorithms for routing affinity. If enabled, Bigtable will route between equidistant clusters in a deterministic order rather than choosing randomly. This mechanism gives read-your-writes consistency for *most* requests under *most* circumstances, without sacrificing availability. Consistency is *not* guaranteed, as requests might still fail over between clusters in the event of errors or latency. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `rowAffinity` | ``object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#RowAffinity`)`` Row affinity sticky routing based on the row key of the request. Requests that span multiple rows are routed non-deterministically. |
| End of mutually exclusive fields. ||

## RowAffinity

This type has no fields.
If enabled, Bigtable will route the request based on the row key of the request, rather than randomly. Instead, each row key will be assigned to a cluster, and will stick to that cluster. If clusters are added or removed, then this may affect which row keys stick to which clusters. To avoid this, users can use a cluster group to specify which clusters are to be used. In this case, new clusters that are not a part of the cluster group will not be routed to, and routing will be unaffected by the new cluster. Moreover, clusters specified in the cluster group cannot be deleted unless removed from the cluster group.

## SingleClusterRouting

Unconditionally routes all read/write requests to a specific cluster. This option preserves read-your-writes consistency but does not improve availability.

| JSON representation |
|---|
| ``` { "clusterId": string, "allowTransactionalWrites": boolean } ``` |

| Fields ||
|---|---|
| `clusterId` | `string` The cluster to which read/write requests should be routed. |
| `allowTransactionalWrites` | `boolean` Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are allowed by this app profile. It is unsafe to send these requests to the same table/row/column in multiple clusters. |

## Priority

Possible priorities for an app profile. Note that higher priority writes can sometimes queue behind lower priority writes to the same tablet, as writes must be strictly sequenced in the durability log.

| Enums ||
|---|---|
| `PRIORITY_UNSPECIFIED` | Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation. |
| `PRIORITY_LOW` |   |
| `PRIORITY_MEDIUM` |   |
| `PRIORITY_HIGH` |   |

## StandardIsolation

Standard options for isolating this app profile's traffic from other use cases.

| JSON representation |
|---|
| ``` { "priority": enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#Priority`), "memoryConfig": { object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#MemoryConfig`) } } ``` |

| Fields ||
|---|---|
| `priority` | ``enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#Priority`)`` The priority of requests sent using this app profile. |
| `memoryConfig` | ``object (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#MemoryConfig`)`` Optional. The memory config to use for requests sent using this app profile. |

## MemoryConfig

This type has no fields.
If set, eligible single-row requests (currently limited to ReadRows) using this app profile will be routed to the memory layer. All eligible writes populate the memory layer. MemoryConfig can only be set if the AppProfile uses single cluster routing and the configured cluster has a memory layer enabled.

## DataBoostIsolationReadOnly

Data Boost is a serverless compute capability that lets you run high-throughput read jobs and queries on your Bigtable data, without impacting the performance of the clusters that handle your application traffic. Data Boost supports read-only use cases with single-cluster routing.

| JSON representation |
|---|
| ``` { "computeBillingOwner": enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#ComputeBillingOwner`) } ``` |

| Fields ||
|---|---|
| `computeBillingOwner` | ``enum (`https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles#ComputeBillingOwner`)`` The Compute Billing Owner for this Data Boost App Profile. |

## ComputeBillingOwner

Compute Billing Owner specifies how usage should be accounted when using Data Boost. Compute Billing Owner also configures which Cloud Project is charged for relevant quota.

| Enums ||
|---|---|
| `COMPUTE_BILLING_OWNER_UNSPECIFIED` | Unspecified value. |
| `HOST_PAYS` | The host Cloud Project containing the targeted Bigtable Instance / Table pays for compute. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles/create` | Creates an app profile within an instance. |
| ### `https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles/delete` | Deletes an app profile from an instance. |
| ### `https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles/get` | Gets information about an app profile. |
| ### `https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles/list` | Lists information about app profiles in an instance. |
| ### `https://docs.cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.appProfiles/patch` | Updates an app profile within an instance. |