Delete a PubSub subscription.
Install the Google provider package into your Airflow environment.
Import the module into your DAG file and instantiate it with your desired params.
For more information on how to use this operator, take a look at the guide: Deleting a PubSub subscription
By default, if the subscription does not exist, this operator will not cause the DAG to fail.
with DAG('successful DAG') as dag:(PubSubSubscriptionDeleteOperator(project='my-project',subscription='non-existing'))
The operator can be configured to fail if the subscription already exists.
with DAG('failing DAG') as dag:(PubSubSubscriptionDeleteOperator(project='my-project', subscription='non-existing',fail_if_not_exists=True))
subscription are templated so you can use variables in them.