airflow.providers.google.cloud.operators.cloud_run
¶
Module Contents¶
Classes¶
Creates a job without executing it. Pushes the created job to xcom. |
|
Updates a job and wait for the operation to be completed. Pushes the updated job to xcom. |
|
Deletes a job and wait for the the operation to be completed. Pushes the deleted job to xcom. |
|
Lists jobs. |
|
Executes a job and wait for the operation to be completed. Pushes the executed job to xcom. |
- class airflow.providers.google.cloud.operators.cloud_run.CloudRunCreateJobOperator(project_id, region, job_name, job, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Creates a job without executing it. Pushes the created job to xcom.
- Parameters
project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.
region (str) – Required. The ID of the Google Cloud region that the service belongs to.
job_name (str) – Required. The name of the job to create.
job (dict | google.cloud.run_v2.Job) – Required. The job descriptor containing the configuration of the job to submit.
gcp_conn_id (str) – The connection ID used to connect to Google Cloud.
impersonation_chain (str | 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).
- class airflow.providers.google.cloud.operators.cloud_run.CloudRunUpdateJobOperator(project_id, region, job_name, job, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Updates a job and wait for the operation to be completed. Pushes the updated job to xcom.
- Parameters
project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.
region (str) – Required. The ID of the Google Cloud region that the service belongs to.
job_name (str) – Required. The name of the job to update.
job (dict | google.cloud.run_v2.Job) – Required. The job descriptor containing the new configuration of the job to update. The name field will be replaced by job_name
gcp_conn_id (str) – The connection ID used to connect to Google Cloud.
impersonation_chain (str | 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).
- class airflow.providers.google.cloud.operators.cloud_run.CloudRunDeleteJobOperator(project_id, region, job_name, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Deletes a job and wait for the the operation to be completed. Pushes the deleted job to xcom.
- Parameters
project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.
region (str) – Required. The ID of the Google Cloud region that the service belongs to.
job_name (str) – Required. The name of the job to delete.
gcp_conn_id (str) – The connection ID used to connect to Google Cloud.
impersonation_chain (str | 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).
- class airflow.providers.google.cloud.operators.cloud_run.CloudRunListJobsOperator(project_id, region, show_deleted=False, limit=None, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Lists jobs.
- Parameters
project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.
region (str) – Required. The ID of the Google Cloud region that the service belongs to.
show_deleted (bool) – If true, returns deleted (but unexpired) resources along with active ones.
limit (int | None) – The number of jobs to list. If left empty, all the jobs will be returned.
gcp_conn_id (str) – The connection ID used to connect to Google Cloud.
impersonation_chain (str | 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).
- class airflow.providers.google.cloud.operators.cloud_run.CloudRunExecuteJobOperator(project_id, region, job_name, polling_period_seconds=10, timeout_seconds=None, gcp_conn_id='google_cloud_default', impersonation_chain=None, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Executes a job and wait for the operation to be completed. Pushes the executed job to xcom.
- Parameters
project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.
region (str) – Required. The ID of the Google Cloud region that the service belongs to.
job_name (str) – Required. The name of the job to update.
job – Required. The job descriptor containing the new configuration of the job to update. The name field will be replaced by job_name
gcp_conn_id (str) – The connection ID used to connect to Google Cloud.
polling_period_seconds (float) – Optional: Control the rate of the poll for the result of deferrable run. By default, the trigger will poll every 10 seconds.
timeout – The timeout for this request.
impersonation_chain (str | 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).
deferrable (bool) – Run operator in the deferrable mode
- template_fields = ('project_id', 'region', 'gcp_conn_id', 'impersonation_chain', 'job_name')[source]¶