airflow.providers.google.cloud.hooks.alloy_db

Module contains a Google Alloy DB Hook.

Classes

AlloyDbHook

Google Alloy DB Hook.

Module Contents

class airflow.providers.google.cloud.hooks.alloy_db.AlloyDbHook(*args, **kwargs)[source]

Bases: airflow.providers.google.common.hooks.base_google.GoogleBaseHook

Google Alloy DB Hook.

get_alloy_db_admin_client()[source]

Retrieve AlloyDB client.

wait_for_operation(timeout, operation)[source]

Wait for long-lasting operation to complete.

create_cluster(cluster_id, cluster, location, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Create an Alloy DB cluster.

Parameters:
  • cluster_id (str) – Required. ID of the cluster to create.

  • cluster (google.cloud.alloydb_v1.Cluster | dict) – Required. Cluster to create. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.Cluster

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

create_secondary_cluster(cluster_id, cluster, location, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Create a secondary Alloy DB cluster.

Parameters:
  • cluster_id (str) – Required. ID of the cluster to create.

  • cluster (google.cloud.alloydb_v1.Cluster | dict) – Required. Cluster to create. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.Cluster

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

get_cluster(cluster_id, location, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Retrieve an Alloy DB cluster.

Parameters:
  • cluster_id (str) – Required. ID of the cluster.

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

update_cluster(cluster_id, cluster, location, update_mask=None, project_id=PROVIDE_PROJECT_ID, allow_missing=False, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Update an Alloy DB cluster.

Parameters:
  • cluster_id (str) – Required. ID of the cluster to update.

  • cluster (google.cloud.alloydb_v1.Cluster | dict) – Required. Cluster to create. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.Cluster

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask | dict | None) – Optional. Field mask is used to specify the fields to be overwritten in the Cluster resource by the update.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • allow_missing (bool) – Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and update_mask is ignored.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

delete_cluster(cluster_id, location, project_id=PROVIDE_PROJECT_ID, request_id=None, etag=None, validate_only=False, force=False, retry=DEFAULT, timeout=None, metadata=())[source]

Delete an Alloy DB cluster.

Parameters:
  • cluster_id (str) – Required. ID of the cluster to delete.

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • etag (str | None) – Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, deletion will be blocked and an ABORTED error will be returned.

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • force (bool) – Optional. Whether to cascade delete child instances for given cluster.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

create_instance(cluster_id, instance_id, instance, location, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Create an instance in a given Alloy DB cluster.

Parameters:
  • cluster_id (str) – Required. ID of the cluster for creating an instance in.

  • instance_id (str) – Required. ID of the instance to create.

  • instance (google.cloud.alloydb_v1.Instance | dict) – Required. Instance to create. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.Instance

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

create_secondary_instance(cluster_id, instance_id, instance, location, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Create a secondary instance in a given Alloy DB cluster.

Parameters:
  • cluster_id (str) – Required. ID of the cluster for creating an instance in.

  • instance_id (str) – Required. ID of the instance to create.

  • instance (google.cloud.alloydb_v1.Instance | dict) – Required. Instance to create. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.Instance

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

get_instance(cluster_id, instance_id, location, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Retrieve an Alloy DB instance.

Parameters:
  • cluster_id (str) – Required. ID of the cluster.

  • instance_id (str) – Required. ID of the instance.

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

update_instance(cluster_id, instance_id, instance, location, update_mask=None, project_id=PROVIDE_PROJECT_ID, allow_missing=False, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Update an Alloy DB instance.

Parameters:
  • cluster_id (str) – Required. ID of the cluster.

  • instance_id (str) – Required. ID of the cluster to update.

  • instance (google.cloud.alloydb_v1.Instance | dict) – Required. Cluster to update. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.Instance

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask | dict | None) – Optional. Field mask is used to specify the fields to be overwritten in the Instance resource by the update.

  • request_id (str | None) – Optional. The ID of an existing request object.:param request_id: Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • allow_missing (bool) – Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and update_mask is ignored.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

delete_instance(instance_id, cluster_id, location, project_id=PROVIDE_PROJECT_ID, request_id=None, etag=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Delete an Alloy DB instance.

Parameters:
  • instance_id (str) – Required. ID of the instance to delete.

  • cluster_id (str) – Required. ID of the cluster.

  • location (str) – Required. The ID of the Google Cloud region where the instance is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the instance is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • etag (str | None) – Optional. The current etag of the Instance. If an etag is provided and does not match the current etag of the Instance, deletion will be blocked and an ABORTED error will be returned.

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the delete request.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

create_user(user_id, user, cluster_id, location, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Create a user in a given Alloy DB cluster.

Parameters:
  • user_id (str) – Required. ID of the user to create.

  • user (google.cloud.alloydb_v1.User | dict) – Required. The user to create. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.User

  • cluster_id (str) – Required. ID of the cluster for creating a user in.

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

get_user(user_id, cluster_id, location, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Get a user in a given Alloy DB cluster.

Parameters:
  • user_id (str) – Required. ID of the user to create.

  • cluster_id (str) – Required. ID of the cluster for creating a user in.

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

update_user(cluster_id, user_id, user, location, update_mask=None, allow_missing=False, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Update an Alloy DB user.

Parameters:
  • cluster_id (str) – Required. ID of the cluster.

  • user_id (str) – Required. ID of the user to update.

  • user (google.cloud.alloydb_v1.User | dict) – Required. User to update. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.User

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask | dict | None) – Optional. Field mask is used to specify the fields to be overwritten in the User resource by the update.

  • request_id (str | None) – Optional. The ID of an existing request object.:param request_id: Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • allow_missing (bool) – Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and update_mask is ignored.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

delete_user(user_id, cluster_id, location, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Delete an Alloy DB user.

Parameters:
  • user_id (str) – Required. ID of the user to delete.

  • cluster_id (str) – Required. ID of the cluster.

  • location (str) – Required. The ID of the Google Cloud region where the instance is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the instance is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the delete request.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

create_backup(backup_id, backup, location, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Create a backup in a given Alloy DB cluster.

Parameters:
  • backup_id (str) – Required. ID of the backup to create.

  • backup (google.cloud.alloydb_v1.Backup | dict) – Required. The backup to create. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.Backup

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

get_backup(backup_id, location, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[source]

Get a backup in a given Alloy DB cluster.

Parameters:
  • backup_id (str) – Required. ID of the backup to create.

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

update_backup(backup_id, backup, location, update_mask=None, allow_missing=False, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Update an Alloy DB backup.

Parameters:
  • backup_id (str) – Required. ID of the backup to update.

  • backup (google.cloud.alloydb_v1.Backup | dict) – Required. Backup to update. For more details please see API documentation: https://cloud.google.com/python/docs/reference/alloydb/latest/google.cloud.alloydb_v1.types.Backup

  • location (str) – Required. The ID of the Google Cloud region where the cluster is located.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask | dict | None) – Optional. Field mask is used to specify the fields to be overwritten in the Backup resource by the update.

  • request_id (str | None) – Optional. The ID of an existing request object.:param request_id: Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the create request.

  • allow_missing (bool) – Optional. If set to true, update succeeds even if cluster is not found. In that case, a new cluster is created and update_mask is ignored.

  • project_id (str) – Optional. The ID of the Google Cloud project where the cluster is located.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

delete_backup(backup_id, location, project_id=PROVIDE_PROJECT_ID, request_id=None, validate_only=False, retry=DEFAULT, timeout=None, metadata=())[source]

Delete an Alloy DB backup.

Parameters:
  • backup_id (str) – Required. ID of the backup to delete.

  • location (str) – Required. The ID of the Google Cloud region where the instance is located.

  • project_id (str) – Optional. The ID of the Google Cloud project where the instance is located.

  • request_id (str | None) – Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server ignores the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

  • validate_only (bool) – Optional. If set, performs request validation, but does not actually execute the delete request.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. Designation of what errors, if any, should be retried.

  • timeout (float | None) – Optional. The timeout for this request.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Strings which should be sent along with the request as metadata.

Was this entry helpful?