CloudFunctionDeployFunctionOperator

Google

Creates a function in Google Cloud Functions. If a function with this name already exists, it will be updated.

View Source

Last Updated: May. 7, 2021

Access Instructions

Install the Google provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

locationstrGoogle Cloud region where the function should be created.
bodydict or google.cloud.functions.v1.CloudFunctionBody of the Cloud Functions definition. The body must be a Cloud Functions dictionary as described in: https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions . Different API versions require different variants of the Cloud Functions dictionary.
project_idstr(Optional) Google Cloud project ID where the function should be created.
gcp_conn_idstr(Optional) The connection ID used to connect to Google Cloud. Default 'google_cloud_default'.
api_versionstr(Optional) API version used (for example v1 - default - or v1beta1).
zip_pathstrPath to zip file containing source code of the function. If the path is set, the sourceUploadUrl should not be specified in the body or it should be empty. Then the zip file will be uploaded using the upload URL generated via generateUploadUrl from the Cloud Functions API.
validate_bodyboolIf set to False, body validation is not performed.
impersonation_chainUnion[str, Sequence[str]]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).

Documentation

Creates a function in Google Cloud Functions. If a function with this name already exists, it will be updated.

See also

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

Was this page helpful?