airflow.providers.microsoft.azure.triggers.msgraph¶
Classes¶
ResponseSerializer serializes the response as a string. |
|
A Microsoft Graph API trigger which allows you to execute an async REST call to the Microsoft Graph API. |
Module Contents¶
- class airflow.providers.microsoft.azure.triggers.msgraph.ResponseSerializer(encoding=None)[source]¶
ResponseSerializer serializes the response as a string.
- class airflow.providers.microsoft.azure.triggers.msgraph.MSGraphTrigger(url, response_type=None, path_parameters=None, url_template=None, method='GET', query_parameters=None, headers=None, data=None, conn_id=KiotaRequestAdapterHook.default_conn_name, timeout=None, proxies=None, scopes=None, api_version=None, serializer=ResponseSerializer, pagination_link=False, rendered=False)[source]¶
Bases:
airflow.triggers.base.BaseTriggerA Microsoft Graph API trigger which allows you to execute an async REST call to the Microsoft Graph API.
- Parameters:
url (str) – The url being executed on the Microsoft Graph API (templated).
response_type (str | None) – The expected return type of the response as a string. Possible value are: bytes, str, int, float, bool and datetime (default is None).
method (str) – The HTTP method being used to do the REST call (default is GET).
conn_id (str) – The HTTP Connection ID to run the operator against (templated).
timeout (float | None) – The HTTP timeout being used by the KiotaRequestAdapter (default is None). When no timeout is specified or set to None then there is no HTTP timeout on each request.
proxies (dict | None) – A dict defining the HTTP proxies to be used (default is None).
scopes (str | list[str] | None) – The scopes to be used (default is [”https://graph.microsoft.com/.default”]).
api_version (msgraph_core.APIVersion | str | None) – The API version of the Microsoft Graph API to be used (default is v1). You can pass an enum named APIVersion which has 2 possible members v1 and beta, or you can pass a string as v1.0 or beta.
serializer (type[ResponseSerializer]) – Class which handles response serialization (default is ResponseSerializer). Bytes will be base64 encoded into a string, so it can be stored as an XCom.
pagination_link (bool) – Whether url was taken from a pagination link of a previous response (default is False). When True, its host is verified against the configured Microsoft Graph endpoint before the request is made.
rendered (bool) – Whether the templated fields already hold their rendered values (default is False). A task which starts from the triggerer gets every one of its triggers rendered by the triggerer, also the ones a worker deferred with values it rendered itself or took from a response, such as a pagination link. When True, the triggerer leaves the fields as they are.
- serializer: ResponseSerializer[source]¶
- render_template_fields(context, jinja_env=None)[source]¶
Template all attributes listed in self.template_fields.
This mutates the attributes in-place and is irreversible.
- Parameters:
context (airflow.sdk.Context) – Context dict with values to apply on content.
jinja_env (jinja2.Environment | None) – Jinja’s environment to use for rendering.