U wi P@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) _BaseServicecseZdZdZd]fdd 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\Z0Z1S)^OrganizationsServicezNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Ncst|dS)z6OrganizationsService - a operation defined in OpenAPI.N)super__init__)self api_client __class__^/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/service/organizations_service.pyrszOrganizationsService.__init__cKs6d|d<|dr |j|f|S|j|f|}|SdS)aDelete an organization. Deletes an organization. Deleting an organization from InfluxDB Cloud can't be undone. Once deleted, all data associated with the organization is removed. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Limitations - Only one organization can be deleted per request. #### Related guides - [Delete organizations](https://docs.influxdata.com/influxdb/latest/organizations/delete-orgs/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_orgs_id(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization 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_orgs_id_with_http_infororg_idkwargsdatar r r delete_orgs_id s  z#OrganizationsService.delete_orgs_idcKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aDelete an organization. Deletes an organization. Deleting an organization from InfluxDB Cloud can't be undone. Once deleted, all data associated with the organization is removed. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Limitations - Only one organization can be deleted per request. #### Related guides - [Delete organizations](https://docs.influxdata.com/influxdb/latest/organizations/delete-orgs/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_orgs_id_with_http_info(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization 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/orgs/{orgID}DELETENrr _preload_contentT_request_timeout urlopen_kw bodyZ post_paramsfilesZ response_typeZ auth_settingsrr rrZcollection_formatsr_delete_orgs_id_preparercall_apirrrrlocal_var_params path_params query_params header_params body_paramsr r r r7s(   z2OrganizationsService.delete_orgs_id_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aCDelete an organization. Deletes an organization. Deleting an organization from InfluxDB Cloud can't be undone. Once deleted, all data associated with the organization is removed. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Limitations - Only one organization can be deleted per request. #### Related guides - [Delete organizations](https://docs.influxdata.com/influxdb/latest/organizations/delete-orgs/) This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The ID of the organization 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_orgs_id_async[s(   z)OrganizationsService.delete_orgs_id_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrzap_trace_spanrzEMissing the required parameter `org_id` when calling `delete_orgs_id`orgIDZap-Trace-Spanapplication/jsonAcceptlocals_check_operation_params ValueErrorrselect_header_accept rrrr" all_paramsr#r$r%r&r r r r|s&   z,OrganizationsService._delete_orgs_id_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aRemove a member from an organization. Removes a member from an organization. Use this endpoint to remove a user's member privileges for an organization. Removing member privileges removes the user's `read` and `write` permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related guides - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_orgs_id_members_id(user_id, org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: The ID of the user to remove. (required) :param str org_id: The ID of the organization to remove a user from. (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_orgs_id_members_id_with_http_inforuser_idrrrr r r delete_orgs_id_members_ids  z.OrganizationsService.delete_orgs_id_members_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aRemove a member from an organization. Removes a member from an organization. Use this endpoint to remove a user's member privileges for an organization. Removing member privileges removes the user's `read` and `write` permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related guides - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_orgs_id_members_id_with_http_info(user_id, org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: The ID of the user to remove. (required) :param str org_id: The ID of the organization to remove a user from. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. %/api/v2/orgs/{orgID}/members/{userID}rNrr rTrrr"_delete_orgs_id_members_id_preparerr r rr6rrr"r#r$r%r&r r r r4s(   z=OrganizationsService.delete_orgs_id_members_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd IdHS) aRemove a member from an organization. Removes a member from an organization. Use this endpoint to remove a user's member privileges for an organization. Removing member privileges removes the user's `read` and `write` permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related guides - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) This method makes an asynchronous HTTP request. :param async_req bool :param str user_id: The ID of the user to remove. (required) :param str org_id: The ID of the organization to remove a user from. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. r8rNrr rTrrrr9r;r r r delete_orgs_id_members_id_asyncs(   z4OrganizationsService.delete_orgs_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) Nr6rr(r7zQMissing the required parameter `user_id` when calling `delete_orgs_id_members_id`zPMissing the required parameter `org_id` when calling `delete_orgs_id_members_id`userIDr)r*r+r,r- rr6rrr"r3r#r$r%r&r r r r:s2      z7OrganizationsService._delete_orgs_id_members_id_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aRemove an owner from an organization. Removes an [owner](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) from the organization. Organization owners have permission to delete organizations and remove user and member permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_orgs_id_owners_id(user_id, org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: The ID of the user to remove. (required) :param str org_id: The ID of the organization to remove an owner from. (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_orgs_id_owners_id_with_http_infor5r r r delete_orgs_id_owners_ids  z-OrganizationsService.delete_orgs_id_owners_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d dd S) aRemove an owner from an organization. Removes an [owner](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) from the organization. Organization owners have permission to delete organizations and remove user and member permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_orgs_id_owners_id_with_http_info(user_id, org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str user_id: The ID of the user to remove. (required) :param str org_id: The ID of the organization to remove an owner from. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, returns the request thread. $/api/v2/orgs/{orgID}/owners/{userID}rNrr rTrrr!_delete_orgs_id_owners_id_preparerr rr;r r r r?/s(   zr r r rCvs2      z6OrganizationsService._delete_orgs_id_owners_id_preparecKs2d|d<|dr|jf|S|jf|}|SdS)a>List organizations. Lists [organizations](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization/). To limit which organizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`. #### InfluxDB Cloud - Only returns the organization that owns the token passed in the request. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). :param int limit: Limits the number of records returned. Default is `20`. :param bool descending: :param str org: An organization name. Only returns the specified organization. :param str org_id: An organization ID. Only returns the specified organization. :param str user_id: A user ID. Only returns organizations where the specified user is a member or owner. :return: Organizations If the method is called asynchronously, returns the request thread. Tr rN)rget_orgs_with_http_info)rrrr r r get_orgss    zOrganizationsService.get_orgscKsd|jf|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aMList organizations. Lists [organizations](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization/). To limit which organizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`. #### InfluxDB Cloud - Only returns the organization that owns the token passed in the request. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). :param int limit: Limits the number of records returned. Default is `20`. :param bool descending: :param str org: An organization name. Only returns the specified organization. :param str org_id: An organization ID. Only returns the specified organization. :param str user_id: A user ID. Only returns organizations where the specified user is a member or owner. :return: Organizations If the method is called asynchronously, returns the request thread. /api/v2/orgsGET Organizationsrr rTrrNr_get_orgs_preparerr rrrr"r#r$r%r&r r r rEs(   z,OrganizationsService.get_orgs_with_http_infocsj|jf|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aList organizations. Lists [organizations](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization/). To limit which organizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`. #### InfluxDB Cloud - Only returns the organization that owns the token passed in the request. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). :param int limit: Limits the number of records returned. Default is `20`. :param bool descending: :param str org: An organization name. Only returns the specified organization. :param str org_id: An organization ID. Only returns the specified organization. :param str user_id: A user ID. Only returns organizations where the specified user is a member or owner. :return: Organizations If the method is called asynchronously, returns the request thread. rGrHrIrr rTrrNrrJrLr r r get_orgs_asyncs(   z#OrganizationsService.get_orgs_asynccKs`t}dddddddg}|d||d|krB|dd krBtd d|kr^|dd kr^td d|krz|dd krztdi}g}d|kr|d|dfd|kr|d|dfd|kr|d|dfd|kr|d|dfd|kr|d|dfd|kr"|d|dfi}d|kr<|d|d<d}|jdg|d<|||||fS)Nr(offsetlimitZ descendingorgrr6rFrzjInvalid value for parameter `offset` when calling `get_orgs`, must be a value greater than or equal to `0`dzhInvalid value for parameter `limit` when calling `get_orgs`, must be a value less than or equal to `100`ziInvalid value for parameter `limit` when calling `get_orgs`, must be a value greater than or equal to `1`r)r=r*r+r,)r.r/r0appendrr1)rrr"r3r#r$r%r&r r r rKs>    z&OrganizationsService._get_orgs_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aRetrieve an organization. Retrieves an organization. Use this endpoint to retrieve information for a specific organization. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs_id(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, returns the request thread. Tr rN)rget_orgs_id_with_http_inforr r r get_orgs_id)s  z OrganizationsService.get_orgs_idcKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) a&Retrieve an organization. Retrieves an organization. Use this endpoint to retrieve information for a specific organization. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs_id_with_http_info(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, returns the request thread. rrH Organizationrr rTrrNr_get_orgs_id_preparerr rr!r r r rT@s(   z/OrganizationsService.get_orgs_id_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) afRetrieve an organization. Retrieves an organization. Use this endpoint to retrieve information for a specific organization. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The ID of the organization to retrieve. (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, returns the request thread. rrHrVrr rTrrNrrWr!r r r get_orgs_id_asyncds(   z&OrganizationsService.get_orgs_id_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrr(rUzBMissing the required parameter `org_id` when calling `get_orgs_id`r)r*r+r,r-r2r r r rXs&   z)OrganizationsService._get_orgs_id_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aList all members of an organization. Lists all users that belong to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve members for. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs_id_members(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to retrieve users for. (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_orgs_id_members_with_http_inforr r r get_orgs_id_memberss  z(OrganizationsService.get_orgs_id_memberscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aList all members of an organization. Lists all users that belong to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve members for. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs_id_members_with_http_info(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to retrieve users for. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMembers If the method is called asynchronously, returns the request thread. /api/v2/orgs/{orgID}/membersrHResourceMembersrr rTrrNr_get_orgs_id_members_preparerr rr!r r r rZs(   z7OrganizationsService.get_orgs_id_members_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) a=List all members of an organization. Lists all users that belong to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve members for. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The ID of the organization to retrieve users for. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMembers If the method is called asynchronously, returns the request thread. r\rHr]rr rTrrNrr^r!r r r get_orgs_id_members_asyncs(   z.OrganizationsService.get_orgs_id_members_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrr(r[zJMissing the required parameter `org_id` when calling `get_orgs_id_members`r)r*r+r,r-r2r r r r_s&   z1OrganizationsService._get_orgs_id_members_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aList all owners of an organization. Lists all owners of an organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners from. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs_id_owners(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to list 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_orgs_id_owners_with_http_inforr r r get_orgs_id_ownerss  z'OrganizationsService.get_orgs_id_ownerscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aList all owners of an organization. Lists all owners of an organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners from. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_orgs_id_owners_with_http_info(org_id, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to list 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/orgs/{orgID}/ownersrHResourceOwnersrr rTrrNr_get_orgs_id_owners_preparerr rr!r r r ra.s(   z6OrganizationsService.get_orgs_id_owners_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aList all owners of an organization. Lists all owners of an organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners from. This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The ID of the organization to list owners for. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwners If the method is called asynchronously, returns the request thread. rcrHrdrr rTrrNrrer!r r r get_orgs_id_owners_asyncRs(   z-OrganizationsService.get_orgs_id_owners_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}d|krP|d|d<g}i}d|krl|d|d<d}|jdg|d<|||||fS) Nrr(rbzIMissing the required parameter `org_id` when calling `get_orgs_id_owners`r)r*r+r,r-r2r r r rfss&   z0OrganizationsService._get_orgs_id_owners_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)uUpdate an organization. Updates an organization. Use this endpoint to update properties (`name`, `description`) of an organization. Updating an organization’s name affects all resources that reference the organization by name, including the following: - Queries - Dashboards - Tasks - Telegraf configurations - Templates If you change an organization name, be sure to update the organization name in these resources as well. #### Related Guides - [Update an organization](https://docs.influxdata.com/influxdb/latest/organizations/update-org/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_orgs_id(org_id, patch_organization_request, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to update. (required) :param PatchOrganizationRequest patch_organization_request: The organization update to apply. (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, returns the request thread. Tr rN)rpatch_orgs_id_with_http_info)rrpatch_organization_requestrrr r r patch_orgs_ids  z"OrganizationsService.patch_orgs_idc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) uUpdate an organization. Updates an organization. Use this endpoint to update properties (`name`, `description`) of an organization. Updating an organization’s name affects all resources that reference the organization by name, including the following: - Queries - Dashboards - Tasks - Telegraf configurations - Templates If you change an organization name, be sure to update the organization name in these resources as well. #### Related Guides - [Update an organization](https://docs.influxdata.com/influxdb/latest/organizations/update-org/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_orgs_id_with_http_info(org_id, patch_organization_request, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to update. (required) :param PatchOrganizationRequest patch_organization_request: The organization update to apply. (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, returns the request thread. rPATCHrVrr rTrrNr_patch_orgs_id_preparerr r rrrirr"r#r$r%r&r r r rhs(   z1OrganizationsService.patch_orgs_id_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) u Update an organization. Updates an organization. Use this endpoint to update properties (`name`, `description`) of an organization. Updating an organization’s name affects all resources that reference the organization by name, including the following: - Queries - Dashboards - Tasks - Telegraf configurations - Templates If you change an organization name, be sure to update the organization name in these resources as well. #### Related Guides - [Update an organization](https://docs.influxdata.com/influxdb/latest/organizations/update-org/) This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The ID of the organization to update. (required) :param PatchOrganizationRequest patch_organization_request: The organization update to apply. (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, returns the request thread. rrkrVrr rTrrNrrlrnr r r patch_orgs_id_asyncs(   z(OrganizationsService.patch_orgs_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) Nrrir(rjzDMissing the required parameter `org_id` when calling `patch_orgs_id`zXMissing the required parameter `patch_organization_request` when calling `patch_orgs_id`r)r*r+r, Content-Typer.r/r0rr1Zselect_header_content_type) rrrirr"r3r#r$r%r&r r r rms8     z+OrganizationsService._patch_orgs_id_preparecKs6d|d<|dr |j|f|S|j|f|}|SdS)aCreate an organization. Creates an [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) and returns the newly created organization. #### InfluxDB Cloud - Doesn't allow you to use this endpoint to create organizations. #### Related guides - [Manage organizations](https://docs.influxdata.com/influxdb/latest/organizations) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_orgs(post_organization_request, async_req=True) >>> result = thread.get() :param async_req bool :param PostOrganizationRequest post_organization_request: The organization to create. (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, returns the request thread. Tr rN)rpost_orgs_with_http_info)rpost_organization_requestrrr r r post_orgss  zOrganizationsService.post_orgscKsf|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aCreate an organization. Creates an [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) and returns the newly created organization. #### InfluxDB Cloud - Doesn't allow you to use this endpoint to create organizations. #### Related guides - [Manage organizations](https://docs.influxdata.com/influxdb/latest/organizations) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_orgs_with_http_info(post_organization_request, async_req=True) >>> result = thread.get() :param async_req bool :param PostOrganizationRequest post_organization_request: The organization to create. (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, returns the request thread. rGPOSTrVrr rTrrNr_post_orgs_preparerr rrrsrr"r#r$r%r&r r r rr)s(   z-OrganizationsService.post_orgs_with_http_infocsl|j|f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aCreate an organization. Creates an [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) and returns the newly created organization. #### InfluxDB Cloud - Doesn't allow you to use this endpoint to create organizations. #### Related guides - [Manage organizations](https://docs.influxdata.com/influxdb/latest/organizations) This method makes an asynchronous HTTP request. :param async_req bool :param PostOrganizationRequest post_organization_request: The organization to create. (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, returns the request thread. rGrurVrr rTrrNrrvrxr r r post_orgs_asyncMs(   z$OrganizationsService.post_orgs_asyncc Kst}ddg}|d||d|ks0|ddkr8tdi}g}i}d|krX|d|d<d}d|krl|d}|jdg|d<|jdg|d<|||||fS) Nrsr(rtzSMissing the required parameter `post_organization_request` when calling `post_orgs`r*r+r,rprq) rrsrr"r3r#r$r%r&r r r rwns,  z'OrganizationsService._post_orgs_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)agAdd a member to an organization. Add a user to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add a member to. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_orgs_id_members(org_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add to the organization. (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_orgs_id_members_with_http_inforr add_resource_member_request_bodyrrr r r post_orgs_id_memberss  z)OrganizationsService.post_orgs_id_membersc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) avAdd a member to an organization. Add a user to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add a member to. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add to the organization. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMember If the method is called asynchronously, returns the request thread. r\ruResourceMemberrr rTrrNr_post_orgs_id_members_preparerr r rrr|rr"r#r$r%r&r r r rzs(   z8OrganizationsService.post_orgs_id_members_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aAdd a member to an organization. Add a user to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add a member to. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The ID of the organization. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add to the organization. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceMember If the method is called asynchronously, returns the request thread. r\rur~rr rTrrNrrrr r r post_orgs_id_members_asyncs(   z/OrganizationsService.post_orgs_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) Nrr|r(r}zKMissing the required parameter `org_id` when calling `post_orgs_id_members`zeMissing the required parameter `add_resource_member_request_body` when calling `post_orgs_id_members`r)r*r+r,rprq rrr|rr"r3r#r$r%r&r r r rs8     z2OrganizationsService._post_orgs_id_members_preparecKs:d|d<|dr"|j||f|S|j||f|}|SdS)aAdd an owner to an organization. Adds an owner to an organization. Use this endpoint to assign the organization `owner` role to a user. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_orgs_id_owners(org_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization that you want to add an owner for. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add as an owner of the organization. (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_orgs_id_owners_with_http_infor{r r r post_orgs_id_ownerss  z(OrganizationsService.post_orgs_id_ownersc Ksh|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d S) aAdd an owner to an organization. Adds an owner to an organization. Use this endpoint to assign the organization `owner` role to a user. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization that you want to add an owner for. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add as an owner of the organization. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwner If the method is called asynchronously, returns the request thread. rcru ResourceOwnerrr rTrrNr_post_orgs_id_owners_preparerr rrr r r r)s(   z7OrganizationsService.post_orgs_id_owners_with_http_infoc sn|j||f|\}}}}}|jjdd||||gidg|d|d|dd|di|d d d Id HS) aAdd an owner to an organization. Adds an owner to an organization. Use this endpoint to assign the organization `owner` role to a user. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) This method makes an asynchronous HTTP request. :param async_req bool :param str org_id: The ID of the organization that you want to add an owner for. (required) :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add as an owner of the organization. (required) :param str zap_trace_span: OpenTracing span context :return: ResourceOwner If the method is called asynchronously, returns the request thread. rcrurrr rTrrNrrrr r r post_orgs_id_owners_asyncNs(   z.OrganizationsService.post_orgs_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) Nrr|r(rzJMissing the required parameter `org_id` when calling `post_orgs_id_owners`zdMissing the required parameter `add_resource_member_request_body` when calling `post_orgs_id_owners`r)r*r+r,rprqrr r r rps8     z1OrganizationsService._post_orgs_id_owners_prepare)N)2__name__ __module__ __qualname____doc__rrrr'rr7r4r<r:r@r?rDrCrFrErMrKrUrTrYrXr[rZr`r_rbrargrfrjrhrormrtrrryrwr}rzrrrrrr __classcell__r r r r rs\$!%"!%"!)&'$!$!$!%"%$!%"%%"r)r __future__rreZ%influxdb_client.service._base_servicerrr r r r s