2.41.0 (latest) 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 After creating a [`Client`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/client#google.cloud.bigtable.client.Client), you can
interact with individual instances for a project.

## List Instances

If you want a comprehensive list of all existing instances, make a
[ListInstances](https://googleapis.dev/python/bigtable/latest/instance-api.html#list-instances) API request with
[`Client.list_instances()`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/client#google.cloud.bigtable.client.Client.list_instances):

    instances = client.list_instances()

## Instance Factory

To create an [`Instance`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/instance#google.cloud.bigtable.instance.Instance) object:

    instance = client.instance(instance_id, display_name=display_name)

- `display_name` is optional. When not provided, `display_name` defaults to the `instance_id` value.

You can also use `Client.instance()` to create a local wrapper for
instances that have already been created with the API, or through the web
console:

    instance = client.instance(existing_instance_id)
    instance.reload()

## Create a new Instance

After creating the instance object, make a [CreateInstance](https://googleapis.dev/python/bigtable/latest/instance-api.html#create-a-new-instance) API request
with [`create()`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/instance#google.cloud.bigtable.instance.Instance.create):

    instance.display_name = 'My very own instance'
    instance.create()

## Check on Current Operation

**NOTE** : When modifying an instance (via a [CreateInstance](https://googleapis.dev/python/bigtable/latest/instance-api.html#create-a-new-instance) request), the Bigtable
API will return a [long-running operation](https://github.com/googleapis/googleapis/blob/main/google/longrunning/operations.proto#L128-L162) and a corresponding
`Operation` object
will be returned by
[`create()`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/instance#google.cloud.bigtable.instance.Instance.create).

You can check if a long-running operation (for a
[`create()`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/instance#google.cloud.bigtable.instance.Instance.create) has finished
by making a [GetOperation](https://googleapis.dev/python/bigtable/latest/instance-api.html#check-on-current-operation) request with
`Operation.finished()`:

    >>> operation = instance.create()
    >>> operation.finished()
    True

**NOTE** : Once an `Operation` object
has returned [`True`](https://docs.python.org/3/library/constants.html#True) from
`finished()`, the
object should not be re-used. Subsequent calls to
`finished()`
will result in a `ValueError`.

## Get metadata for an existing Instance

After creating the instance object, make a [GetInstance](https://googleapis.dev/python/bigtable/latest/instance-api.html#get-metadata-for-an-existing-instance) API request
with [`reload()`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/instance#google.cloud.bigtable.instance.Instance.reload):

    instance.reload()

This will load `display_name` for the existing `instance` object.

## Update an existing Instance

After creating the instance object, make an [UpdateInstance](https://googleapis.dev/python/bigtable/latest/instance-api.html#update-an-existing-instance) API request
with [`update()`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/instance#google.cloud.bigtable.instance.Instance.update):

    instance.display_name = 'New display_name'
    instance.update()

## Delete an existing Instance

Make a [DeleteInstance](https://googleapis.dev/python/bigtable/latest/instance-api.html#delete-an-existing-instance) API request with
[`delete()`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/instance#google.cloud.bigtable.instance.Instance.delete):

    instance.delete()

## Next Step

Now we go down the hierarchy from
[`Instance`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/instance#google.cloud.bigtable.instance.Instance) to a
[`Table`](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/table#google.cloud.bigtable.table.Table).

Head next to learn about the [Table Admin API](https://docs-0cloud-0google-0com.linkedin.net.nz/python/docs/reference/bigtable/latest/table-api).