airflow.providers.google.cloud.hooks.gdm

Module Contents

Classes

GoogleDeploymentManagerHook

Interact with Google Cloud Deployment Manager using the Google Cloud connection.

class airflow.providers.google.cloud.hooks.gdm.GoogleDeploymentManagerHook(gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None)[source]

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

Interact with Google Cloud Deployment Manager using the Google Cloud connection. This allows for scheduled and programmatic inspection and deletion of resources managed by GDM.

get_conn()[source]

Returns a Google Deployment Manager service object.

list_deployments(project_id=None, deployment_filter=None, order_by=None)[source]

Lists deployments in a google cloud project.

Parameters
  • project_id (str | None) – The project ID for this request.

  • deployment_filter (str | None) – A filter expression which limits resources returned in the response.

  • order_by (str | None) – A field name to order by, ex: “creationTimestamp desc”

delete_deployment(project_id, deployment=None, delete_policy=None)[source]

Deletes a deployment and all associated resources in a google cloud project.

Parameters
  • project_id (str | None) – The project ID for this request.

  • deployment (str | None) – The name of the deployment for this request.

  • delete_policy (str | None) – Sets the policy to use for deleting resources. (ABANDON | DELETE)

Was this entry helpful?