airflow.providers.google.cloud.operators.alloy_db

This module contains Google Cloud Alloy DB operators.

Classes

AlloyDBBaseOperator

Base class for all AlloyDB operators.

AlloyDBWriteBaseOperator

Base class for writing AlloyDB operators.

AlloyDBCreateClusterOperator

Create an Alloy DB cluster.

AlloyDBUpdateClusterOperator

Update an Alloy DB cluster.

AlloyDBDeleteClusterOperator

Delete an Alloy DB cluster.

AlloyDBCreateInstanceOperator

Create an Instance in an Alloy DB cluster.

AlloyDBUpdateInstanceOperator

Update an Alloy DB instance.

AlloyDBDeleteInstanceOperator

Delete an Alloy DB instance.

AlloyDBCreateUserOperator

Create a User in an Alloy DB cluster.

AlloyDBUpdateUserOperator

Update an Alloy DB user.

AlloyDBDeleteUserOperator

Delete an Alloy DB user.

AlloyDBCreateBackupOperator

Create a Backup in an Alloy DB cluster.

AlloyDBUpdateBackupOperator

Update an Alloy DB backup.

AlloyDBDeleteBackupOperator

Delete an Alloy DB backup.

Module Contents

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBBaseOperator(project_id, location, gcp_conn_id='google_cloud_default', retry=DEFAULT, timeout=None, metadata=(), impersonation_chain=None, *args, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

Base class for all AlloyDB operators.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project where the service is used.

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

  • gcp_conn_id (str) – Optional. The connection ID to use to connect to Google Cloud.

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout (float | None) – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata (collections.abc.Sequence[tuple[str, str]]) – Optional. Additional metadata that is provided to the method.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str] = ('project_id', 'location', 'gcp_conn_id')[source]
project_id[source]
location[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
retry[source]
timeout = None[source]
metadata = ()[source]
property hook: airflow.providers.google.cloud.hooks.alloy_db.AlloyDbHook[source]
class airflow.providers.google.cloud.operators.alloy_db.AlloyDBWriteBaseOperator(request_id=None, validate_request=False, *args, **kwargs)[source]

Bases: AlloyDBBaseOperator

Base class for writing AlloyDB operators.

These operators perform create, update or delete operations. with the objects (not inside of database).

Parameters:
  • 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_request (bool) – Optional. If set, performs request validation, but does not actually execute the request.

template_fields: collections.abc.Sequence[str][source]
request_id = None[source]
validate_request = False[source]
get_operation_result(operation)[source]

Retrieve operation result as a proto.Message.

If the validate_request parameter is set, then no operation is performed and thus nothing to wait.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBCreateClusterOperator(cluster_id, cluster_configuration, is_secondary=False, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Create an Alloy DB cluster.

See also

For more information on how to use this operator, take a look at the guide: Create cluster

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

  • cluster_configuration (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

  • is_secondary (bool) – Required. Specifies if the Cluster to be created is Primary or Secondary. Please note, if set True, then specify the secondary_config field in the cluster so the created secondary cluster was pointing to the primary cluster.

  • 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_request – Optional. If set, performs request validation, but does not actually execute the request.

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
cluster_configuration[source]
is_secondary = False[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBUpdateClusterOperator(cluster_id, cluster_configuration, update_mask=None, allow_missing=False, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Update an Alloy DB cluster.

See also

For more information on how to use this operator, take a look at the guide: Update cluster

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

  • cluster_configuration (google.cloud.alloydb_v1.Cluster | 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.Cluster

  • 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 – 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_request – Optional. If set, performs request validation, but does not actually execute the 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 – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
cluster_configuration[source]
update_mask = None[source]
allow_missing = False[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBDeleteClusterOperator(cluster_id, etag=None, force=False, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Delete an Alloy DB cluster.

See also

For more information on how to use this operator, take a look at the guide: Delete cluster

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

  • 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_request – Optional. If set, performs request validation, but does not actually execute the request.

  • 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.

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

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
etag = None[source]
force = False[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBCreateInstanceOperator(cluster_id, instance_id, instance_configuration, is_secondary=False, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Create an Instance in an Alloy DB cluster.

See also

For more information on how to use this operator, take a look at the guide: Create instance

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_configuration (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

  • is_secondary (bool) – Required. Specifies if the Instance to be created is Primary or Secondary. Please note, if set True, then specify the instance_type field in the instance.

  • 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_request – Optional. If set, performs request validation, but does not actually execute the request.

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
instance_id[source]
instance_configuration[source]
is_secondary = False[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBUpdateInstanceOperator(cluster_id, instance_id, instance_configuration, update_mask=None, allow_missing=False, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Update an Alloy DB instance.

See also

For more information on how to use this operator, take a look at the guide: Update instance

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

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

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

  • 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 – 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_request – Optional. If set, performs request validation, but does not actually execute the request.

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

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
instance_id[source]
instance_configuration[source]
update_mask = None[source]
allow_missing = False[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBDeleteInstanceOperator(instance_id, cluster_id, etag=None, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Delete an Alloy DB instance.

See also

For more information on how to use this operator, take a look at the guide: Delete instance

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

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

  • 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_request – Optional. If set, performs request validation, but does not actually execute the request.

  • 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.

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
instance_id[source]
cluster_id[source]
etag = None[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBCreateUserOperator(user_id, user_configuration, cluster_id, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Create a User in an Alloy DB cluster.

See also

For more information on how to use this operator, take a look at the guide: Create user

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

  • user_configuration (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.

  • 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_request – Optional. If set, performs request validation, but does not actually execute the request.

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
user_id[source]
user_configuration[source]
cluster_id[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBUpdateUserOperator(cluster_id, user_id, user_configuration, update_mask=None, allow_missing=False, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Update an Alloy DB user.

See also

For more information on how to use this operator, take a look at the guide: Update user

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

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

  • user_configuration (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

  • 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 – 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_request – Optional. If set, performs request validation, but does not actually execute the request.

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

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
user_id[source]
user_configuration[source]
update_mask = None[source]
allow_missing = False[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBDeleteUserOperator(user_id, cluster_id, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Delete an Alloy DB user.

See also

For more information on how to use this operator, take a look at the guide: Delete user

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

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

  • 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_request – Optional. If set, performs request validation, but does not actually execute the request.

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
user_id[source]
cluster_id[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBCreateBackupOperator(backup_id, backup_configuration, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Create a Backup in an Alloy DB cluster.

See also

For more information on how to use this operator, take a look at the guide: Create backup

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

  • backup_configuration (google.cloud.alloydb_v1.Backup | dict) – Required. 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

  • 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_request – Optional. If set, performs request validation, but does not actually execute the request.

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the backups should be saved.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
backup_id[source]
backup_configuration[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBUpdateBackupOperator(backup_id, backup_configuration, update_mask=None, allow_missing=False, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Update an Alloy DB backup.

See also

For more information on how to use this operator, take a look at the guide: Update backup

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

  • backup_configuration (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

  • 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 – 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_request – Optional. If set, performs request validation, but does not actually execute the request.

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

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
backup_id[source]
backup_configuration[source]
update_mask = None[source]
allow_missing = False[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.alloy_db.AlloyDBDeleteBackupOperator(backup_id, *args, **kwargs)[source]

Bases: AlloyDBWriteBaseOperator

Delete an Alloy DB backup.

See also

For more information on how to use this operator, take a look at the guide: Delete backup

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

  • 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_request – Optional. If set, performs request validation, but does not actually execute the request.

  • project_id – Required. The ID of the Google Cloud project where the service is used.

  • location – Required. The ID of the Google Cloud region where the service is used.

  • gcp_conn_id – Optional. The connection ID to use to connect to Google Cloud.

  • retry – Optional. A retry object used to retry requests. If None is specified, requests will not be retried.

  • timeout – Optional. The amount of time, in seconds, to wait for the request to complete. Note that if retry is specified, the timeout applies to each individual attempt.

  • metadata – Optional. Additional metadata that is provided to the method.

  • impersonation_chain – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: collections.abc.Sequence[str][source]
backup_id[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?