U wi=@s8dZddlmZddlZddlmZGdddeZdS)a InfluxDB OSS API Service. The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech )absolute_importN) _BaseServicecseZdZdZdfdd ZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z d=d>Z!d?d@Z"dAdBZ#dCdDZ$dEdFZ%dGdHZ&dIdJZ'dKdLZ(dMdNZ)dOdPZ*dQdRZ+dSdTZ,dUdVZ-dWdXZ.dYdZZ/d[d\Z0d]d^Z1d_d`Z2dadbZ3dcddZ4dedfZ5dgdhZ6didjZ7dkdlZ8dmdnZ9dodpZ:dqdrZ;dsdtZdydzZ?d{d|Z@d}d~ZAddZBddZCddZDddZEddZFddZGddZHddZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUddZVddZWddZXZYS) TasksServicezNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Ncst|dS)z.TasksService - a operation defined in OpenAPI.N)super__init__)self api_client __class__V/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/service/tasks_service.pyrszTasksService.__init__cKs6d|d<|dr |j|f|S|j|f|}|SdS)apDelete a task. Deletes a task and associated records. Use this endpoint to delete a task and all associated records (task runs, logs, and labels). Once the task is deleted, InfluxDB cancels all scheduled runs of the task. If you want to disable a task instead of delete it, [update the task status to `inactive`](#operation/PatchTasksID). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. T_return_http_data_only async_reqN)getdelete_tasks_id_with_http_infortask_idkwargsdatar r r delete_tasks_id s  zTasksService.delete_tasks_idcKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aDelete a task. Deletes a task and associated records. Use this endpoint to delete a task and all associated records (task runs, logs, and labels). Once the task is deleted, InfluxDB cancels all scheduled runs of the task. If you want to disable a task instead of delete it, [update the task status to `inactive`](#operation/PatchTasksID). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id_with_http_info(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. /api/v2/tasks/{taskID}DELETENrr _preload_contentT_request_timeout urlopen_kw bodyZ post_paramsfilesZ response_typeZ auth_settingsrr rrZcollection_formatsr_delete_tasks_id_preparercall_apirrrrlocal_var_params path_params query_params header_params body_paramsr r r r7s(   z+TasksService.delete_tasks_id_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aDelete a task. Deletes a task and associated records. Use this endpoint to delete a task and all associated records (task runs, logs, and labels). Once the task is deleted, InfluxDB cancels all scheduled runs of the task. If you want to disable a task instead of delete it, [update the task status to `inactive`](#operation/PatchTasksID). This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. rrNrr rTrrrrr!r r r delete_tasks_id_async[s(   z"TasksService.delete_tasks_id_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrzap_trace_spanrzGMissing the required parameter `task_id` when calling `delete_tasks_id`taskIDZap-Trace-Spanapplication/jsonAcceptlocals_check_operation_params ValueErrorrselect_header_accept rrrr" all_paramsr#r$r%r&r r r r|s&   z%TasksService._delete_tasks_id_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aDelete a label from a task. Deletes a label from a task. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id_labels_id(task_id, label_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to delete the label from. (required) :param str label_id: The ID of the label to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. Tr rN)r(delete_tasks_id_labels_id_with_http_info)rrlabel_idrrr r r delete_tasks_id_labels_ids  z&TasksService.delete_tasks_id_labels_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aDelete a label from a task. Deletes a label from a task. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id_labels_id_with_http_info(task_id, label_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to delete the label from. (required) :param str label_id: The ID of the label to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. '/api/v2/tasks/{taskID}/labels/{labelID}rNrr rTrrr"_delete_tasks_id_labels_id_preparerr r rrr5rr"r#r$r%r&r r r r4s(   z5TasksService.delete_tasks_id_labels_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aDelete a label from a task. Deletes a label from a task. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to delete the label from. (required) :param str label_id: The ID of the label to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. r7rNrr rTrrrr8r:r r r delete_tasks_id_labels_id_asyncs(   z,TasksService.delete_tasks_id_labels_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<d|kr|d|d<g}i}d|kr|d|d <d} |jd g|d <||||| fS) Nrr5r(r6zQMissing the required parameter `task_id` when calling `delete_tasks_id_labels_id`zRMissing the required parameter `label_id` when calling `delete_tasks_id_labels_id`r)ZlabelIDr*r+r,r-) rrr5rr"r3r#r$r%r&r r r r9s2      z/TasksService._delete_tasks_id_labels_id_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aRemove a member from a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes a member from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id_members_id(user_id, task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: The ID of the member to remove. (required) :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. Tr rN)r)delete_tasks_id_members_id_with_http_inforuser_idrrrr r r delete_tasks_id_members_ids  z'TasksService.delete_tasks_id_members_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aRemove a member from a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes a member from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id_members_id_with_http_info(user_id, task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: The ID of the member to remove. (required) :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. '/api/v2/tasks/{taskID}/members/{userID}rNrr rTrrr#_delete_tasks_id_members_id_preparerr r rr>rrr"r#r$r%r&r r r r</s(   z6TasksService.delete_tasks_id_members_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aRemove a member from a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes a member from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). This method makes an asynchronous HTTP request. :param async_req bool :param str user_id: The ID of the member to remove. (required) :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. r@rNrr rTrrrrArCr r r delete_tasks_id_members_id_asyncTs(   z-TasksService.delete_tasks_id_members_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<d|kr|d|d<g}i}d|kr|d|d <d} |jd g|d <||||| fS) Nr>rr(r?zRMissing the required parameter `user_id` when calling `delete_tasks_id_members_id`zRMissing the required parameter `task_id` when calling `delete_tasks_id_members_id`userIDr)r*r+r,r- rr>rrr"r3r#r$r%r&r r r rBvs2      z0TasksService._delete_tasks_id_members_id_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aRemove an owner from a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id_owners_id(user_id, task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: The ID of the owner to remove. (required) :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. Tr rN)r(delete_tasks_id_owners_id_with_http_infor=r r r delete_tasks_id_owners_ids  z&TasksService.delete_tasks_id_owners_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) a(Remove an owner from a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id_owners_id_with_http_info(user_id, task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: The ID of the owner to remove. (required) :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. &/api/v2/tasks/{taskID}/owners/{userID}rNrr rTrrr"_delete_tasks_id_owners_id_preparerr rrCr r r rGs(   z5TasksService.delete_tasks_id_owners_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aPRemove an owner from a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. This method makes an asynchronous HTTP request. :param async_req bool :param str user_id: The ID of the owner to remove. (required) :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. rIrNrr rTrrrrJrCr r r delete_tasks_id_owners_id_asyncs(   z,TasksService.delete_tasks_id_owners_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<d|kr|d|d<g}i}d|kr|d|d <d} |jd g|d <||||| fS) Nr>rr(rHzQMissing the required parameter `user_id` when calling `delete_tasks_id_owners_id`zQMissing the required parameter `task_id` when calling `delete_tasks_id_owners_id`rEr)r*r+r,r-rFr r r rKs2      z/TasksService._delete_tasks_id_owners_id_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aaCancel a running task. Cancels a running [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint with InfluxDB OSS to cancel a running task. #### InfluxDB Cloud - Doesn't support this operation. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id_runs_id(task_id, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to cancel. (required) :param str run_id: The ID of the task run to cancel. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. Tr rN)r&delete_tasks_id_runs_id_with_http_inforrrun_idrrr r r delete_tasks_id_runs_ids  z$TasksService.delete_tasks_id_runs_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) apCancel a running task. Cancels a running [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint with InfluxDB OSS to cancel a running task. #### InfluxDB Cloud - Doesn't support this operation. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_tasks_id_runs_id_with_http_info(task_id, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to cancel. (required) :param str run_id: The ID of the task run to cancel. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. #/api/v2/tasks/{taskID}/runs/{runID}rNrr rTrrr _delete_tasks_id_runs_id_preparerr r rrrOrr"r#r$r%r&r r r rM/s(   z3TasksService.delete_tasks_id_runs_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aCancel a running task. Cancels a running [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint with InfluxDB OSS to cancel a running task. #### InfluxDB Cloud - Doesn't support this operation. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to cancel. (required) :param str run_id: The ID of the task run to cancel. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. rQrNrr rTrrrrRrTr r r delete_tasks_id_runs_id_asyncTs(   z*TasksService.delete_tasks_id_runs_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<d|kr|d|d<g}i}d|kr|d|d <d} |jd g|d <||||| fS) NrrOr(rPzOMissing the required parameter `task_id` when calling `delete_tasks_id_runs_id`zNMissing the required parameter `run_id` when calling `delete_tasks_id_runs_id`r)runIDr*r+r,r- rrrOrr"r3r#r$r%r&r r r rSvs2      z-TasksService._delete_tasks_id_runs_id_preparecKs2d|d<|dr|jf|S|jf|}|SdS)ax List tasks. Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). To limit which tasks are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`. #### Related guide - [Process data with InfluxDB tasks](https://docs.influxdata.com/influxdb/latest/process-data/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str name: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) name. Only returns tasks with the specified name. Different tasks may have the same name. :param str after: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Only returns tasks created after the specified task. :param str user: A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Only returns tasks owned by the specified user. :param str org: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Only returns tasks owned by the specified organization. :param str org_id: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Only returns tasks owned by the specified organization. :param str status: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) status. Only returns tasks that have the specified status (`active` or `inactive`). :param int limit: The maximum number of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to return. Default is `100`. The minimum is `1` and the maximum is `500`. To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_). For more information about the `basic` response, see the _`type`_ parameter. :param str type: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) type (`basic` or `system`). Default is `system`. Specifies the level of detail for tasks in the response. The default (`system`) response contains all the metadata properties for tasks. To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`). :return: Tasks If the method is called asynchronously, returns the request thread. Tr rN)rget_tasks_with_http_info)rrrr r r get_taskss    zTasksService.get_taskscKsd|jf|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) a List tasks. Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). To limit which tasks are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`. #### Related guide - [Process data with InfluxDB tasks](https://docs.influxdata.com/influxdb/latest/process-data/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str name: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) name. Only returns tasks with the specified name. Different tasks may have the same name. :param str after: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Only returns tasks created after the specified task. :param str user: A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Only returns tasks owned by the specified user. :param str org: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Only returns tasks owned by the specified organization. :param str org_id: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Only returns tasks owned by the specified organization. :param str status: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) status. Only returns tasks that have the specified status (`active` or `inactive`). :param int limit: The maximum number of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to return. Default is `100`. The minimum is `1` and the maximum is `500`. To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_). For more information about the `basic` response, see the _`type`_ parameter. :param str type: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) type (`basic` or `system`). Default is `system`. Specifies the level of detail for tasks in the response. The default (`system`) response contains all the metadata properties for tasks. To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`). :return: Tasks If the method is called asynchronously, returns the request thread. /api/v2/tasksGETTasksrr rTrrNr_get_tasks_preparerr rrrr"r#r$r%r&r r r rXs(   z%TasksService.get_tasks_with_http_infocsj|jf|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) a List tasks. Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). To limit which tasks are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`. #### Related guide - [Process data with InfluxDB tasks](https://docs.influxdata.com/influxdb/latest/process-data/) This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :param str name: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) name. Only returns tasks with the specified name. Different tasks may have the same name. :param str after: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Only returns tasks created after the specified task. :param str user: A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Only returns tasks owned by the specified user. :param str org: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Only returns tasks owned by the specified organization. :param str org_id: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Only returns tasks owned by the specified organization. :param str status: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) status. Only returns tasks that have the specified status (`active` or `inactive`). :param int limit: The maximum number of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to return. Default is `100`. The minimum is `1` and the maximum is `500`. To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_). For more information about the `basic` response, see the _`type`_ parameter. :param str type: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) type (`basic` or `system`). Default is `system`. Specifies the level of detail for tasks in the response. The default (`system`) response contains all the metadata properties for tasks. To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`). :return: Tasks If the method is called asynchronously, returns the request thread. rZr[r\rr rTrrNrr]r_r r r get_tasks_asyncs(   zTasksService.get_tasks_asyncc Ks~t}ddddddddd g }|d ||d|krF|dd krFtd d|krb|dd krbtdi}g}d|kr|d|dfd|kr|d|dfd|kr|d|dfd|kr|d|dfd|kr|d|dfd|kr|d|dfd|kr$|d|dfd |kr@|d |d fi}d|krZ|d|d<d}|jdg|d<|||||fS)Nr(nameafteruserorgZorg_idstatuslimittyperYziInvalid value for parameter `limit` when calling `get_tasks`, must be a value less than or equal to `500`zjInvalid value for parameter `limit` when calling `get_tasks`, must be a value greater than or equal to `1`ZorgIDr*r+r,r.r/r0appendrr1)rrr"r3r#r$r%r&r r r r^sB     zTasksService._get_tasks_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aRetrieve a task. Retrieves a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Task If the method is called asynchronously, returns the request thread. Tr rN)rget_tasks_id_with_http_inforr r r get_tasks_id1s  zTasksService.get_tasks_idcKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aRetrieve a task. Retrieves a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_with_http_info(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Task If the method is called asynchronously, returns the request thread. rr[Taskrr rTrrNr_get_tasks_id_preparerr rr!r r r rlHs(   z(TasksService.get_tasks_id_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aRetrieve a task. Retrieves a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Task If the method is called asynchronously, returns the request thread. rr[rnrr rTrrNrror!r r r get_tasks_id_asyncls(   zTasksService.get_tasks_id_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrr(rmzDMissing the required parameter `task_id` when calling `get_tasks_id`r)r*r+r,r-r2r r r rps&   z"TasksService._get_tasks_id_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aList labels for a task. Retrieves a list of all labels for a task. Labels may be used for grouping and filtering tasks. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_labels(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to retrieve labels for. (required) :param str zap_trace_span: OpenTracing span context :return: LabelsResponse If the method is called asynchronously, returns the request thread. Tr rN)r"get_tasks_id_labels_with_http_inforr r r get_tasks_id_labelss  z TasksService.get_tasks_id_labelscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aList labels for a task. Retrieves a list of all labels for a task. Labels may be used for grouping and filtering tasks. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_labels_with_http_info(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to retrieve labels for. (required) :param str zap_trace_span: OpenTracing span context :return: LabelsResponse If the method is called asynchronously, returns the request thread. /api/v2/tasks/{taskID}/labelsr[LabelsResponserr rTrrNr_get_tasks_id_labels_preparerr rr!r r r rrs(   z/TasksService.get_tasks_id_labels_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aList labels for a task. Retrieves a list of all labels for a task. Labels may be used for grouping and filtering tasks. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to retrieve labels for. (required) :param str zap_trace_span: OpenTracing span context :return: LabelsResponse If the method is called asynchronously, returns the request thread. rtr[rurr rTrrNrrvr!r r r get_tasks_id_labels_asyncs(   z&TasksService.get_tasks_id_labels_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrr(rszKMissing the required parameter `task_id` when calling `get_tasks_id_labels`r)r*r+r,r-r2r r r rws&   z)TasksService._get_tasks_id_labels_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)uRetrieve all logs for a task. Retrieves a list of all logs for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). When an InfluxDB task runs, a “run” record is created in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt. Use this endpoint to retrieve only the log events for a task, without additional task metadata. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_logs(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: Logs If the method is called asynchronously, returns the request thread. Tr rN)r get_tasks_id_logs_with_http_inforr r r get_tasks_id_logss  zTasksService.get_tasks_id_logscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) uRetrieve all logs for a task. Retrieves a list of all logs for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). When an InfluxDB task runs, a “run” record is created in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt. Use this endpoint to retrieve only the log events for a task, without additional task metadata. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_logs_with_http_info(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: Logs If the method is called asynchronously, returns the request thread. /api/v2/tasks/{taskID}/logsr[Logsrr rTrrNr_get_tasks_id_logs_preparerr rr!r r r ry6s(   z-TasksService.get_tasks_id_logs_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) u Retrieve all logs for a task. Retrieves a list of all logs for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). When an InfluxDB task runs, a “run” record is created in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt. Use this endpoint to retrieve only the log events for a task, without additional task metadata. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: Logs If the method is called asynchronously, returns the request thread. r{r[r|rr rTrrNrr}r!r r r get_tasks_id_logs_asyncZs(   z$TasksService.get_tasks_id_logs_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrr(rzzIMissing the required parameter `task_id` when calling `get_tasks_id_logs`r)r*r+r,r-r2r r r r~{s&   z'TasksService._get_tasks_id_logs_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aWList all task members. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `member` role for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_members(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMembers If the method is called asynchronously, returns the request thread. Tr rN)r#get_tasks_id_members_with_http_inforr r r get_tasks_id_memberss  z!TasksService.get_tasks_id_memberscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) afList all task members. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `member` role for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_members_with_http_info(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMembers If the method is called asynchronously, returns the request thread. /api/v2/tasks/{taskID}/membersr[ResourceMembersrr rTrrNr_get_tasks_id_members_preparerr rr!r r r rs(   z0TasksService.get_tasks_id_members_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aList all task members. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `member` role for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The task ID. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMembers If the method is called asynchronously, returns the request thread. rr[rrr rTrrNrrr!r r r get_tasks_id_members_asyncs(   z'TasksService.get_tasks_id_members_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrr(rzLMissing the required parameter `task_id` when calling `get_tasks_id_members`r)r*r+r,r-r2r r r rs&   z*TasksService._get_tasks_id_members_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)a&List all owners of a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Retrieves all users that have owner permission for a task. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_owners(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to retrieve owners for. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwners If the method is called asynchronously, returns the request thread. Tr rN)r"get_tasks_id_owners_with_http_inforr r r get_tasks_id_owners s  z TasksService.get_tasks_id_ownerscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) a5List all owners of a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Retrieves all users that have owner permission for a task. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_owners_with_http_info(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to retrieve owners for. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwners If the method is called asynchronously, returns the request thread. /api/v2/tasks/{taskID}/ownersr[ResourceOwnersrr rTrrNr_get_tasks_id_owners_preparerr rr!r r r r$s(   z/TasksService.get_tasks_id_owners_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) alList all owners of a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Retrieves all users that have owner permission for a task. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to retrieve owners for. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwners If the method is called asynchronously, returns the request thread. rr[rrr rTrrNrrr!r r r get_tasks_id_owners_asyncHs(   z&TasksService.get_tasks_id_owners_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrr(rzKMissing the required parameter `task_id` when calling `get_tasks_id_owners`r)r*r+r,r-r2r r r ris&   z)TasksService._get_tasks_id_owners_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aList runs for a task. Retrieves a list of runs for a [task](https://docs.influxdata.com/influxdb/latest/process-data/). To limit which task runs are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all task runs up to the default `limit`. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_runs(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to get runs for. Only returns runs for this task. (required) :param str zap_trace_span: OpenTracing span context :param str after: A task run ID. Only returns runs created after this run. :param int limit: Limits the number of task runs returned. Default is `100`. :param datetime after_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. :param datetime before_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. :return: Runs If the method is called asynchronously, returns the request thread. Tr rN)r get_tasks_id_runs_with_http_inforr r r get_tasks_id_runss  zTasksService.get_tasks_id_runscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aList runs for a task. Retrieves a list of runs for a [task](https://docs.influxdata.com/influxdb/latest/process-data/). To limit which task runs are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all task runs up to the default `limit`. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_runs_with_http_info(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to get runs for. Only returns runs for this task. (required) :param str zap_trace_span: OpenTracing span context :param str after: A task run ID. Only returns runs created after this run. :param int limit: Limits the number of task runs returned. Default is `100`. :param datetime after_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. :param datetime before_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. :return: Runs If the method is called asynchronously, returns the request thread. /api/v2/tasks/{taskID}/runsr[Runsrr rTrrNr_get_tasks_id_runs_preparerr rr!r r r rs(   z-TasksService.get_tasks_id_runs_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aList runs for a task. Retrieves a list of runs for a [task](https://docs.influxdata.com/influxdb/latest/process-data/). To limit which task runs are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all task runs up to the default `limit`. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to get runs for. Only returns runs for this task. (required) :param str zap_trace_span: OpenTracing span context :param str after: A task run ID. Only returns runs created after this run. :param int limit: Limits the number of task runs returned. Default is `100`. :param datetime after_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. :param datetime before_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. :return: Runs If the method is called asynchronously, returns the request thread. rr[rrr rTrrNrrr!r r r get_tasks_id_runs_asyncs(   z$TasksService.get_tasks_id_runs_asyncc Ks:t}ddddddg}|d||d|ks8|ddkr@tdd|kr\|dd kr\td d|krx|dd krxtd i}d|kr|d|d <g}d|kr|d|dfd|kr|d|dfd|kr|d|dfd|kr|d|dfi}d|kr|d|d<d}|jdg|d<|||||fS)Nrr(rbrfZ after_timeZ before_timerzIMissing the required parameter `task_id` when calling `get_tasks_id_runs`rhzqInvalid value for parameter `limit` when calling `get_tasks_id_runs`, must be a value less than or equal to `500`rizrInvalid value for parameter `limit` when calling `get_tasks_id_runs`, must be a value greater than or equal to `1`r)Z afterTimeZ beforeTimer*r+r,rjr2r r r rs>    z'TasksService._get_tasks_id_runs_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aHRetrieve a run for a task.. Retrieves a specific run for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to retrieve detail and logs for a specific task run. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_runs_id(task_id, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to retrieve runs for. (required) :param str run_id: The ID of the run to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Run If the method is called asynchronously, returns the request thread. Tr rN)r#get_tasks_id_runs_id_with_http_inforNr r r get_tasks_id_runs_ids  z!TasksService.get_tasks_id_runs_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aWRetrieve a run for a task.. Retrieves a specific run for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to retrieve detail and logs for a specific task run. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_runs_id_with_http_info(task_id, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to retrieve runs for. (required) :param str run_id: The ID of the run to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Run If the method is called asynchronously, returns the request thread. rQr[Runrr rTrrNr_get_tasks_id_runs_id_preparerr rrTr r r r+s(   z0TasksService.get_tasks_id_runs_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aRetrieve a run for a task.. Retrieves a specific run for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to retrieve detail and logs for a specific task run. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to retrieve runs for. (required) :param str run_id: The ID of the run to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Run If the method is called asynchronously, returns the request thread. rQr[rrr rTrrNrrrTr r r get_tasks_id_runs_id_asyncPs(   z'TasksService.get_tasks_id_runs_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<d|kr|d|d<g}i}d|kr|d|d <d} |jd g|d <||||| fS) NrrOr(rzLMissing the required parameter `task_id` when calling `get_tasks_id_runs_id`zKMissing the required parameter `run_id` when calling `get_tasks_id_runs_id`r)rVr*r+r,r-rWr r r rrs2      z*TasksService._get_tasks_id_runs_id_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aaRetrieve all logs for a run. Retrieves all logs for a task run. A log is a list of run events with `runID`, `time`, and `message` properties. Use this endpoint to help analyze task performance and troubleshoot failed task runs. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_runs_id_logs(task_id, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to get logs for. (required) :param str run_id: The ID of the run to get logs for. (required) :param str zap_trace_span: OpenTracing span context :return: Logs If the method is called asynchronously, returns the request thread. Tr rN)r(get_tasks_id_runs_id_logs_with_http_inforNr r r get_tasks_id_runs_id_logss  z&TasksService.get_tasks_id_runs_id_logsc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) apRetrieve all logs for a run. Retrieves all logs for a task run. A log is a list of run events with `runID`, `time`, and `message` properties. Use this endpoint to help analyze task performance and troubleshoot failed task runs. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tasks_id_runs_id_logs_with_http_info(task_id, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to get logs for. (required) :param str run_id: The ID of the run to get logs for. (required) :param str zap_trace_span: OpenTracing span context :return: Logs If the method is called asynchronously, returns the request thread. (/api/v2/tasks/{taskID}/runs/{runID}/logsr[r|rr rTrrNr"_get_tasks_id_runs_id_logs_preparerr rrTr r r rs(   z5TasksService.get_tasks_id_runs_id_logs_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aRetrieve all logs for a run. Retrieves all logs for a task run. A log is a list of run events with `runID`, `time`, and `message` properties. Use this endpoint to help analyze task performance and troubleshoot failed task runs. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to get logs for. (required) :param str run_id: The ID of the run to get logs for. (required) :param str zap_trace_span: OpenTracing span context :return: Logs If the method is called asynchronously, returns the request thread. rr[r|rr rTrrNrrrTr r r get_tasks_id_runs_id_logs_asyncs(   z,TasksService.get_tasks_id_runs_id_logs_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<d|kr|d|d<g}i}d|kr|d|d <d} |jd g|d <||||| fS) NrrOr(rzQMissing the required parameter `task_id` when calling `get_tasks_id_runs_id_logs`zPMissing the required parameter `run_id` when calling `get_tasks_id_runs_id_logs`r)rVr*r+r,r-rWr r r rs2      z/TasksService._get_tasks_id_runs_id_logs_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aUpdate a task. Updates a task and then cancels all scheduled runs of the task. Use this endpoint to set, modify, and clear task properties (for example: `cron`, `name`, `flux`, `status`). Once InfluxDB applies the update, it cancels all previously scheduled runs of the task. To update a task, pass an object that contains the updated key-value pairs. To activate or inactivate a task, set the `status` property. _`"status": "inactive"`_ cancels scheduled runs and prevents manual runs of the task. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_tasks_id(task_id, task_update_request, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to update. (required) :param TaskUpdateRequest task_update_request: An object that contains updated task properties to apply. (required) :param str zap_trace_span: OpenTracing span context :return: Task If the method is called asynchronously, returns the request thread. Tr rN)rpatch_tasks_id_with_http_info)rrtask_update_requestrrr r r patch_tasks_ids  zTasksService.patch_tasks_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aUpdate a task. Updates a task and then cancels all scheduled runs of the task. Use this endpoint to set, modify, and clear task properties (for example: `cron`, `name`, `flux`, `status`). Once InfluxDB applies the update, it cancels all previously scheduled runs of the task. To update a task, pass an object that contains the updated key-value pairs. To activate or inactivate a task, set the `status` property. _`"status": "inactive"`_ cancels scheduled runs and prevents manual runs of the task. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_tasks_id_with_http_info(task_id, task_update_request, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to update. (required) :param TaskUpdateRequest task_update_request: An object that contains updated task properties to apply. (required) :param str zap_trace_span: OpenTracing span context :return: Task If the method is called asynchronously, returns the request thread. rPATCHrnrr rTrrNr_patch_tasks_id_preparerr r rrrrr"r#r$r%r&r r r r+s(   z*TasksService.patch_tasks_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aUpdate a task. Updates a task and then cancels all scheduled runs of the task. Use this endpoint to set, modify, and clear task properties (for example: `cron`, `name`, `flux`, `status`). Once InfluxDB applies the update, it cancels all previously scheduled runs of the task. To update a task, pass an object that contains the updated key-value pairs. To activate or inactivate a task, set the `status` property. _`"status": "inactive"`_ cancels scheduled runs and prevents manual runs of the task. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to update. (required) :param TaskUpdateRequest task_update_request: An object that contains updated task properties to apply. (required) :param str zap_trace_span: OpenTracing span context :return: Task If the method is called asynchronously, returns the request thread. rrrnrr rTrrNrrrr r r patch_tasks_id_asyncPs(   z!TasksService.patch_tasks_id_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<g}i}d|kr|d|d<d} d|kr|d} |jd g|d <|jd g|d <||||| fS) Nrrr(rzFMissing the required parameter `task_id` when calling `patch_tasks_id`zRMissing the required parameter `task_update_request` when calling `patch_tasks_id`r)r*r+r, Content-Typer.r/r0rr1Zselect_header_content_type) rrrrr"r3r#r$r%r&r r r rrs8     z$TasksService._patch_tasks_id_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aMCreate a task. Creates a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and returns the task. #### Related guides - [Get started with tasks](https://docs.influxdata.com/influxdb/latest/process-data/get-started/) - [Create a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/create-task/) - [Common tasks](https://docs.influxdata.com/influxdb/latest/process-data/common-tasks/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks(task_create_request, async_req=True) >>> result = thread.get() :param async_req bool :param TaskCreateRequest task_create_request: The task to create. (required) :param str zap_trace_span: OpenTracing span context :return: Task If the method is called asynchronously, returns the request thread. Tr rN)rpost_tasks_with_http_info)rtask_create_requestrrr r r post_taskss  zTasksService.post_taskscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) a\Create a task. Creates a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and returns the task. #### Related guides - [Get started with tasks](https://docs.influxdata.com/influxdb/latest/process-data/get-started/) - [Create a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/create-task/) - [Common tasks](https://docs.influxdata.com/influxdb/latest/process-data/common-tasks/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_with_http_info(task_create_request, async_req=True) >>> result = thread.get() :param async_req bool :param TaskCreateRequest task_create_request: The task to create. (required) :param str zap_trace_span: OpenTracing span context :return: Task If the method is called asynchronously, returns the request thread. rZPOSTrnrr rTrrNr_post_tasks_preparerr rrrrr"r#r$r%r&r r r rs(   z&TasksService.post_tasks_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aCreate a task. Creates a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and returns the task. #### Related guides - [Get started with tasks](https://docs.influxdata.com/influxdb/latest/process-data/get-started/) - [Create a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/create-task/) - [Common tasks](https://docs.influxdata.com/influxdb/latest/process-data/common-tasks/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/) This method makes an asynchronous HTTP request. :param async_req bool :param TaskCreateRequest task_create_request: The task to create. (required) :param str zap_trace_span: OpenTracing span context :return: Task If the method is called asynchronously, returns the request thread. rZrrnrr rTrrNrrrr r r post_tasks_asyncs(   zTasksService.post_tasks_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}g}i}d|krX|d|d<d}d|krl|d}|jdg|d<|jdg|d<|||||fS) Nrr(rzNMissing the required parameter `task_create_request` when calling `post_tasks`r*r+r,rr) rrrr"r3r#r$r%r&r r r rs,  z TasksService._post_tasks_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)a-Add a label to a task. Adds a label to a task. Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_labels(task_id, label_mapping, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to label. (required) :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the task. (required) :param str zap_trace_span: OpenTracing span context :return: LabelResponse If the method is called asynchronously, returns the request thread. Tr rN)r#post_tasks_id_labels_with_http_info)rr label_mappingrrr r r post_tasks_id_labelss  z!TasksService.post_tasks_id_labelsc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) a<Add a label to a task. Adds a label to a task. Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_labels_with_http_info(task_id, label_mapping, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The ID of the task to label. (required) :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the task. (required) :param str zap_trace_span: OpenTracing span context :return: LabelResponse If the method is called asynchronously, returns the request thread. rtr LabelResponserr rTrrNr_post_tasks_id_labels_preparerr r rrrrr"r#r$r%r&r r r r*s(   z0TasksService.post_tasks_id_labels_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) acAdd a label to a task. Adds a label to a task. Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The ID of the task to label. (required) :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the task. (required) :param str zap_trace_span: OpenTracing span context :return: LabelResponse If the method is called asynchronously, returns the request thread. rtrrrr rTrrNrrrr r r post_tasks_id_labels_asyncOs(   z'TasksService.post_tasks_id_labels_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<g}i}d|kr|d|d<d} d|kr|d} |jd g|d <|jd g|d <||||| fS) Nrrr(rzLMissing the required parameter `task_id` when calling `post_tasks_id_labels`zRMissing the required parameter `label_mapping` when calling `post_tasks_id_labels`r)r*r+r,rr) rrrrr"r3r#r$r%r&r r r rqs8     z*TasksService._post_tasks_id_labels_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aAdd a member to a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a user to members of a task and returns the member. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_members(task_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The task ID. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member of the task. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMember If the method is called asynchronously, returns the request thread. Tr rN)r$post_tasks_id_members_with_http_inforr add_resource_member_request_bodyrrr r r post_tasks_id_memberss  z"TasksService.post_tasks_id_membersc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aAdd a member to a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a user to members of a task and returns the member. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_members_with_http_info(task_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The task ID. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member of the task. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMember If the method is called asynchronously, returns the request thread. rrResourceMemberrr rTrrNr_post_tasks_id_members_preparerr r rrrrr"r#r$r%r&r r r rs(   z1TasksService.post_tasks_id_members_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aAdd a member to a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a user to members of a task and returns the member. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The task ID. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member of the task. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMember If the method is called asynchronously, returns the request thread. rrrrr rTrrNrrrr r r post_tasks_id_members_asyncs(   z(TasksService.post_tasks_id_members_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<g}i}d|kr|d|d<d} d|kr|d} |jd g|d <|jd g|d <||||| fS) Nrrr(rzMMissing the required parameter `task_id` when calling `post_tasks_id_members`zfMissing the required parameter `add_resource_member_request_body` when calling `post_tasks_id_members`r)r*r+r,rr rrrrr"r3r#r$r%r&r r r rs8     z+TasksService._post_tasks_id_members_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aAdd an owner for a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Assigns a task `owner` role to a user. Use this endpoint to create a _resource owner_ for the task. A _resource owner_ is a user with `role: owner` for a specific resource. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_owners(task_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The task ID. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner of the task. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwner If the method is called asynchronously, returns the request thread. Tr rN)r#post_tasks_id_owners_with_http_inforr r r post_tasks_id_owners s  z!TasksService.post_tasks_id_ownersc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) a*Add an owner for a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Assigns a task `owner` role to a user. Use this endpoint to create a _resource owner_ for the task. A _resource owner_ is a user with `role: owner` for a specific resource. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_owners_with_http_info(task_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: The task ID. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner of the task. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwner If the method is called asynchronously, returns the request thread. rr ResourceOwnerrr rTrrNr_post_tasks_id_owners_preparerr rrr r r r2 s(   z0TasksService.post_tasks_id_owners_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) a>Add an owner for a task. **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Assigns a task `owner` role to a user. Use this endpoint to create a _resource owner_ for the task. A _resource owner_ is a user with `role: owner` for a specific resource. This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: The task ID. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner of the task. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwner If the method is called asynchronously, returns the request thread. rrrrr rTrrNrrrr r r post_tasks_id_owners_asyncW s(   z'TasksService.post_tasks_id_owners_asyncc Kst}dddg}|d||d|ks2|ddkr:tdd|ksN|ddkrVtdi}d|krn|d|d<g}i}d|kr|d|d<d} d|kr|d} |jd g|d <|jd g|d <||||| fS) Nrrr(rzLMissing the required parameter `task_id` when calling `post_tasks_id_owners`zeMissing the required parameter `add_resource_member_request_body` when calling `post_tasks_id_owners`r)r*r+r,rrrr r r ry s8     z*TasksService._post_tasks_id_owners_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aStart a task run, overriding the schedule. Schedules a task run to start immediately, ignoring scheduled runs. Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks. To _retry_ a previous run (and avoid creating a new run), use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry` endpoint](#operation/PostTasksIDRunsIDRetry). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_runs(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: (required) :param str zap_trace_span: OpenTracing span context :param RunManually run_manually: :return: Run If the method is called asynchronously, returns the request thread. Tr rN)r!post_tasks_id_runs_with_http_inforr r r post_tasks_id_runs s  zTasksService.post_tasks_id_runscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aStart a task run, overriding the schedule. Schedules a task run to start immediately, ignoring scheduled runs. Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks. To _retry_ a previous run (and avoid creating a new run), use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry` endpoint](#operation/PostTasksIDRunsIDRetry). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_runs_with_http_info(task_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: (required) :param str zap_trace_span: OpenTracing span context :param RunManually run_manually: :return: Run If the method is called asynchronously, returns the request thread. rrrrr rTrrNr_post_tasks_id_runs_preparerr rr!r r r r s(   z.TasksService.post_tasks_id_runs_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aStart a task run, overriding the schedule. Schedules a task run to start immediately, ignoring scheduled runs. Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks. To _retry_ a previous run (and avoid creating a new run), use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry` endpoint](#operation/PostTasksIDRunsIDRetry). This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: (required) :param str zap_trace_span: OpenTracing span context :param RunManually run_manually: :return: Run If the method is called asynchronously, returns the request thread. rrrrr rTrrNrrr!r r r post_tasks_id_runs_async s(   z%TasksService.post_tasks_id_runs_asyncc Kst}dddg}|d||d|ks2|ddkr:tdi}d|krR|d|d<g}i}d|krn|d|d<d}d|kr|d}|jdg|d <|jdg|d <|||||fS) Nrr(Z run_manuallyrzJMissing the required parameter `task_id` when calling `post_tasks_id_runs`r)r*r+r,rrr2r r r r s0    z(TasksService._post_tasks_id_runs_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aRetry a task run. Queues a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run to retry and returns the scheduled run. To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs` endpoint](#operation/PostTasksIDRuns). #### Limitations - The task must be _active_ (`status: "active"`). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_runs_id_retry(task_id, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Specifies the task to retry. (required) :param str run_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run ID. Specifies the task run to retry. To find a task run ID, use the [`GET /api/v2/tasks/{taskID}/runs` endpoint](#operation/GetTasksIDRuns) to list task runs. (required) :param str zap_trace_span: OpenTracing span context :param str body: :return: Run If the method is called asynchronously, returns the request thread. Tr rN)r*post_tasks_id_runs_id_retry_with_http_inforNr r r post_tasks_id_runs_id_retry s  z(TasksService.post_tasks_id_runs_id_retryc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aRetry a task run. Queues a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run to retry and returns the scheduled run. To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs` endpoint](#operation/PostTasksIDRuns). #### Limitations - The task must be _active_ (`status: "active"`). This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_tasks_id_runs_id_retry_with_http_info(task_id, run_id, async_req=True) >>> result = thread.get() :param async_req bool :param str task_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Specifies the task to retry. (required) :param str run_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run ID. Specifies the task run to retry. To find a task run ID, use the [`GET /api/v2/tasks/{taskID}/runs` endpoint](#operation/GetTasksIDRuns) to list task runs. (required) :param str zap_trace_span: OpenTracing span context :param str body: :return: Run If the method is called asynchronously, returns the request thread. )/api/v2/tasks/{taskID}/runs/{runID}/retryrrrr rTrrNr$_post_tasks_id_runs_id_retry_preparerr rrTr r r r7 s(   z7TasksService.post_tasks_id_runs_id_retry_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) a;Retry a task run. Queues a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run to retry and returns the scheduled run. To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs` endpoint](#operation/PostTasksIDRuns). #### Limitations - The task must be _active_ (`status: "active"`). This method makes an asynchronous HTTP request. :param async_req bool :param str task_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Specifies the task to retry. (required) :param str run_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run ID. Specifies the task run to retry. To find a task run ID, use the [`GET /api/v2/tasks/{taskID}/runs` endpoint](#operation/GetTasksIDRuns) to list task runs. (required) :param str zap_trace_span: OpenTracing span context :param str body: :return: Run If the method is called asynchronously, returns the request thread. rrrrr rTrrNrrrTr r r !post_tasks_id_runs_id_retry_async] s(   z.TasksService.post_tasks_id_runs_id_retry_asyncc Kst}ddddg}|d||d|ks4|ddkrs