U wâ’i“ã@s8dZddlmZddlZddlmZGdd„deƒZdS)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)Ú _BaseServicecsÂeZdZdZd-‡fdd„ Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Z‡ZS).Ú DBRPsServicez‹NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Ncstƒ |¡dS)z.DBRPsService - a operation defined in OpenAPI.N)ÚsuperÚ__init__)ÚselfÚ api_client©Ú __class__©úW/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/service/dbr_ps_service.pyrszDBRPsService.__init__cKs6d|d<| d¡r |j|f|ŽS|j|f|Ž}|SdS)aòDelete a database retention policy. Deletes the specified database retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_dbrpid(dbrp_id, async_req=True) >>> result = thread.get() :param async_req bool :param str dbrp_id: A DBRP mapping ID. Only returns the specified DBRP mapping. (required) :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. :param str org: An organization name. Specifies the organization that owns the DBRP mapping. :return: None If the method is called asynchronously, returns the request thread. TÚ_return_http_data_onlyÚ async_reqN)ÚgetÚdelete_dbrpid_with_http_info©rÚdbrp_idÚkwargsÚdatar r r Ú delete_dbrpid s  zDBRPsService.delete_dbrpidcKsf|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d¡d S) aDelete a database retention policy. Deletes the specified database retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_dbrpid_with_http_info(dbrp_id, async_req=True) >>> result = thread.get() :param async_req bool :param str dbrp_id: A DBRP mapping ID. Only returns the specified DBRP mapping. (required) :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. :param str org: An organization name. Specifies the organization that owns the DBRP mapping. :return: None If the method is called asynchronously, returns the request thread. ú/api/v2/dbrps/{dbrpID}ÚDELETENrr Ú_preload_contentTÚ_request_timeoutÚ urlopen_kw© ÚbodyZ post_paramsÚfilesZ response_typeZ auth_settingsrr rrZcollection_formatsr©Ú_delete_dbrpid_preparerÚcall_apir©rrrÚlocal_var_paramsÚ path_paramsÚ query_paramsÚ header_paramsÚ body_paramsr r r r9s( ÿ   ñz)DBRPsService.delete_dbrpid_with_http_infocËsl|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d¡d IdHS) a>Delete a database retention policy. Deletes the specified database retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes an asynchronous HTTP request. :param async_req bool :param str dbrp_id: A DBRP mapping ID. Only returns the specified DBRP mapping. (required) :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. :param str org: An organization name. Specifies the organization that owns the DBRP mapping. :return: None If the method is called asynchronously, returns the request thread. rrNrr rTrrrrr!r r r Údelete_dbrpid_async_s( ÿ   ñz DBRPsService.delete_dbrpid_asyncc KsÈtƒ}ddddg}| d||¡d|ks4|ddkr>> thread = api.get_dbr_ps(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Only returns DBRP mappings for the specified organization. :param str org: An organization name. Only returns DBRP mappings for the specified organization. :param str id: A DBPR mapping ID. Only returns the specified DBRP mapping. :param str bucket_id: A bucket ID. Only returns DBRP mappings that belong to the specified bucket. :param bool default: Specifies filtering on default :param str db: A database. Only returns DBRP mappings that belong to the 1.x database. :param str rp: A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp). Specifies the 1.x retention policy to filter on. :return: DBRPs If the method is called asynchronously, returns the request thread. Tr rN)rÚget_dbr_ps_with_http_info)rrrr r r Ú get_dbr_ps¡s    zDBRPsService.get_dbr_pscKsd|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) ašList database retention policy mappings. Lists database retention policy (DBRP) mappings. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_dbr_ps_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Only returns DBRP mappings for the specified organization. :param str org: An organization name. Only returns DBRP mappings for the specified organization. :param str id: A DBPR mapping ID. Only returns the specified DBRP mapping. :param str bucket_id: A bucket ID. Only returns DBRP mappings that belong to the specified bucket. :param bool default: Specifies filtering on default :param str db: A database. Only returns DBRP mappings that belong to the 1.x database. :param str rp: A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp). Specifies the 1.x retention policy to filter on. :return: DBRPs If the method is called asynchronously, returns the request thread. ú /api/v2/dbrpsÚGETÚDBRPsrr rTrrNr©Ú_get_dbr_ps_preparerr r©rrr"r#r$r%r&r r r r8¾s( ÿ   ñz&DBRPsService.get_dbr_ps_with_http_infocËsj|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) aãList database retention policy mappings. Lists database retention policy (DBRP) mappings. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Only returns DBRP mappings for the specified organization. :param str org: An organization name. Only returns DBRP mappings for the specified organization. :param str id: A DBPR mapping ID. Only returns the specified DBRP mapping. :param str bucket_id: A bucket ID. Only returns DBRP mappings that belong to the specified bucket. :param bool default: Specifies filtering on default :param str db: A database. Only returns DBRP mappings that belong to the 1.x database. :param str rp: A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp). Specifies the 1.x retention policy to filter on. :return: DBRPs If the method is called asynchronously, returns the request thread. r:r;r<rr rTrrNrr=r?r r r Úget_dbr_ps_asyncès( ÿ   ñzDBRPsService.get_dbr_ps_asynccKs"tƒ}ddddddddg}| d ||¡i}g}d|krJ| d |df¡d|krd| d|df¡d|kr~| d|df¡d|kr˜| d |df¡d|kr²| d|df¡d|krÌ| d|df¡d|kræ| d|df¡i}d|krþ|d|d <d}|j d g¡|d<|||||fS)Nr(r)r*ÚidZ bucket_idÚdefaultÚdbÚrpr9r,ZbucketIDr-r.r/)r1r2r4rr5)rrr"r7r#r$r%r&r r r r>s6 ÿz DBRPsService._get_dbr_ps_preparecKs6d|d<| d¡r |j|f|ŽS|j|f|Ž}|SdS)aëRetrieve a database retention policy mapping. Retrieves the specified retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_dbr_ps_id(dbrp_id, async_req=True) >>> result = thread.get() :param async_req bool :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. :param str org: An organization name. Specifies the organization that owns the DBRP mapping. :return: DBRPGet If the method is called asynchronously, returns the request thread. Tr rN)rÚget_dbr_ps_id_with_http_inforr r r Ú get_dbr_ps_id2s  zDBRPsService.get_dbr_ps_idcKsf|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) aúRetrieve a database retention policy mapping. Retrieves the specified retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_dbr_ps_id_with_http_info(dbrp_id, async_req=True) >>> result = thread.get() :param async_req bool :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. :param str org: An organization name. Specifies the organization that owns the DBRP mapping. :return: DBRPGet If the method is called asynchronously, returns the request thread. rr;ÚDBRPGetrr rTrrNr©Ú_get_dbr_ps_id_preparerr rr!r r r rEKs( ÿ   ñz)DBRPsService.get_dbr_ps_id_with_http_infocËsl|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) a7Retrieve a database retention policy mapping. Retrieves the specified retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes an asynchronous HTTP request. :param async_req bool :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. :param str org: An organization name. Specifies the organization that owns the DBRP mapping. :return: DBRPGet If the method is called asynchronously, returns the request thread. rr;rGrr rTrrNrrHr!r r r Úget_dbr_ps_id_asyncqs( ÿ   ñz DBRPsService.get_dbr_ps_id_asyncc KsÈtƒ}ddddg}| d||¡d|ks4|ddkr>> thread = api.patch_dbrpid(dbrp_id, dbrp_update, async_req=True) >>> result = thread.get() :param async_req bool :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) :param DBRPUpdate dbrp_update: Updates the database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to modify the _retention policy_ (`retention_policy` property) of a DBRP mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) (required) :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. :param str org: An organization name. Specifies the organization that owns the DBRP mapping. :return: DBRPGet If the method is called asynchronously, returns the request thread. Tr rN)rÚpatch_dbrpid_with_http_info)rrÚ dbrp_updaterrr r r Ú patch_dbrpid³s  zDBRPsService.patch_dbrpidc Ksh|j||f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) a©Update a database retention policy mapping. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_dbrpid_with_http_info(dbrp_id, dbrp_update, async_req=True) >>> result = thread.get() :param async_req bool :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) :param DBRPUpdate dbrp_update: Updates the database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to modify the _retention policy_ (`retention_policy` property) of a DBRP mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) (required) :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. :param str org: An organization name. Specifies the organization that owns the DBRP mapping. :return: DBRPGet If the method is called asynchronously, returns the request thread. rÚPATCHrGrr rTrrNr©Ú_patch_dbrpid_preparerr r© rrrLrr"r#r$r%r&r r r rKÌs(ÿ   ñz(DBRPsService.patch_dbrpid_with_http_infoc Ësn|j||f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) aÚUpdate a database retention policy mapping. This method makes an asynchronous HTTP request. :param async_req bool :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) :param DBRPUpdate dbrp_update: Updates the database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to modify the _retention policy_ (`retention_policy` property) of a DBRP mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) (required) :param str zap_trace_span: OpenTracing span context :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. :param str org: An organization name. Specifies the organization that owns the DBRP mapping. :return: DBRPGet If the method is called asynchronously, returns the request thread. rrNrGrr rTrrNrrOrQr r r Úpatch_dbrpid_asyncòs(ÿ   ñzDBRPsService.patch_dbrpid_asyncc Kstƒ}dddddg}| d||¡d|ks6|ddkr>tdƒ‚d|ksR|ddkrZtdƒ‚i}d|krr|d|d <g}d|kr| d |df¡d|krª| d|df¡i}d|krÂ|d|d <d} d|krÖ|d} |j d g¡|d <|j d g¡|d<||||| fS)NrrLr(r)r*rMzDMissing the required parameter `dbrp_id` when calling `patch_dbrpid`zHMissing the required parameter `dbrp_update` when calling `patch_dbrpid`r+r,r-r.r/ú Content-Type)r1r2r3r4rr5Úselect_header_content_type) rrrLrr"r7r#r$r%r&r r r rPs@ ÿ ÿ  ÿÿz"DBRPsService._patch_dbrpid_preparecKs6d|d<| d¡r |j|f|ŽS|j|f|Ž}|SdS)alAdd a database retention policy mapping. Creates a database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to add InfluxDB 1.x API compatibility to your InfluxDB Cloud or InfluxDB OSS 2.x buckets. Your buckets must contain a DBRP mapping in order to query and write using the InfluxDB 1.x API. object. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_dbrp(dbrp_create, async_req=True) >>> result = thread.get() :param async_req bool :param DBRPCreate dbrp_create: The database retention policy mapping to add. Note that _`retention_policy`_ is a required parameter in the request body. The value of _`retention_policy`_ can be any arbitrary `string` name or value, with the default value commonly set as `autogen`. The value of _`retention_policy`_ isn't a [retention_policy](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-policy-rp) (required) :param str zap_trace_span: OpenTracing span context :return: DBRP If the method is called asynchronously, returns the request thread. Tr rN)rÚpost_dbrp_with_http_info)rÚ dbrp_createrrr r r Ú post_dbrp>s  zDBRPsService.post_dbrpcKsf|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) a{Add a database retention policy mapping. Creates a database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to add InfluxDB 1.x API compatibility to your InfluxDB Cloud or InfluxDB OSS 2.x buckets. Your buckets must contain a DBRP mapping in order to query and write using the InfluxDB 1.x API. object. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_dbrp_with_http_info(dbrp_create, async_req=True) >>> result = thread.get() :param async_req bool :param DBRPCreate dbrp_create: The database retention policy mapping to add. Note that _`retention_policy`_ is a required parameter in the request body. The value of _`retention_policy`_ can be any arbitrary `string` name or value, with the default value commonly set as `autogen`. The value of _`retention_policy`_ isn't a [retention_policy](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-policy-rp) (required) :param str zap_trace_span: OpenTracing span context :return: DBRP If the method is called asynchronously, returns the request thread. r:ÚPOSTÚDBRPrr rTrrNr©Ú_post_dbrp_preparerr r©rrVrr"r#r$r%r&r r r rUUs( ÿ   ñz%DBRPsService.post_dbrp_with_http_infocËsl|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) a¸Add a database retention policy mapping. Creates a database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to add InfluxDB 1.x API compatibility to your InfluxDB Cloud or InfluxDB OSS 2.x buckets. Your buckets must contain a DBRP mapping in order to query and write using the InfluxDB 1.x API. object. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) This method makes an asynchronous HTTP request. :param async_req bool :param DBRPCreate dbrp_create: The database retention policy mapping to add. Note that _`retention_policy`_ is a required parameter in the request body. The value of _`retention_policy`_ can be any arbitrary `string` name or value, with the default value commonly set as `autogen`. The value of _`retention_policy`_ isn't a [retention_policy](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-policy-rp) (required) :param str zap_trace_span: OpenTracing span context :return: DBRP If the method is called asynchronously, returns the request thread. r:rXrYrr rTrrNrrZr\r r r Úpost_dbrp_asyncys( ÿ   ñzDBRPsService.post_dbrp_asyncc Ksžtƒ}ddg}| d||¡d|ks0|ddkr8tdƒ‚i}g}i}d|krX|d|d<d}d|krl|d}|j dg¡|d<|j dg¡|d<|||||fS) NrVr(rWzEMissing the required parameter `dbrp_create` when calling `post_dbrp`r-r.r/rS)r1r2r3rr5rT) rrVrr"r7r#r$r%r&r r r r[šs, ÿ ÿÿzDBRPsService._post_dbrp_prepare)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrr'rr9r8r@r>rFrErJrIrMrKrRrPrWrUr]r[Ú __classcell__r r r r rs,&#*'#&#&#)$!r)raÚ __future__rÚreZ%influxdb_client.service._base_servicerrr r r r Ús