| :py:mod:`airflow.providers.google.cloud.operators.stackdriver` |
| ============================================================== |
| |
| .. py:module:: airflow.providers.google.cloud.operators.stackdriver |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverListAlertPoliciesOperator |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverEnableAlertPoliciesOperator |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverDisableAlertPoliciesOperator |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverUpsertAlertOperator |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverDeleteAlertOperator |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverListNotificationChannelsOperator |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverEnableNotificationChannelsOperator |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverDisableNotificationChannelsOperator |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverUpsertNotificationChannelOperator |
| airflow.providers.google.cloud.operators.stackdriver.StackdriverDeleteNotificationChannelOperator |
| |
| |
| |
| |
| .. py:class:: StackdriverListAlertPoliciesOperator(*, format_ = None, filter_ = None, order_by = None, page_size = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Fetches all the Alert Policies identified by the filter passed as |
| filter parameter. The desired return type can be specified by the |
| format parameter, the supported formats are "dict", "json" and None |
| which returns python dictionary, stringified JSON and protobuf |
| respectively. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverListAlertPoliciesOperator` |
| |
| :param format_: (Optional) Desired output format of the result. The |
| supported formats are "dict", "json" and None which returns |
| python dictionary, stringified JSON and protobuf respectively. |
| :param filter_: If provided, this field specifies the criteria that must be met by alert |
| policies to be included in the response. |
| For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering. |
| :param order_by: A comma-separated list of fields by which to sort the result. |
| Supports the same set of field references as the ``filter`` field. Entries |
| can be prefixed with a minus sign to sort by the field in descending order. |
| For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering. |
| :param page_size: The maximum number of resources contained in the |
| underlying API response. If page streaming is performed per- |
| resource, this parameter does not affect the return value. If page |
| streaming is performed per-page, this determines the maximum number |
| of resources in a page. |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The project to fetch alerts from. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['filter_', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: StackdriverEnableAlertPoliciesOperator(*, filter_ = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Enables one or more disabled alerting policies identified by filter |
| parameter. Inoperative in case the policy is already enabled. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverEnableAlertPoliciesOperator` |
| |
| :param filter_: If provided, this field specifies the criteria that |
| must be met by alert policies to be enabled. |
| For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering. |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The project in which alert needs to be enabled. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['filter_', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: StackdriverDisableAlertPoliciesOperator(*, filter_ = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Disables one or more enabled alerting policies identified by filter |
| parameter. Inoperative in case the policy is already disabled. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverDisableAlertPoliciesOperator` |
| |
| :param filter_: If provided, this field specifies the criteria that |
| must be met by alert policies to be disabled. |
| For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering. |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The project in which alert needs to be disabled. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['filter_', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: StackdriverUpsertAlertOperator(*, alerts, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Creates a new alert or updates an existing policy identified |
| the name field in the alerts parameter. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverUpsertAlertOperator` |
| |
| :param alerts: A JSON string or file that specifies all the alerts that needs |
| to be either created or updated. For more details, see |
| https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies#AlertPolicy. |
| (templated) |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The project in which alert needs to be created/updated. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['alerts', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: template_ext |
| :annotation: :Sequence[str] = ['.json'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: StackdriverDeleteAlertOperator(*, name, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Deletes an alerting policy. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverDeleteAlertOperator` |
| |
| :param name: The alerting policy to delete. The format is: |
| ``projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]``. |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The project from which alert needs to be deleted. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['name', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: StackdriverListNotificationChannelsOperator(*, format_ = None, filter_ = None, order_by = None, page_size = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Fetches all the Notification Channels identified by the filter passed as |
| filter parameter. The desired return type can be specified by the |
| format parameter, the supported formats are "dict", "json" and None |
| which returns python dictionary, stringified JSON and protobuf |
| respectively. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverListNotificationChannelsOperator` |
| |
| :param format_: (Optional) Desired output format of the result. The |
| supported formats are "dict", "json" and None which returns |
| python dictionary, stringified JSON and protobuf respectively. |
| :param filter_: If provided, this field specifies the criteria that |
| must be met by notification channels to be included in the response. |
| For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering. |
| :param order_by: A comma-separated list of fields by which to sort the result. |
| Supports the same set of field references as the ``filter`` field. Entries |
| can be prefixed with a minus sign to sort by the field in descending order. |
| For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering. |
| :param page_size: The maximum number of resources contained in the |
| underlying API response. If page streaming is performed per- |
| resource, this parameter does not affect the return value. If page |
| streaming is performed per-page, this determines the maximum number |
| of resources in a page. |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The project to fetch notification channels from. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['filter_', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: StackdriverEnableNotificationChannelsOperator(*, filter_ = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Enables one or more disabled alerting policies identified by filter |
| parameter. Inoperative in case the policy is already enabled. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverEnableNotificationChannelsOperator` |
| |
| :param filter_: If provided, this field specifies the criteria that |
| must be met by notification channels to be enabled. |
| For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering. |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The location used for the operation. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['filter_', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: StackdriverDisableNotificationChannelsOperator(*, filter_ = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Disables one or more enabled notification channels identified by filter |
| parameter. Inoperative in case the policy is already disabled. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverDisableNotificationChannelsOperator` |
| |
| :param filter_: If provided, this field specifies the criteria that |
| must be met by alert policies to be disabled. |
| For more details, see https://cloud.google.com/monitoring/api/v3/sorting-and-filtering. |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The project in which notification channels needs to be enabled. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['filter_', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: StackdriverUpsertNotificationChannelOperator(*, channels, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Creates a new notification or updates an existing notification channel |
| identified the name field in the alerts parameter. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverUpsertNotificationChannelOperator` |
| |
| :param channels: A JSON string or file that specifies all the alerts that needs |
| to be either created or updated. For more details, see |
| https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannels. |
| (templated) |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The project in which notification channels needs to be created/updated. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['channels', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: template_ext |
| :annotation: :Sequence[str] = ['.json'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: StackdriverDeleteNotificationChannelOperator(*, name, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', project_id = None, delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Deletes a notification channel. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:StackdriverDeleteNotificationChannelOperator` |
| |
| :param name: The alerting policy to delete. The format is: |
| ``projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]``. |
| :param retry: A retry object used to retry requests. If ``None`` is |
| specified, requests will be retried using a default configuration. |
| :param timeout: 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. |
| :param metadata: Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google |
| Cloud Platform. |
| :param project_id: The project from which notification channel needs to be deleted. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param 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). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['name', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: ui_color |
| :annotation: = #e5ffcc |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |