2.42.0 (latest) 2.41.0 2.40.0 2.39.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.1 2.29.0 2.28.1 2.26.0 2.25.0 2.24.0 2.23.1 2.22.0 2.21.0 2.20.0 2.19.0 2.18.1 2.17.0 2.16.0 2.15.0 2.14.1 2.13.2 2.12.0 2.11.3 2.10.1 2.9.0 2.8.1 2.7.1 2.6.0 2.5.2 2.4.0 2.3.3 2.2.0 2.1.0 2.0.0 1.7.3 1.6.1 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.0 0.34.0

    AppProfile(
        app_profile_id,
        instance,
        routing_policy_type=None,
        description=None,
        cluster_id=None,
        multi_cluster_ids=None,
        allow_transactional_writes=None,
    )

Representation of a Google Cloud Bigtable AppProfile.

We can use a `AppProfile` to:

- `reload` itself
- `create` itself
- `update` itself
- `delete` itself

| ## Parameter ||
|---|---|
| **Name** | **Description** |
| `app_profile_id` | `str` The ID of the AppProfile. Must be of the form `` `<code>_a-zA-Z0-9][-_.a-zA-Z0-9]</code>* ```. :type: routing_policy_type: int :param: routing_policy_type: (Optional) The type of the routing policy. Possible values are represented by the following constants: :data:`google.cloud.bigtable.enums.RoutingPolicyType.ANY` :data:`google.cloud.bigtable.enums.RoutingPolicyType.SINGLE\` :type: description: str :param: description: (Optional) Long form description of the use case for this AppProfile. :type: cluster_id: str :param: cluster_id: (Optional) Unique cluster_id which is only required when routing_policy_type is ROUTING_POLICY_TYPE_SINGLE. :type: multi_cluster_ids: list :param: multi_cluster_ids: (Optional) 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. :type: allow_transactional_writes: bool :param: allow_transactional_writes: (Optional) If true, allow transactional writes for ROUTING_POLICY_TYPE_SINGLE. |

## Properties

### instance_admin_client

Shortcut to instance_admin_client

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `` `.bigtable_admin_pb2.BigtableInstanceAdmin` `` | A BigtableInstanceAdmin instance. |

### name

AppProfile name used in requests.

<br />

> [!NOTE]
> **Note:** This property will not change if `app_profile_id` does not, but the return value is not cached.

.. literalinclude:: snippets.py :start-after: \[START bigtable_api_app_profile_name\] :end-before: \[END bigtable_api_app_profile_name\] :dedent: 4

<br />

The AppProfile name is of the form
`"projects/../instances/../app_profile/{app_profile_id}"`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `str` | The AppProfile name. |

## Methods

### create

    create(ignore_warnings=None)

Create this AppProfile.

<br />

> [!NOTE]
> **Note:** Uses the `instance` and `app_profile_id` on the current `AppProfile` in addition to the `routing_policy_type`, `description`, `cluster_id` and `allow_transactional_writes`. To change them before creating, reset the values via

.. literalinclude:: snippets.py :start-after: \[START bigtable_api_create_app_profile\] :end-before: \[END bigtable_api_create_app_profile\] :dedent: 4

<br />

:type: ignore_warnings: bool
:param: ignore_warnings: (Optional) If true, ignore safety checks when
creating the AppProfile.

### delete

    delete(ignore_warnings=None)

Delete this AppProfile.

For example:

.. literalinclude:: snippets.py
:start-after: \[START bigtable_api_delete_app_profile\]
:end-before: \[END bigtable_api_delete_app_profile\]
:dedent: 4

:type: ignore_warnings: bool
:param: ignore_warnings: If true, ignore safety checks when deleting
the AppProfile.

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `google.api_core.exceptions.GoogleAPICallError` | If the request failed for any reason. google.api_core.exceptions.RetryError: If the request failed due to a retryable error and retry attempts failed. ValueError: If the parameters are invalid. |

### exists

    exists()

Check whether the AppProfile already exists.

For example:

.. literalinclude:: snippets.py
:start-after: \[START bigtable_api_app_profile_exists\]
:end-before: \[END bigtable_api_app_profile_exists\]
:dedent: 4

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` | True if the AppProfile exists, else False. |

### from_pb

    from_pb(app_profile_pb, instance)

Creates an instance app_profile from a protobuf.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `app_profile_pb` | `` `instance.app_profile_pb` `` An instance protobuf object. |
| `instance` | `https://docs.cloud.google.com/python/docs/reference/bigtable/latest/google.cloud.bigtable.instance.Instance` The instance that owns the cluster. |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `` `ValueErro `` |   |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `` `AppProfile` `` | The AppProfile parsed from the protobuf response. |

### reload

    reload()

Reload the metadata for this cluster

For example:

.. literalinclude:: snippets.py
:start-after: \[START bigtable_api_reload_app_profile\]
:end-before: \[END bigtable_api_reload_app_profile\]
:dedent: 4

### update

    update(ignore_warnings=None)

Update this app_profile.

<br />

> [!NOTE]
> **Note:** Update any or all of the following values: `routing_policy_type` `description` `cluster_id` `multi_cluster_ids` `allow_transactional_writes`

.. literalinclude:: snippets.py :start-after: \[START bigtable_api_update_app_profile\] :end-before: \[END bigtable_api_update_app_profile\] :dedent: 4

<br />