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
itselfcreate
itselfupdate
itselfdelete
itself
Parameter | |
---|---|
Name | Description |
app_profile_id |
str
The ID of the AppProfile. Must be of the form |
Properties
instance_admin_client
Shortcut to instance_admin_client
Returns | |
---|---|
Type | Description |
| A BigtableInstanceAdmin instance. |
name
AppProfile name used in requests.
.. literalinclude:: snippets.py :start-after: [START bigtable_api_app_profile_name] :end-before: [END bigtable_api_app_profile_name] :dedent: 4
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.
.. literalinclude:: snippets.py :start-after: [START bigtable_api_create_app_profile] :end-before: [END bigtable_api_create_app_profile] :dedent: 4
: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 |
An instance protobuf object. |
instance |
Instance
The instance that owns the cluster. |
Exceptions | |
---|---|
Type | Description |
`ValueErro |
Returns | |
---|---|
Type | Description |
| 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.
.. literalinclude:: snippets.py :start-after: [START bigtable_api_update_app_profile] :end-before: [END bigtable_api_update_app_profile] :dedent: 4