airflow.providers.google.cloud.operators.stackdriver
¶
Module Contents¶
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverListAlertPoliciesOperator
(*, format_: Optional[str] = None, filter_: Optional[str] = None, order_by: Optional[str] = None, page_size: Optional[int] = None, retry: Optional[str] = DEFAULT, timeout: Optional[float] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
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.
See also
For more information on how to use this operator, take a look at the guide: StackdriverListAlertPoliciesOperator
- Parameters
format (str) -- (Optional) Desired output format of the result. The supported formats are "dict", "json" and None which returns python dictionary, stringified JSON and protobuf respectively.
filter (str) -- 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.
order_by (str) -- 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.page_size (int) -- 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.
retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The project to fetch alerts from.
delegate_to (str) -- 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.
impersonation_chain (Union[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).
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverEnableAlertPoliciesOperator
(*, filter_: Optional[str] = None, retry: Optional[str] = DEFAULT, timeout: Optional[float] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
Enables one or more disabled alerting policies identified by filter parameter. Inoperative in case the policy is already enabled.
See also
For more information on how to use this operator, take a look at the guide: StackdriverEnableAlertPoliciesOperator
- Parameters
filter (str) -- 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.
retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The project in which alert needs to be enabled.
delegate_to (str) -- 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.
impersonation_chain (Union[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).
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverDisableAlertPoliciesOperator
(*, filter_: Optional[str] = None, retry: Optional[str] = DEFAULT, timeout: Optional[float] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
Disables one or more enabled alerting policies identified by filter parameter. Inoperative in case the policy is already disabled.
See also
For more information on how to use this operator, take a look at the guide: StackdriverDisableAlertPoliciesOperator
- Parameters
filter (str) -- 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.
retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The project in which alert needs to be disabled.
delegate_to (str) -- 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.
impersonation_chain (Union[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).
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverUpsertAlertOperator
(*, alerts: str, retry: Optional[str] = DEFAULT, timeout: Optional[float] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
Creates a new alert or updates an existing policy identified the name field in the alerts parameter.
See also
For more information on how to use this operator, take a look at the guide: StackdriverUpsertAlertOperator
- Parameters
alerts (str) -- 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)
retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The project in which alert needs to be created/updated.
delegate_to (str) -- 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.
impersonation_chain (Union[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).
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverDeleteAlertOperator
(*, name: str, retry: Optional[str] = DEFAULT, timeout: Optional[float] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
Deletes an alerting policy.
See also
For more information on how to use this operator, take a look at the guide: StackdriverDeleteAlertOperator
- Parameters
name (str) -- The alerting policy to delete. The format is:
projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
.retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The project from which alert needs to be deleted.
delegate_to (str) -- 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.
impersonation_chain (Union[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).
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverListNotificationChannelsOperator
(*, format_: Optional[str] = None, filter_: Optional[str] = None, order_by: Optional[str] = None, page_size: Optional[int] = None, retry: Optional[str] = DEFAULT, timeout: Optional[float] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
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.
See also
For more information on how to use this operator, take a look at the guide: StackdriverListNotificationChannelsOperator
- Parameters
format (str) -- (Optional) Desired output format of the result. The supported formats are "dict", "json" and None which returns python dictionary, stringified JSON and protobuf respectively.
filter (str) -- 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.
order_by (str) -- 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.page_size (int) -- 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.
retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The project to fetch notification channels from.
delegate_to (str) -- 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.
impersonation_chain (Union[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).
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverEnableNotificationChannelsOperator
(*, filter_: Optional[str] = None, retry: Optional[str] = DEFAULT, timeout: Optional[float] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
Enables one or more disabled alerting policies identified by filter parameter. Inoperative in case the policy is already enabled.
See also
For more information on how to use this operator, take a look at the guide: StackdriverEnableNotificationChannelsOperator
- Parameters
filter (str) -- 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.
retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The location used for the operation.
delegate_to (str) -- 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.
impersonation_chain (Union[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).
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverDisableNotificationChannelsOperator
(*, filter_: Optional[str] = None, retry: Optional[str] = DEFAULT, timeout: Optional[float] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
Disables one or more enabled notification channels identified by filter parameter. Inoperative in case the policy is already disabled.
See also
For more information on how to use this operator, take a look at the guide: StackdriverDisableNotificationChannelsOperator
- Parameters
filter (str) -- 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.
retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The project in which notification channels needs to be enabled.
delegate_to (str) -- 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.
impersonation_chain (Union[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).
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverUpsertNotificationChannelOperator
(*, channels: str, retry: Optional[str] = DEFAULT, timeout: Optional[str] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
Creates a new notification or updates an existing notification channel identified the name field in the alerts parameter.
See also
For more information on how to use this operator, take a look at the guide: StackdriverUpsertNotificationChannelOperator
- Parameters
channels (str) -- 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)
retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The project in which notification channels needs to be created/updated.
delegate_to (str) -- 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.
impersonation_chain (Union[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).
-
class
airflow.providers.google.cloud.operators.stackdriver.
StackdriverDeleteNotificationChannelOperator
(*, name: str, retry: Optional[str] = DEFAULT, timeout: Optional[float] = DEFAULT, metadata: Optional[str] = None, gcp_conn_id: str = 'google_cloud_default', project_id: Optional[str] = None, delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]¶ Bases:
airflow.models.BaseOperator
Deletes a notification channel.
See also
For more information on how to use this operator, take a look at the guide: StackdriverDeleteNotificationChannelOperator
- Parameters
name (str) -- The alerting policy to delete. The format is:
projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]
.retry (str) -- A retry object used to retry requests. If
None
is specified, requests will be retried using a default configuration.timeout (float) -- 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.metadata (str) -- Additional metadata that is provided to the method.
gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud Platform.
project_id (str) -- The project from which notification channel needs to be deleted.
delegate_to (str) -- 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.
impersonation_chain (Union[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).